card-mod-recaptcha 0.11.5 → 0.13.0

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: a347dd665fa699579bf67c582ff0996790225b8a6ec20ae93881fa9a6d439172
4
- data.tar.gz: fa11e95ef7d7ef20065e99d70610b908ee27d0fcaf5418778594912e6cdec57a
3
+ metadata.gz: 2d5a79c7dd93ee85cbf86649466fc1d4e52ad683483abb6c2b3e1a17c17020f8
4
+ data.tar.gz: 6f2d7a2cf2baba2c65a5d9f27b15c0cd8506795d43043a6c8d901de725c2e48c
5
5
  SHA512:
6
- metadata.gz: e5ecdd6abe5d743b94fd7eac8e851c4106ec78d74a471424057ee2bf4c1a950c1009a9df04b58f6a3b26e0192670ed2fd3188368c0c41a5a52612d3db2d7a3c9
7
- data.tar.gz: d23661e81fc7f957ddd8e07c0947b3ca067289a6156a3ff3836b8edab6d7203071bc9ad334bab94c50be3b8200e0f143b59130309ceefa0869fabef95ad3577c
6
+ metadata.gz: be6a92321fccd3c04b010773b9569a1344572ea6701edbb728492c50627758e6b299f803e39cafed5c42822df0bb7b2e8047df8db0f568c3a5bfe367c7e1415c
7
+ data.tar.gz: 5977f9eee5eb4522c8be928a1a4a1531c159880fdb4ecf88983ed30e7db097139508cbdb6e1bc5f97e2f8287197ab2449f6f3ee6f50395395296b61512d1895d
@@ -0,0 +1,5 @@
1
+ setting_opts group: :permission,
2
+ position: 5,
3
+ help_text: "Anti-spam setting. Requires non-signed-in users to complete a "\
4
+ "[[http://decko.org/captcha|captcha]] before adding or editing "\
5
+ "cards (where permitted)."
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.11.5
4
+ version: 0.13.0
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-05-10 00:00:00.000000000 Z
13
+ date: 2021-08-06 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.101.5
21
+ version: 1.103.0
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.101.5
28
+ version: 1.103.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: recaptcha
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -47,9 +47,9 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - config/initializers/recaptcha.rb
51
50
  - set/all/recaptcha.rb
52
51
  - set/self/admin_info.rb
52
+ - set/self/captcha.rb
53
53
  - set/self/recaptcha_proxy.rb
54
54
  - set/self/recaptcha_secret_key.rb
55
55
  - set/self/recaptcha_settings.rb
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.1.4
82
+ rubygems_version: 3.1.6
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: recaptcha support for decko
@@ -1,59 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
-
3
- require "recaptcha"
4
-
5
- # This initializer module is mostly here to avoid adding methods/vars to the Object
6
- # namespace
7
- module RecaptchaCard
8
- @deprecated = {
9
- recaptcha_site_key: :recaptcha_public_key,
10
- recaptcha_secret_key: :recaptcha_private_key
11
- }
12
- @defaults = {
13
- recaptcha_site_key: "6LdoqpgUAAAAAEdhJ4heI1h3XLlpXcDf0YubriCG",
14
- recaptcha_secret_key: "6LdoqpgUAAAAAP4Sz1L5PY6VKrum_RFxq4-awj4BH"
15
- }
16
-
17
- mattr_accessor :using_card_defaults
18
-
19
- class << self
20
- def load_recaptcha_config setting
21
- setting = "recaptcha_#{setting}".to_sym
22
- Cardio.config.send "#{setting}=", recaptcha_setting_value(setting)
23
- end
24
-
25
- def using_defaults?
26
- Cardio.config.recaptcha_site_key == @defaults[:recaptcha_site_key]
27
- end
28
-
29
- # card config overrides application.rb config overrides default
30
- def recaptcha_setting_value setting
31
- card_value(setting) || # card content
32
- config_value(setting) || # application.rb (current setting)
33
- config_value(@deprecated[setting]) || # application.rb (deprecated setting)
34
- @defaults[setting]
35
- end
36
-
37
- def config_value setting
38
- Cardio.config.send setting
39
- end
40
-
41
- def card_value setting
42
- return unless Card::Codename.exist? setting # prevents breakage in migrations
43
-
44
- value = Card[setting]&.content
45
- value if value.present?
46
- end
47
- end
48
- end
49
-
50
- ActiveSupport.on_load :after_card do
51
- Recaptcha.configure do |config|
52
- %i[site_key secret_key].each do |setting|
53
- config.send "#{setting}=", RecaptchaCard.load_recaptcha_config(setting)
54
- end
55
- config.verify_url = "https://www.google.com/recaptcha/api/siteverify"
56
- end
57
- end
58
-
59
- CardController.include ::Recaptcha::Verify