deathbycaptcha 5.1.0 → 5.2.0

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
- SHA1:
3
- metadata.gz: 0ade8e91dabaff38c45364e41cc0e90eb667dc3b
4
- data.tar.gz: 2563cc60295125efac5e573fa478aa57b7f6ddc3
2
+ SHA256:
3
+ metadata.gz: b7b0ae41ffa4cc961dc9600c23ec9f0e56bf09261fa4766ed2aa1cd686a2a09f
4
+ data.tar.gz: 87885c289fce41e9a34696514dc067b62b025a45e89f7728aaf28146beba4111
5
5
  SHA512:
6
- metadata.gz: 5ef6a321ccd6c67cff5afed7048c1c8ec627b14baaa2e40c210183e371cc2c681a280c6fedfc78f927cb00b62fd93c8b8d67157bd955441fc61e2d48d2865554
7
- data.tar.gz: bc31af5d0705e589468c08bae270ddaa85b03a9f9fa7bf7b991d70f08bb2d421d98719697bd7861d86552a48b82ca35c8a76d00e96e28e90dce28597231ee9e4
6
+ metadata.gz: 926bfd8b477e4d3888947bfca51521402c0f170c04fb70244b31fc9fa8aea47904f00587ea9f95fe9c9cb62c1c6780164aa59ef1bed19e0ac9e232adf01690a7
7
+ data.tar.gz: 72925f985964bf277675ebc86373871f0a3c865eb7996b0eb73bde1900d14d4d8e7b3765d1ced32979c0baae3bed7d762ca8d56de9273ed48e3d42e4452c5251
@@ -86,9 +86,9 @@ module DeathByCaptcha
86
86
  def decode!(options = {})
87
87
  started_at = Time.now
88
88
 
89
- # don't load image data for Token API
89
+ # don't load image data for Token API v2 & v3
90
90
  raw64 = nil
91
- unless options[:type] == 4
91
+ unless [4, 5].include? options[:type]
92
92
  raw64 = load_captcha(options)
93
93
  raise DeathByCaptcha::InvalidCaptcha if raw64.to_s.empty?
94
94
  end
@@ -62,9 +62,9 @@ module DeathByCaptcha
62
62
  payload[:banner] = "base64:#{banner64}"
63
63
  payload[:banner_text] = options[:banner_text].to_s
64
64
 
65
- elsif options[:type].to_i == 4
65
+ elsif [4, 5].include? options[:type].to_i
66
66
  payload = {
67
- type: 4,
67
+ type: options[:type].to_i,
68
68
  token_params: options[:token_params].to_json,
69
69
  }
70
70
  end
@@ -1,4 +1,4 @@
1
1
  module DeathByCaptcha
2
- VERSION = "5.1.0"
2
+ VERSION = "5.2.0"
3
3
  API_VERSION = "DBC/Ruby v#{VERSION}"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deathbycaptcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafael Barbolo, Rafael Ivan Garcia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-22 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ homepage: https://github.com/infosimples/deathbycaptcha
91
91
  licenses:
92
92
  - MIT
93
93
  metadata: {}
94
- post_install_message:
94
+ post_install_message:
95
95
  rdoc_options: []
96
96
  require_paths:
97
97
  - lib
@@ -106,9 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.5.1
111
- signing_key:
109
+ rubygems_version: 3.1.4
110
+ signing_key:
112
111
  specification_version: 4
113
112
  summary: Ruby API for DeathByCaptcha (Captcha Solver as a Service)
114
113
  test_files: