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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e854a333c67a361f838b389fdaedf07a0d684781
4
- data.tar.gz: c7f14f5c6c893b289afc0cb37d381d8e11cb7e14
3
+ metadata.gz: fc10a90443e23e0efa1487b60109eaa6f321cf45
4
+ data.tar.gz: 7980cd1b25bb89a4b6b1d639301a1a980e39c861
5
5
  SHA512:
6
- metadata.gz: dab9cf632f6a0b78463e12fd3935ea04bfbbd5d72f17e92ff70fe39aeca15414a3a7d80dae2972aa81e8d6fabb3c20c42c29bd117c500390e2e75fd3401b9525
7
- data.tar.gz: 2abaec5128d0893a489633ae1d0b7570688d15ace546b29ed2c12455207284b62c6b2b5126ed13b2dafb8fc8ba97b88033154f8cd35ca94ccb7421ea33bd4599
6
+ metadata.gz: 903966c0745225c203815089865940698aacfb3ba1fad916b0ea7a252d4010e806ba3f50a26ef926f831eb978a3dd8e2c74dec981355a280a2a2e9d3b12000d1
7
+ data.tar.gz: edd1dbedac82f04e8876937d2377ffac6dc5c5789bb5405ff06f6e043533a5f53742515c0d1429075d1a7dffdd393f64aee287d305f13f486f0f7bfdf6652429
@@ -1,3 +1,6 @@
1
+ ## 3.2.0 - 2016-06-13
2
+ * remove SKIP_VERIFY_ENV constant, use `skip_verify_env` instance variable instead
3
+
1
4
  ## 3.1.0 - 2016-06-10
2
5
  * better error messages
3
6
  * frozen constants
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
- data_attributes = data_attributes.map { |k, v| %(data-#{k.to_s.tr('_', '-')}="#{v}") }.join(" ")
24
+ tag_attributes = data_attributes.map { |k, v| %(data-#{k.to_s.tr('_', '-')}="#{v}") }.join(" ")
25
25
 
26
- html = %(<script src="#{script_url}" async defer></script>\n)
27
- html << %(<div class="g-recaptcha" #{data_attributes}></div>\n)
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
@@ -1,3 +1,3 @@
1
1
  module Recaptcha
2
- VERSION = "3.2.0".freeze
2
+ VERSION = "3.3.0".freeze
3
3
  end
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.2.0
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-06-13 00:00:00.000000000 Z
11
+ date: 2016-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json