card-mod-recaptcha 0.14.1 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 401f01a508d89f16d576d0eba9be296ed70c94118f06a3a2eabbd2c4b53c7e63
4
- data.tar.gz: 62119671698e2adf4fffa4c84737eb0304efe8ffbb5779c25a1f83df2e04b29b
3
+ metadata.gz: b12cb0a059983d63bdea8b6dbbe58d25fad2f05ed93c546974f8de1598b6c3ec
4
+ data.tar.gz: eeda1e7905810763824b042079b779988bd4349c2aa5d16d5725426fcd4b08a6
5
5
  SHA512:
6
- metadata.gz: 13639bf7512b46965b7e6123de531057dd9282b00f77048ddc35eaaa8c2b22a2aef348c76f076c2bb75db19191531b3e7683f5138e71e48c867d6a693b2608a5
7
- data.tar.gz: 4279e90ced604d1e0e997c7517b1b1320671f2c895a0d0949a4a9e118bc90a9d5dcca288c4336039c6d19ff3b339fb0064900087f168a2a6cd62cc22da468f48
6
+ metadata.gz: c87aeacfbb72f72b2c3bf346f6fd5606562008d60136b47aa19894eb86e4fa864f9464c48e2c44b7bad3de75d69fa57c363935f9448f0dbc5dbd8d4d9486f4f2
7
+ data.tar.gz: fd8ddc16d92999163f690a4c06ae0e9fd5a229859ac202c86f56c6607cb991e11904e7f31a2645992d18cfde43b7966db52b59494018d7058714b33a678c3a99
data/set/all/recaptcha.rb CHANGED
@@ -15,7 +15,7 @@ end
15
15
 
16
16
  def recaptcha_on?
17
17
  recaptcha_keys? &&
18
- Env[:controller] &&
18
+ Env.controller &&
19
19
  !Auth.signed_in? &&
20
20
  !Auth.always_ok? &&
21
21
  !Auth.needs_setup? &&
@@ -49,7 +49,7 @@ end
49
49
 
50
50
  event :recaptcha, :validate, when: :validate_recaptcha? do
51
51
  handle_recaptcha_config_errors do
52
- Env[:recaptcha_used] = true
52
+ :captcha.card.used!
53
53
  human?
54
54
  end
55
55
  end
@@ -66,7 +66,7 @@ def handle_recaptcha_config_errors
66
66
  end
67
67
 
68
68
  def validate_recaptcha?
69
- !@supercard && !Env[:recaptcha_used] && recaptcha_on?
69
+ !@supercard && !:captcha.card.used? && recaptcha_on?
70
70
  end
71
71
 
72
72
  format :html do
data/set/self/captcha.rb CHANGED
@@ -3,3 +3,11 @@ setting_opts group: :permission,
3
3
  help_text: "Anti-spam setting. Requires non-signed-in users to complete a "\
4
4
  "[[http://decko.org/captcha|captcha]] before adding or editing "\
5
5
  "cards (where permitted)."
6
+
7
+ def used?
8
+ !@used.nil?
9
+ end
10
+
11
+ def used!
12
+ @used = true
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-recaptcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.14.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-01-04 00:00:00.000000000 Z
13
+ date: 2022-01-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.104.1
21
+ version: 1.104.2
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.104.1
28
+ version: 1.104.2
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: recaptcha
31
31
  requirement: !ruby/object:Gem::Requirement