captchah 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/controllers/captchah/captchah_controller.rb +1 -0
- data/lib/captchah/generators/captcha.rb +5 -1
- data/lib/captchah/generators/html.rb +2 -0
- data/lib/captchah/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f3926fc6264e56237671ce4eb5b8d5e22f1f2c06651ffcd1280476666c7278a
|
4
|
+
data.tar.gz: 9a95960a66fb60c5f3892b4af08644fecfa33280ef9e2da5f346986c2677ea85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54ac623eda86756c98bd106be582f3693e6c16fff821c407a225514c87cf39a63adac17f2740fe6f550db5cc4486fc3498a2532a406d30795b4e20bf74faa3c5
|
7
|
+
data.tar.gz: 7a9f81c829f33feeb6512544c6f5cee6df881a0fac7affed21ea310c1129b466d04ab0412958156980e868f61dcceedf6f8f74eb0098464873225f15f86fcc46
|
data/README.md
CHANGED
@@ -82,6 +82,7 @@ captchah_tag(
|
|
82
82
|
reload: true, # Boolean value Default: true
|
83
83
|
css: true, # Boolean value Default: true
|
84
84
|
csp_nonce: 'csp-id', # String value Default: nil
|
85
|
+
required: true, # Boolean value Default: false
|
85
86
|
puzzle_font: 'Verdana' # String value Default: 'Verdana'
|
86
87
|
)
|
87
88
|
```
|
@@ -28,6 +28,7 @@ module Captchah
|
|
28
28
|
@reload = args[:reload] == false ? false : allow_reload?
|
29
29
|
@css = (args[:css] != false)
|
30
30
|
@csp_nonce = args[:csp_nonce]
|
31
|
+
@required = !!args[:required] # rubocop:disable Style/DoubleNegation
|
31
32
|
@puzzle_font = args[:puzzle_font] || DEFAULT_PUZZLE_FONT
|
32
33
|
end
|
33
34
|
|
@@ -45,6 +46,7 @@ module Captchah
|
|
45
46
|
:reload,
|
46
47
|
:css,
|
47
48
|
:csp_nonce,
|
49
|
+
:required,
|
48
50
|
:puzzle_font
|
49
51
|
)
|
50
52
|
|
@@ -61,7 +63,8 @@ module Captchah
|
|
61
63
|
reload_label: reload_label,
|
62
64
|
reload: reload,
|
63
65
|
css: css,
|
64
|
-
csp_nonce: csp_nonce
|
66
|
+
csp_nonce: csp_nonce,
|
67
|
+
required: required
|
65
68
|
)
|
66
69
|
end
|
67
70
|
|
@@ -92,6 +95,7 @@ module Captchah
|
|
92
95
|
reload: reload,
|
93
96
|
css: css,
|
94
97
|
csp_nonce: csp_nonce,
|
98
|
+
required: required,
|
95
99
|
puzzle_font: puzzle_font
|
96
100
|
)
|
97
101
|
end
|
@@ -14,6 +14,7 @@ module Captchah
|
|
14
14
|
reload
|
15
15
|
css
|
16
16
|
csp_nonce
|
17
|
+
required
|
17
18
|
].freeze
|
18
19
|
|
19
20
|
def self.call(*args)
|
@@ -133,6 +134,7 @@ module Captchah
|
|
133
134
|
def guess_tag
|
134
135
|
'<input ' \
|
135
136
|
"type='text' " \
|
137
|
+
"#{'required' if required} " \
|
136
138
|
"autocomplete='off' " \
|
137
139
|
"name='captchah[guess]' " \
|
138
140
|
"class='captchah-guess'>"
|
data/lib/captchah/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: captchah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeni Radev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mini_magick
|