lib/invisible_captcha.rb in invisible_captcha-0.9.0 vs lib/invisible_captcha.rb in invisible_captcha-0.9.1

- old
+ new

@@ -10,10 +10,11 @@ :timestamp_error_message, :error_message attr_accessor :honeypots, :timestamp_threshold, + :timestamp_enabled, :visual_honeypots def init! # Default sentence for real users if text field was visible self.sentence_for_humans = -> { I18n.t('invisible_captcha.sentence_for_humans', default: 'If you are a human, ignore this field') } @@ -24,9 +25,12 @@ # Default fake fields for controller based workflow self.honeypots = ['foo_id', 'bar_id', 'baz_id'] # Fastest time (in seconds) to expect a human to submit the form self.timestamp_threshold = 4 + + # Timestamp check enabled by default + self.timestamp_enabled = true # Default error message for validator when form submitted too quickly self.timestamp_error_message = -> { I18n.t('invisible_captcha.timestamp_error_message', default: 'Sorry, that was too quick! Please resubmit.') } # Make honeypots visibles