yandex_captcha 0.4.3.6 → 0.4.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f3c550c9209b0bb1f5b67ea60688d30abee59e5
4
- data.tar.gz: 6af1b0ac0c5ece46e60c54cd67baa8ad71a366d1
3
+ metadata.gz: e2076481ad872bebe8897ad532f1dd4a97f289ca
4
+ data.tar.gz: f52cbbd32f75ab5d7bc05015dfb96ab75ae4adde
5
5
  SHA512:
6
- metadata.gz: 8547a1a047cf4ad1370798df4ef90fbe9ce5064c871eb11c2abce55f4595fd2b2d0b7c22afea6c5dcf8df1bb3d6aabe6f3aa6b5f4cdddc2e3bca1d5260b055e9
7
- data.tar.gz: 070ad9f9fcc2668d9c66628cf158cc9de4d7bb2fc4d8c027adde625a48ad128d10961bc52bd030286c9c2a934e41701f94b1cf54776e74c5c7cd2a90b872b42b
6
+ metadata.gz: 63b9cab29fe5bb70e27bacd184465f82b69015f40c074841043ac08d9f80386d304333e5664ba7ecfa29f4ced35cfbb7e8063a6acca081c6a6df3125485f1bd4
7
+ data.tar.gz: d66ce44537e1f74645da137d889aebf052bf599b509aff43abc3820cbb488515a663f7dac258c8a21718c330972edcf406af174e9f65484d6e344e05128354df
data/README.md CHANGED
@@ -53,6 +53,8 @@ Get the api key: [http://api.yandex.ru/cleanweb/getkey.xml](http://api.yandex.ru
53
53
  ```ruby
54
54
  # Rails routes
55
55
  mount YandexCaptcha::Engine, at: '/yandex_captcha/'
56
+ # or
57
+ mount YandexCaptcha::Engine, at: '/'
56
58
 
57
59
  # Sinatra
58
60
  register YandexCaptcha::Sinatra
@@ -1,4 +1,4 @@
1
1
  $ ->
2
- $.getJSON "<%= YandexCaptcha::Engine.routes.url_helpers.captcha_path %>", (data) ->
2
+ $.getJSON $("#captcha_widget").data("api"), (data) ->
3
3
  $("#captcha_image img").attr("src", data.url)
4
4
  $("#captcha_widget input[name=captcha_response_id]").attr("value", data.captcha)
@@ -1,4 +1,4 @@
1
- <div id="captcha_widget">
1
+ <div id="captcha_widget" data-api="<%= yandex_captcha.captcha_path %>">
2
2
  <div id="captcha_image">
3
3
  <img src="<%= asset_path("yandex_captcha/loading.gif") %>" />
4
4
  </div>
@@ -1,6 +1,7 @@
1
1
  module YandexCaptcha
2
2
  class Engine < Rails::Engine
3
3
  isolate_namespace YandexCaptcha
4
+ engine_name 'yandex_captcha'
4
5
 
5
6
  if Rails.version >= '3.1'
6
7
  initializer :assets do |app|
@@ -1,3 +1,3 @@
1
1
  module YandexCaptcha
2
- VERSION = "0.4.3.6"
2
+ VERSION = "0.4.3.7"
3
3
  end
@@ -25,11 +25,7 @@ module YandexCaptcha
25
25
  end
26
26
 
27
27
  def self.skip_env
28
- if configuration.skip_verify_env.include? configuration.current_env
29
- true
30
- else
31
- false
32
- end
28
+ configuration.skip_verify_env.include? configuration.current_env
33
29
  end
34
30
  end
35
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yandex_captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.6
4
+ version: 0.4.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Merkulov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-05 00:00:00.000000000 Z
12
+ date: 2014-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri