avocado-docs 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avocado/uploader.rb +10 -0
- data/lib/avocado/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c9803affe7df740b852677f01fd979b84ee9417
|
4
|
+
data.tar.gz: b932d3d2b21c554b6bd77fcf6652770693cf4ef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efed4c0097e8d7576b1bee23328f86fcbfc8f9e281e2874633dd0db10a91789980db6659553897351b1098833884eea17b84c9a42c2c328761aa80259e927873
|
7
|
+
data.tar.gz: 95e5dd275e6343fb90fbde09ccc3dc1b7841fe9fd9ece68f8b985653f90f0f0e05d2a53a78ce19db85f4bd935cfe0bb0a3f350efd046541c536753c9dca180a6
|
data/lib/avocado/uploader.rb
CHANGED
@@ -16,6 +16,16 @@ module Avocado
|
|
16
16
|
net_request = Net::HTTP.new(uri.host, uri.port)
|
17
17
|
net_request.use_ssl = (uri.scheme == 'https')
|
18
18
|
net_request.start { |http| http.request(request) }
|
19
|
+
|
20
|
+
case response
|
21
|
+
when Net::HTTPSuccess then
|
22
|
+
response
|
23
|
+
when Net::HTTPRedirection then
|
24
|
+
location = response['location']
|
25
|
+
raise "Avocado was redirected to '#{location}', update your initializer!"
|
26
|
+
else
|
27
|
+
raise response.value
|
28
|
+
end
|
19
29
|
end
|
20
30
|
ensure
|
21
31
|
WebMock.disable_net_connect! if defined? WebMock
|
data/lib/avocado/version.rb
CHANGED