instrumentl / rails-cloudflare-turnstile

ISC License
25 stars 13 forks source link

`mock_enabled` being true should skip `validate!` #184

Open slucaskim opened 3 weeks ago

slucaskim commented 3 weeks ago

Hey thanks for this great gem. I'd like to suggest that if mock_enabled is true, then we skip validate! on the config. Reason being I'm running into issues where in dev/test mode I'm getting the "Site key must exist" error during app boot. I don't think this is necessary because being in mock enabled mode, we don't need the site or private keys.

Let me know if you agree with this, if you do I don't mind putting up the PR for it.