glebtv-simple_captcha 0.6.2 → 0.6.3
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 +4 -4
- data/lib/simple_captcha/middleware.rb +5 -3
- data/lib/simple_captcha/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ab07f0a7980f891523f81fe7359b148468ccbed
|
|
4
|
+
data.tar.gz: c7f7d3929a55b28412f0cb91f51e0d23f9109a4a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 969c79b24b000e57c530555009a007cfc5b744db11677cd93c48d9adae35e50fff313c7f5699a52d2c8439a4442640d27a840b29ac10e8a9d16785f72ebe7cc7
|
|
7
|
+
data.tar.gz: 45e38fbb9ec94b5a8fcbbbf58c0ade8a4694b9570d3a94835a921e5d862b7de2bdd2eba20be4729a03ad1d123a4810c0db16b4f05cf36b864a38df02a7532e47
|
|
@@ -28,9 +28,11 @@ module SimpleCaptcha
|
|
|
28
28
|
body = []
|
|
29
29
|
if !code.blank? && Utils::simple_captcha_value(code)
|
|
30
30
|
return send_file(generate_simple_captcha_image(code), :type => 'image/jpeg', :disposition => 'inline', :filename => 'simple_captcha.jpg')
|
|
31
|
+
else
|
|
32
|
+
[500, {
|
|
33
|
+
"Content-Type" => 'text/plain',
|
|
34
|
+
}, "captcha error"]
|
|
31
35
|
end
|
|
32
|
-
|
|
33
|
-
[status, headers, body]
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
def captcha_path?(request_path)
|
|
@@ -48,7 +50,7 @@ module SimpleCaptcha
|
|
|
48
50
|
status = options[:status] || 200
|
|
49
51
|
headers = {
|
|
50
52
|
"Content-Disposition" => "#{options[:disposition]}; filename='#{options[:filename]}'",
|
|
51
|
-
|
|
53
|
+
"Content-Type" => options[:type],
|
|
52
54
|
'Content-Transfer-Encoding' => 'binary',
|
|
53
55
|
'Cache-Control' => 'private'
|
|
54
56
|
}
|
metadata
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glebtv-simple_captcha
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GlebTv
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '3.2'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '3.2'
|
|
27
|
-
description: .
|
|
27
|
+
description: "."
|
|
28
28
|
email: glebtv@gmail.com
|
|
29
29
|
executables: []
|
|
30
30
|
extensions: []
|
|
@@ -61,17 +61,17 @@ require_paths:
|
|
|
61
61
|
- lib
|
|
62
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
|
64
|
-
- -
|
|
64
|
+
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: '0'
|
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
requirements:
|
|
69
|
-
- -
|
|
69
|
+
- - ">="
|
|
70
70
|
- !ruby/object:Gem::Version
|
|
71
71
|
version: '0'
|
|
72
72
|
requirements: []
|
|
73
73
|
rubyforge_project:
|
|
74
|
-
rubygems_version: 2.2.
|
|
74
|
+
rubygems_version: 2.2.2
|
|
75
75
|
signing_key:
|
|
76
76
|
specification_version: 4
|
|
77
77
|
summary: A fork of a fork of a fork of simple_captcha.
|