Permalink
Browse files

added ability to change http read_timeout via Gattica.new({:timeout =…

…> n})
  • Loading branch information...
Chris Le
Chris Le committed Feb 22, 2011
1 parent 9ca8930 commit 0b520946e7223a37fde4f27e09f302d68e47d169
Showing with 6 additions and 1 deletion.
  1. +1 −1 gattica.gemspec
  2. +5 −0 lib/gattica.rb
View
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{gattica}
s.version = "0.3.3.3"
s.version = "0.3.3.4"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Rob Cameron"]
View
@@ -77,6 +77,11 @@ def initialize(options={})
@http = Net::HTTP.new(SERVER, PORT)
@http.use_ssl = SECURE
@http.set_debug_output $stdout if @options[:debug]
# Set a timeout if the option was given
if @options[:timeout]
@http.read_timeout = @options[:timeout]
end
# authenticate
if @options[:email] && @options[:password] # email and password: authenticate, get a token from Google's ClientLogin, save it for later

0 comments on commit 0b52094

Please sign in to comment.