Skip to content

Commit

Permalink
Release v0.9.4 (#129)
Browse files Browse the repository at this point in the history
* bump version

* Handle timeout errors

* Fix .gemspec
  • Loading branch information
smaeda-ks authored Dec 10, 2019
1 parent 5a7cee4 commit 03984a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions lib/twurl/request_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module Twurl
class RequestController < AbstractCommandController
NO_URI_MESSAGE = "No URI specified"
READ_TIMEOUT_MESSAGE = 'A timeout occurred (Net::ReadTimeout). ' \
'Please try again or increase the value using --timeout option.'
OPEN_TIMEOUT_MESSAGE = 'A timeout occurred (Net::OpenTimeout). ' \
'Please try again or increase the value using --connection-timeout option.'
def dispatch
if client.needs_to_authorize?
raise Exception, "You need to authorize first."
Expand All @@ -15,6 +19,10 @@ def perform_request
}
rescue URI::InvalidURIError
CLI.puts NO_URI_MESSAGE
rescue Net::ReadTimeout
CLI.puts READ_TIMEOUT_MESSAGE
rescue Net::OpenTimeout
CLI.puts OPEN_TIMEOUT_MESSAGE
end
end
end
2 changes: 1 addition & 1 deletion lib/twurl/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Twurl
class Version
MAJOR = 0 unless defined? Twurl::Version::MAJOR
MINOR = 9 unless defined? Twurl::Version::MINOR
PATCH = 3 unless defined? Twurl::Version::PATCH
PATCH = 4 unless defined? Twurl::Version::PATCH
PRE = nil unless defined? Twurl::Version::PRE # Time.now.to_i.to_s

class << self
Expand Down
2 changes: 1 addition & 1 deletion twurl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.description = %q{Curl for the Twitter API}
spec.email = ['marcel@twitter.com']
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
spec.extra_rdoc_files = %w(COPYING INSTALL README.md)
spec.extra_rdoc_files = %w(CODE_OF_CONDUCT.md INSTALL LICENSE README.md)
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?('test/') }
spec.homepage = 'http://github.com/twitter/twurl'
spec.licenses = ['MIT']
Expand Down

0 comments on commit 03984a2

Please sign in to comment.