simple_captcha2 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -0
- data/lib/simple_captcha/controller.rb +4 -2
- data/lib/simple_captcha/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: 8f4023b32b748c4923af4ffa42624e3f3c325b23
|
4
|
+
data.tar.gz: cd25c309a52d752a882c4f7438ee62cf44ac1791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0294813a816747ab51b76fd753bd7c0be3cf0492889e1bddc614401d30649d21900ed2f4754940d61a4e6b9e8c92f6947108bb22624023a0aff3c3cf972a9c8e
|
7
|
+
data.tar.gz: ae404e7cc38bfd4b7cefa3dc6b14d811ee786f447296c0180a62df899b0063b3bf7d4f840187caef67ff75d7e6415f6d02a5018c967af5f313b3a830b2d43013
|
data/Rakefile
CHANGED
@@ -33,6 +33,15 @@ namespace :dummy do
|
|
33
33
|
FileUtils.rm_rf "test/dummy" if File.exists?("test/dummy")
|
34
34
|
end
|
35
35
|
|
36
|
+
desc 'redo'
|
37
|
+
task :redo do
|
38
|
+
sh 'rake dummy:destroy'
|
39
|
+
sh 'rake dummy:setup'
|
40
|
+
sh 'rake app:db:migrate'
|
41
|
+
sh 'rake app:db:migrate RAILS_ENV=test'
|
42
|
+
end
|
43
|
+
|
44
|
+
|
36
45
|
end
|
37
46
|
|
38
47
|
|
@@ -15,14 +15,16 @@ module SimpleCaptcha #:nodoc
|
|
15
15
|
# end
|
16
16
|
def simple_captcha_valid?
|
17
17
|
return true if SimpleCaptcha.always_pass
|
18
|
+
return @_simple_captcha_result unless @_simple_captcha_result.nil?
|
18
19
|
|
19
20
|
if params[:captcha]
|
20
21
|
data = SimpleCaptcha::Utils::simple_captcha_value(params[:captcha_key] || session[:captcha])
|
21
22
|
result = data == params[:captcha].delete(" ").upcase
|
22
23
|
SimpleCaptcha::Utils::simple_captcha_passed!(session[:captcha]) if result
|
23
|
-
|
24
|
+
@_simple_captcha_result = result
|
25
|
+
result
|
24
26
|
else
|
25
|
-
|
27
|
+
false
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_captcha2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavlo Galeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-05-
|
13
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|