recaptcha 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -0
- data/lib/recaptcha/client_helper.rb +8 -3
- data/lib/recaptcha/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc10a90443e23e0efa1487b60109eaa6f321cf45
|
4
|
+
data.tar.gz: 7980cd1b25bb89a4b6b1d639301a1a980e39c861
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 903966c0745225c203815089865940698aacfb3ba1fad916b0ea7a252d4010e806ba3f50a26ef926f831eb978a3dd8e2c74dec981355a280a2a2e9d3b12000d1
|
7
|
+
data.tar.gz: edd1dbedac82f04e8876937d2377ffac6dc5c5789bb5405ff06f6e043533a5f53742515c0d1429075d1a7dffdd393f64aee287d305f13f486f0f7bfdf6652429
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -73,6 +73,8 @@ Some of the options available:
|
|
73
73
|
| :error | Override the error code returned from the reCAPTCHA API (default `nil`)|
|
74
74
|
| :size | Specify a size (default `nil`)|
|
75
75
|
| :hl | Optional. Forces the widget to render in a specific language. Auto-detects the user's language if unspecified. (See [language codes](https://developers.google.com/recaptcha/docs/language)) |
|
76
|
+
| :id | Specify an html id attribute (default `nil`)|
|
77
|
+
| :script | If you do not need to add a script tag by helper you can set the option to false. It's necessary when you add a script tag manualy (default `true`)|
|
76
78
|
|
77
79
|
You can also override the html attributes for the sizes of the generated `textarea` and `iframe`
|
78
80
|
elements, if CSS isn't your thing. Inspect the source of `recaptcha_tags` to see these options.
|
@@ -21,10 +21,15 @@ module Recaptcha
|
|
21
21
|
a[k] = v if data_attributes.include?(k)
|
22
22
|
end
|
23
23
|
data_attributes[:sitekey] = public_key
|
24
|
-
|
24
|
+
tag_attributes = data_attributes.map { |k, v| %(data-#{k.to_s.tr('_', '-')}="#{v}") }.join(" ")
|
25
25
|
|
26
|
-
|
27
|
-
|
26
|
+
if id = options[:id]
|
27
|
+
tag_attributes << %( id="#{id}")
|
28
|
+
end
|
29
|
+
|
30
|
+
html = ""
|
31
|
+
html << %(<script src="#{script_url}" async defer></script>\n) if options.fetch(:script, true)
|
32
|
+
html << %(<div class="g-recaptcha" #{tag_attributes}></div>\n)
|
28
33
|
|
29
34
|
if options[:noscript] != false
|
30
35
|
html << <<-HTML
|
data/lib/recaptcha/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason L Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|