Skip to content

Commit 03984a2

Browse files
authored
Release v0.9.4 (#129)
* bump version * Handle timeout errors * Fix .gemspec
1 parent 5a7cee4 commit 03984a2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

lib/twurl/request_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module 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
2028
end

lib/twurl/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

twurl.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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']

0 commit comments

Comments
 (0)