Permalink
Browse files

Error out on redirects.

This way a silent failure won't occur for redirects without a body.
  • Loading branch information...
as016194 committed Apr 5, 2012
1 parent b515d53 commit c553ce6257088b2d79597b0185f19f8dfde46dcf
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/geminabox_client.rb
View
@@ -28,7 +28,7 @@ def url_for(path)
def push(gemfile)
response = http_client.post(url_for(:upload), {'file' => File.open(gemfile, "rb")}, {'Accept' => 'text/plain'})
- if response.status < 400
+ if response.status < 300
response.body
else
raise GeminaboxClient::Error, "Error (#{response.code} received)\n\n#{response.body}"

0 comments on commit c553ce6

Please sign in to comment.