rack-recaptcha 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module Rack
34
34
  options[:public_key] ||= Rack::Recaptcha.public_key
35
35
  path = options[:ssl] ? Rack::Recaptcha::API_SECURE_URL : Rack::Recaptcha::API_URL
36
36
  params = "k=#{options[:public_key]}"
37
- error_message = request.env['recaptcha.msg']
37
+ error_message = defined?(request) ? request.env['recaptcha.msg'] : env['recaptcha.msg']
38
38
  params += "&error=" + URI.encode(error_message) unless error_message.nil?
39
39
  html = case type.to_sym
40
40
  when :challenge
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{rack-recaptcha}
3
- s.version = "0.6.1"
3
+ s.version = "0.6.2"
4
4
  s.required_rubygems_version = ">=1.3.6"
5
5
  s.authors = ["Arthur Chiu"]
6
6
  s.date = %q{2010-07-18}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-recaptcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2010-07-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &2153769860 !ruby/object:Gem::Requirement
16
+ requirement: &2153468420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153769860
24
+ version_requirements: *2153468420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: riot
27
- requirement: &2153769400 !ruby/object:Gem::Requirement
27
+ requirement: &2153467960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.3
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2153769400
35
+ version_requirements: *2153467960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rack-test
38
- requirement: &2153768940 !ruby/object:Gem::Requirement
38
+ requirement: &2153467500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.5.7
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2153768940
46
+ version_requirements: *2153467500
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: fakeweb
49
- requirement: &2153768480 !ruby/object:Gem::Requirement
49
+ requirement: &2153467040 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.3.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2153768480
57
+ version_requirements: *2153467040
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rr
60
- requirement: &2153768020 !ruby/object:Gem::Requirement
60
+ requirement: &2153466580 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.0.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2153768020
68
+ version_requirements: *2153466580
69
69
  description: Rack middleware Captcha verification using Recaptcha API.
70
70
  email: mr.arthur.chiu@gmail.com
71
71
  executables: []