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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0401ddefd37ff7c64933e59e0e566eaee4e08a1c
4
- data.tar.gz: b99fdd1ed6cfe0ec1c7a3be92350088519eb7ffa
3
+ metadata.gz: 8f4023b32b748c4923af4ffa42624e3f3c325b23
4
+ data.tar.gz: cd25c309a52d752a882c4f7438ee62cf44ac1791
5
5
  SHA512:
6
- metadata.gz: 3ae6e1789366fa57acf8b79ce513b89a9ccd5883758f4c13744added5ed67ec5a26277f53b20c595619b9ea010a04710f8b652146e5fafd9e950e3e5775802ac
7
- data.tar.gz: 4621447431ab5dfef36657bbcbe682287470c7cfdb1e039401d8377bae871446a7e7c716111a6eb5a5f758c0787508aa93a6f11f0436c59a2c0fc0a3d5b919de
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
- return result
24
+ @_simple_captcha_result = result
25
+ result
24
26
  else
25
- return false
27
+ false
26
28
  end
27
29
  end
28
30
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleCaptcha
2
- VERSION = "0.3.0".freeze
2
+ VERSION = "0.3.1".freeze
3
3
  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.0
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-04 00:00:00.000000000 Z
13
+ date: 2014-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails