CivicTechAtlanta / connector

A management tool for the brigade's projects
BSD 3-Clause "New" or "Revised" License
4 stars 12 forks source link

Add captcha to comment #54

Closed alex-hall closed 7 years ago

alex-hall commented 7 years ago

High level Changelog:

Got a little sidetracked initially setting up the environment, had to install timecop to make rake pass before doing any real work. Also, had to fix a bum version of RSpec that didn't let me test the ReCaptcha logic properly.

The ReCaptcha gem assumes you have the following ENVs set:

So I'll either need to work with an admin to pass along my generated keys or have them generate the keys themselves. Note that if you want this to work in local you'll have to generate the keys with localhost whitelisted.

Additionally, could not find an integration test to work with (but noticed capybara as a part of the project?) so if I need to go back and retro some feature tests let me know.

Finally, the version of ruby and almost all gems (including rails) are very out of date. I tried not to boil the ocean with my changes here and only update the ones I needed, but this should be taken care of soon.

sb8244 commented 7 years ago

Nice PR @alex-hall. Appreciate you getting this problem fixed up.

@luigi I'm good with this PR. I don't think CI is setup and I'm not a collaborator on Heroku, so I'll let you merge / ship and get the ReCAPTCHA keys defined for the CFA organization. For the spam, I found that looking for anonymous comments and then manually deleting them was acceptable the last time I cleared out the spam. I don't think there were any legitimate anonymous comments previously.

Alex had some good points of updating rails and the ruby version. Very good things we should get on (at least ensure our Rails version is up to patch).

alex-hall commented 7 years ago

@sb8244 No problem.

I can take a look at getting gems and rails updated.

I'll raise another issue and we can discuss.

luigi commented 7 years ago

Correct, we don't have CI. I'll deploy this later tonight and clear the spam out.

Thanks @alex-hall!

luigi commented 7 years ago

Deployed. http://www.codeforatlanta.org/projects/5