yandex_captcha 0.4.3 → 0.4.3.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 +12 -10
- data/lib/yandex_captcha/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8bfb7505a2114b720360721d2a5e81a9bfdf0a2
|
4
|
+
data.tar.gz: 982bdd9d04c3ea6f697404bbaed5680bf91e5484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cde01cbaf9648ec509839e43a8792e6ed7ae5d91c3d10f05fd93593afe188005124c681c12914b071fbcaaa76d04f5622ab642e136ee8688defa5edcc235d43
|
7
|
+
data.tar.gz: 720f1b250f37bf0d44b07b0f236ba45b66a6d360c8c21688cdf22f0890a489fea2036f2e480638b72717260dca3612c9d6dd3a2293ac4bbdd9dbb74f1f634730
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Unfortunatelly, this gem *is not capable with MRI 1.8.7* because of MRI 1.8.7 do
|
|
11
11
|
|
12
12
|
Add this line to your application's Gemfile:
|
13
13
|
|
14
|
-
gem 'yandex_captcha', '~> 0.4.
|
14
|
+
gem 'yandex_captcha', '~> 0.4.3.1'
|
15
15
|
|
16
16
|
Or:
|
17
17
|
|
@@ -35,11 +35,6 @@ Tested:
|
|
35
35
|
|
36
36
|
Get the api key: [http://api.yandex.ru/cleanweb/getkey.xml](http://api.yandex.ru/cleanweb/getkey.xml)
|
37
37
|
|
38
|
-
### Options
|
39
|
-
|
40
|
-
- `ajax` = `true/false`
|
41
|
-
- `noscript` = `true/false` Only for non ajax version.
|
42
|
-
|
43
38
|
### Code
|
44
39
|
|
45
40
|
```ruby
|
@@ -55,7 +50,14 @@ YandexCaptcha.configure do |config|
|
|
55
50
|
end
|
56
51
|
```
|
57
52
|
|
58
|
-
In Views
|
53
|
+
### In Views
|
54
|
+
|
55
|
+
#### View Helper Options
|
56
|
+
|
57
|
+
- `ajax` = `true/false`
|
58
|
+
- `noscript` = `true/false` Only for non ajax version.
|
59
|
+
|
60
|
+
#### Code
|
59
61
|
|
60
62
|
```erb
|
61
63
|
<%= captcha_tags %>
|
@@ -63,7 +65,7 @@ In Views:
|
|
63
65
|
<%= captcha_tags noscript:true %>
|
64
66
|
```
|
65
67
|
|
66
|
-
In Controllers
|
68
|
+
### In Controllers
|
67
69
|
|
68
70
|
```ruby
|
69
71
|
if YandexCaptcha::Verify.valid_captcha?(params[:captcha_response_id], params[:captcha_response_field])
|
@@ -71,7 +73,7 @@ if YandexCaptcha::Verify.valid_captcha?(params[:captcha_response_id], params[:ca
|
|
71
73
|
end
|
72
74
|
```
|
73
75
|
|
74
|
-
Other examples
|
76
|
+
### Other examples
|
75
77
|
|
76
78
|
```ruby
|
77
79
|
# Methods
|
@@ -85,7 +87,7 @@ YandexCaptcha::Verify.spam?(body_html: "some spam <a href='http://spam.com'>spam
|
|
85
87
|
=> { id: "request id", links: [ ['http://spam.com', true] ] }
|
86
88
|
```
|
87
89
|
|
88
|
-
More complex example
|
90
|
+
### More complex example
|
89
91
|
|
90
92
|
```ruby
|
91
93
|
|