recaptcha 2.1.0 → 2.2.0
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 -1
- data/lib/recaptcha.rb +2 -3
- data/lib/recaptcha/configuration.rb +1 -1
- data/lib/recaptcha/verify.rb +2 -0
- 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: 31f346568194ea954c4b8df2484084190134af6c
|
4
|
+
data.tar.gz: 258ecfbdd4cb80c9f11d423b4f946c94cb770c99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a83bc1cd5216e0fc3cf96788ab2d926239536ead0c144b9ce68e2cb4be013a6696f202944d813f2513cf168cfda860e4396ca16ff38c57beb31885bed4bdb0e3
|
7
|
+
data.tar.gz: 0095c46ee9f365bc76a02696f9b505ac623a2383a670c0aed38fa7ee6e854d2e710a233e06c709c8d8a3d5e43353b5e74d445c82a617e4aa5b2fc53a9d54ae59
|
data/README.md
CHANGED
@@ -95,7 +95,7 @@ Some of the options available:
|
|
95
95
|
| :private_key | Override private API key.
|
96
96
|
| :timeout | The number of seconds to wait for reCAPTCHA servers before give up. (default `3`)
|
97
97
|
| :response | Custom response parameter. (default: params['g-recaptcha-response'])
|
98
|
-
| :hostname | Expected hostname or a callable that validates the hostname, see [domain validation](https://developers.google.com/recaptcha/docs/domain_validation) and [hostname](https://developers.google.com/recaptcha/docs/verify#api-response) docs. (default: `nil`)
|
98
|
+
| :hostname | Expected hostname or a callable that validates the hostname, see [domain validation](https://developers.google.com/recaptcha/docs/domain_validation) and [hostname](https://developers.google.com/recaptcha/docs/verify#api-response) docs. (default: `nil`, but can be changed by setting `config.hostname`)
|
99
99
|
|
100
100
|
## I18n support
|
101
101
|
reCAPTCHA passes two types of error explanation to a linked model. It will use the I18n gem
|
data/lib/recaptcha.rb
CHANGED
@@ -40,10 +40,9 @@ module Recaptcha
|
|
40
40
|
configuration.send("#{key}=", value)
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
yield if block_given?
|
44
|
+
ensure
|
45
45
|
original_config.each { |key, value| configuration.send("#{key}=", value) }
|
46
|
-
result
|
47
46
|
end
|
48
47
|
|
49
48
|
def self.get(verify_hash, options)
|
@@ -28,7 +28,7 @@ module Recaptcha
|
|
28
28
|
# end
|
29
29
|
#
|
30
30
|
class Configuration
|
31
|
-
attr_accessor :skip_verify_env, :private_key, :public_key, :proxy, :handle_timeouts_gracefully, :use_ssl_by_default
|
31
|
+
attr_accessor :skip_verify_env, :private_key, :public_key, :proxy, :handle_timeouts_gracefully, :use_ssl_by_default, :hostname
|
32
32
|
|
33
33
|
def initialize #:nodoc:
|
34
34
|
@skip_verify_env = SKIP_VERIFY_ENV
|
data/lib/recaptcha/verify.rb
CHANGED
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: 2.
|
4
|
+
version: 2.2.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-05-
|
11
|
+
date: 2016-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|