deathbycaptcha 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/lib/deathbycaptcha/client.rb +1 -1
- data/lib/deathbycaptcha/version.rb +2 -2
- metadata +3 -19
data/README.rdoc
CHANGED
@@ -38,7 +38,7 @@ You can add it to your Gemfile:
|
|
38
38
|
|
39
39
|
==== Verbose mode (for debugging purposes)
|
40
40
|
|
41
|
-
client.is_verbose = true
|
41
|
+
client.config.is_verbose = true
|
42
42
|
|
43
43
|
==== Decoding captcha
|
44
44
|
|
@@ -66,7 +66,7 @@ You can add it to your Gemfile:
|
|
66
66
|
|
67
67
|
raw_content = File.open('path/to/my/captcha/file', 'r').read
|
68
68
|
|
69
|
-
response = client.decode(raw_content, :
|
69
|
+
response = client.decode(raw_content, :is_raw_content => true)
|
70
70
|
|
71
71
|
puts "captcha id: #{response['captcha']}, solution: #{response['text']}, is_correct: #{response['is_correct']}}"
|
72
72
|
|
@@ -164,7 +164,7 @@ module DeathByCaptcha
|
|
164
164
|
if is_raw_content
|
165
165
|
# Create a temporary file, write the raw content and return it
|
166
166
|
tmp_file_path = File.join(Dir.tmpdir, "captcha_#{Time.now.to_i}_#{rand}")
|
167
|
-
File.open(tmp_file_path, '
|
167
|
+
File.open(tmp_file_path, 'wb') {|f| f.write captcha}
|
168
168
|
file = File.open(tmp_file_path, 'r')
|
169
169
|
|
170
170
|
elsif captcha.kind_of? File
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deathbycaptcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 4
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
version: 4.0.0
|
4
|
+
prerelease:
|
5
|
+
version: 4.0.1
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Rafael Barbolo Lopes, Rafael Ivan Garcia
|
@@ -25,10 +21,6 @@ dependencies:
|
|
25
21
|
requirements:
|
26
22
|
- - ~>
|
27
23
|
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 1
|
30
|
-
- 6
|
31
|
-
- 1
|
32
24
|
version: 1.6.1
|
33
25
|
type: :runtime
|
34
26
|
version_requirements: *id001
|
@@ -40,10 +32,6 @@ dependencies:
|
|
40
32
|
requirements:
|
41
33
|
- - ~>
|
42
34
|
- !ruby/object:Gem::Version
|
43
|
-
segments:
|
44
|
-
- 1
|
45
|
-
- 4
|
46
|
-
- 6
|
47
35
|
version: 1.4.6
|
48
36
|
type: :runtime
|
49
37
|
version_requirements: *id002
|
@@ -84,21 +72,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
72
|
requirements:
|
85
73
|
- - ">="
|
86
74
|
- !ruby/object:Gem::Version
|
87
|
-
segments:
|
88
|
-
- 0
|
89
75
|
version: "0"
|
90
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
77
|
none: false
|
92
78
|
requirements:
|
93
79
|
- - ">="
|
94
80
|
- !ruby/object:Gem::Version
|
95
|
-
segments:
|
96
|
-
- 0
|
97
81
|
version: "0"
|
98
82
|
requirements: []
|
99
83
|
|
100
84
|
rubyforge_project: deathbycaptcha
|
101
|
-
rubygems_version: 1.
|
85
|
+
rubygems_version: 1.5.2
|
102
86
|
signing_key:
|
103
87
|
specification_version: 3
|
104
88
|
summary: Ruby API for DeathByCaptcha (Captcha Solver as a Service)
|