File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11module Twurl
22 class RequestController < AbstractCommandController
33 NO_URI_MESSAGE = "No URI specified"
4+ READ_TIMEOUT_MESSAGE = 'A timeout occurred (Net::ReadTimeout). ' \
5+ 'Please try again or increase the value using --timeout option.'
6+ OPEN_TIMEOUT_MESSAGE = 'A timeout occurred (Net::OpenTimeout). ' \
7+ 'Please try again or increase the value using --connection-timeout option.'
48 def dispatch
59 if client . needs_to_authorize?
610 raise Exception , "You need to authorize first."
@@ -15,6 +19,10 @@ def perform_request
1519 }
1620 rescue URI ::InvalidURIError
1721 CLI . puts NO_URI_MESSAGE
22+ rescue Net ::ReadTimeout
23+ CLI . puts READ_TIMEOUT_MESSAGE
24+ rescue Net ::OpenTimeout
25+ CLI . puts OPEN_TIMEOUT_MESSAGE
1826 end
1927 end
2028end
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module Twurl
22 class Version
33 MAJOR = 0 unless defined? Twurl ::Version ::MAJOR
44 MINOR = 9 unless defined? Twurl ::Version ::MINOR
5- PATCH = 3 unless defined? Twurl ::Version ::PATCH
5+ PATCH = 4 unless defined? Twurl ::Version ::PATCH
66 PRE = nil unless defined? Twurl ::Version ::PRE # Time.now.to_i.to_s
77
88 class << self
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
99 spec . description = %q{Curl for the Twitter API}
1010 spec . email = [ '[email protected] ' ] 1111 spec . executables = `git ls-files -- bin/*` . split ( "\n " ) . map { |f | File . basename ( f ) }
12- spec . extra_rdoc_files = %w( COPYING INSTALL README.md )
12+ spec . extra_rdoc_files = %w( CODE_OF_CONDUCT.md INSTALL LICENSE README.md )
1313 spec . files = `git ls-files -z` . split ( "\x0 " ) . reject { |f | f . start_with? ( 'test/' ) }
1414 spec . homepage = 'http://github.com/twitter/twurl'
1515 spec . licenses = [ 'MIT' ]
You can’t perform that action at this time.
0 commit comments