Permalink
Browse files

Copyright updated.

Upload method updated to receive options for the input captcha image.
  • Loading branch information...
1 parent a1de76e commit ba0aadf1f844a15cc2c17a27b16515759af56d09 @barbolo barbolo committed Apr 6, 2011
Showing with 15 additions and 11 deletions.
  1. +1 −1 MIT-LICENSE
  2. +1 −1 README.rdoc
  3. +4 −5 deathbycaptcha.gemspec
  4. +1 −1 lib/deathbycaptcha/client.rb
  5. +8 −3 lib/deathbycaptcha/http_client.rb
View
@@ -1,4 +1,4 @@
-Copyright (C) 2011 by Rafael Barbolo, Rafael Ivan
+Copyright (C) 2011 by Infosimples. http://www.infosimples.com.br/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -51,4 +51,4 @@ Get the solution of a captcha:
== License
-MIT License.
+MIT License. Copyright (C) 2011 by Infosimples. http://www.infosimples.com.br/
@@ -3,16 +3,15 @@ $:.push File.expand_path("../lib", __FILE__)
require "deathbycaptcha/version"
Gem::Specification.new do |s|
- s.add_dependency 'rest-client'
- s.add_dependency 'addressable'
- s.add_dependency 'json'
+ s.add_dependency 'rest-client', '~> 1.6.1'
+ s.add_dependency 'json', '~> 1.4.6'
s.name = "deathbycaptcha"
s.version = DeathByCaptcha::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Rafael Barbolo Lopes, Rafael Ivan Garcia"]
- s.email = []
- s.homepage = ""
+ s.email = ["tech@infosimples.com.br"]
+ s.homepage = "http://github.com/infosimples/deathbycaptcha"
s.summary = %q{Ruby API for DeathByCaptcha (Captcha Solver as a Service)}
s.description = %q{Ruby API for DeathByCaptcha (Captcha Solver as a Service)}
@@ -84,7 +84,7 @@ def remove(cid)
# whether the CAPTCHA is case-sensitive or not. Returns CAPTCHA details
# on success.
#
- def upload(captcha, is_case_sensitive=false)
+ def upload(captcha, options={})
raise DeathByCaptcha::Errors::NotImplemented
end
@@ -25,12 +25,17 @@ def remove(cid)
not call("captcha/#{cid}/remove", userpwd)['captcha']
end
+ def a(nome, test=false, valor="verdade")
+ puts nome,test,valor
+ end
+
protected
- def upload(captcha, is_case_sensitive=false, is_raw_content=false)
+ def upload(captcha, options={})
+ options = {:is_case_sensitive => false, :is_raw_content => false}.merge(options)
data = userpwd
data[:swid] = config.software_vendor_id
- data[:is_case_sensitive] = is_case_sensitive ? 1 : 0
- data[:captchafile] = load_file(captcha, is_raw_content)
+ data[:is_case_sensitive] = options[:is_case_sensitive] ? 1 : 0
+ data[:captchafile] = load_file(captcha, options[:is_raw_content])
response = call('captcha', data)
return response if response['captcha']
end

0 comments on commit ba0aadf

Please sign in to comment.