glebtv-simple_captcha 0.6.2 → 0.6.3

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: 47a8b5c8bb484cd2b5022fb384db818731ab3c93
4
- data.tar.gz: 101a1df32291dee59eaead58a01f95da12569ac2
3
+ metadata.gz: 4ab07f0a7980f891523f81fe7359b148468ccbed
4
+ data.tar.gz: c7f7d3929a55b28412f0cb91f51e0d23f9109a4a
5
5
  SHA512:
6
- metadata.gz: e668d2c8def78e544e9f8513fc8b027f84e3189cb99a409a8202c87696038f0fa856193f18887c6026a60f85e93c077dcf01242109096c6ef215af07279a27f1
7
- data.tar.gz: a082ea8c8e449b34d729ca537b22161cdb367b46fad9c702e9e675c85a0090501bee291c32e999adb7e4187c12532c8b6e1f937e0bff51c814083ef4cc8d1f79
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
- # "Content-Type" => options[:type],
53
+ "Content-Type" => options[:type],
52
54
  'Content-Transfer-Encoding' => 'binary',
53
55
  'Cache-Control' => 'private'
54
56
  }
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module SimpleCaptcha
4
- VERSION = "0.6.2".freeze
4
+ VERSION = "0.6.3".freeze
5
5
  end
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.2
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-04-02 00:00:00.000000000 Z
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.1
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.