Skip to content

Commit

Permalink
Remove unused HTTP_STATUS_CODE constants
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jan 30, 2014
1 parent 4cbcb0f commit b45d89b
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 38 deletions.
4 changes: 1 addition & 3 deletions lib/twitter/error/bad_gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 502
class BadGateway < Twitter::Error
HTTP_STATUS_CODE = 502
end
class BadGateway < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/bad_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 400
class BadRequest < Twitter::Error
HTTP_STATUS_CODE = 400
end
class BadRequest < Twitter::Error; end
end
end
3 changes: 1 addition & 2 deletions lib/twitter/error/configuration_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module Twitter
class Error
class ConfigurationError < ::ArgumentError
end
class ConfigurationError < ::ArgumentError; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/forbidden.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 403
class Forbidden < Twitter::Error
HTTP_STATUS_CODE = 403
end
class Forbidden < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/gateway_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 504
class GatewayTimeout < Twitter::Error
HTTP_STATUS_CODE = 504
end
class GatewayTimeout < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/internal_server_error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 500
class InternalServerError < Twitter::Error
HTTP_STATUS_CODE = 500
end
class InternalServerError < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/not_acceptable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 406
class NotAcceptable < Twitter::Error
HTTP_STATUS_CODE = 406
end
class NotAcceptable < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/not_found.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 404
class NotFound < Twitter::Error
HTTP_STATUS_CODE = 404
end
class NotFound < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/request_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when the Faraday connection times out
class RequestTimeout < Twitter::Error
HTTP_STATUS_CODE = 408
end
class RequestTimeout < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/service_unavailable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 503
class ServiceUnavailable < Twitter::Error
HTTP_STATUS_CODE = 503
end
class ServiceUnavailable < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/too_many_requests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 429
class TooManyRequests < Twitter::Error
HTTP_STATUS_CODE = 429
end
class TooManyRequests < Twitter::Error; end
EnhanceYourCalm = TooManyRequests # rubocop:disable ConstantName
RateLimited = TooManyRequests # rubocop:disable ConstantName
end
Expand Down
4 changes: 1 addition & 3 deletions lib/twitter/error/unauthorized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 401
class Unauthorized < Twitter::Error
HTTP_STATUS_CODE = 401
end
class Unauthorized < Twitter::Error; end
end
end
4 changes: 1 addition & 3 deletions lib/twitter/error/unprocessable_entity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
module Twitter
class Error
# Raised when Twitter returns the HTTP status code 422
class UnprocessableEntity < Twitter::Error
HTTP_STATUS_CODE = 422
end
class UnprocessableEntity < Twitter::Error; end
end
end

0 comments on commit b45d89b

Please sign in to comment.