card-mod-recaptcha 0.13.3 → 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: 124cdc79df869b7c5a098d85f76baa7c086f85af3d3ae8f4ea21fa16c812bdb6
4
- data.tar.gz: 84996e3387d02bd1312172825880edda6556808073a74a2ce086a8f586562a6a
3
+ metadata.gz: b12cb0a059983d63bdea8b6dbbe58d25fad2f05ed93c546974f8de1598b6c3ec
4
+ data.tar.gz: eeda1e7905810763824b042079b779988bd4349c2aa5d16d5725426fcd4b08a6
5
5
  SHA512:
6
- metadata.gz: c22d7dcbb4a1ee45f771c18c8f2a5d8d8e2d42c70f5a73cdada1e191129287155e1df7bc0bf350d0ac1f36d0d79b95fc0ec737fd4d85391834402302a41c627d
7
- data.tar.gz: 29941a83b652f565a6b8f80e54883cbbff71f9fb148816e137032c7dfe264b0e7ce97af66c7c3fb091aaa6f1bccb9978c0e0f983398ef11dc0ac1df5622a20c2
6
+ metadata.gz: c87aeacfbb72f72b2c3bf346f6fd5606562008d60136b47aa19894eb86e4fa864f9464c48e2c44b7bad3de75d69fa57c363935f9448f0dbc5dbd8d4d9486f4f2
7
+ data.tar.gz: fd8ddc16d92999163f690a4c06ae0e9fd5a229859ac202c86f56c6607cb991e11904e7f31a2645992d18cfde43b7966db52b59494018d7058714b33a678c3a99
data/locales/de.yml ADDED
@@ -0,0 +1,10 @@
1
+ de:
2
+ recaptcha_link_text: Recaptcha-Schlüssel
3
+ recaptcha_captcha_keys: Laut Einstellungen wird %{captcha_link} benutzt, aber damit das funktioniert, benötigen sie neue %{recaptcha_link}.
4
+ recaptcha_captcha_temp: Ihr Captcha läuft im Moment mit temporären Einstellungen. Für eine lokale Installation ist das in Ordnung, aber Sie werden einen neuen %{recaptcha_link} brauchen, wenn Sie diese Seite veröffentlichen.
5
+ recaptcha_howto_add: Fügen Sie ihre Schlüssel zu %{recaptcha_settings} hinzu.
6
+ recaptcha_howto_add_keys: "Wie man neue Recaptcha-Schlüssel hinzufügt:"
7
+ recaptcha_howto_go: Gehe zu %{captcha_card}
8
+ recaptcha_howto_register: Registriere Sie ihre Domain bei %{recaptcha_link}
9
+ recaptcha_howto_turn_off: 'Wie man Captchas ausschaltet:'
10
+ recaptcha_howto_update: Setze alle *captcha-Regel auf "nein".
data/locales/en.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  en:
2
+ recaptcha_link_text: recaptcha keys
2
3
  recaptcha_captcha_keys: You are configured to use %{captcha_link}, but for that to work you need new %{recaptcha_link}.
3
4
  recaptcha_captcha_temp: Your captcha is currently working with temporary settings. This is fine for a local installation, but you will need new %{recaptcha_link} if you want to make this site public.
4
5
  recaptcha_howto_add: Add your keys to %{recaptcha_settings}
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
@@ -22,6 +22,6 @@ format :html do
22
22
  end
23
23
 
24
24
  def add_recaptcha_keys_link
25
- Card[:recaptcha_settings]&.format&.edit_link link_text: t(:recaptcha_captcha_keys)
25
+ Card[:recaptcha_settings]&.format&.edit_link link_text: t(:recaptcha_link_text)
26
26
  end
27
27
  end
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.13.3
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: 2021-09-24 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.103.3
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.103.3
28
+ version: 1.104.2
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: recaptcha
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -48,6 +48,7 @@ extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
50
  - init/late/recaptcha.rb
51
+ - locales/de.yml
51
52
  - locales/en.yml
52
53
  - set/all/recaptcha.rb
53
54
  - set/self/admin_info.rb
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  requirements: []
84
- rubygems_version: 3.1.6
85
+ rubygems_version: 3.2.15
85
86
  signing_key:
86
87
  specification_version: 4
87
88
  summary: recaptcha support for decko