brew-github-bottles 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/homebrew/github/bottles.rb +8 -13
- data/lib/homebrew/github/bottles/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: c230cb586c65b3fdcb59346869b08fc7ae302a9a
|
4
|
+
data.tar.gz: f9cb6a91b32cfa7586b979189983e52141468ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dca3f3ce80fd15ffaae234b9e005be4fa66e4c566f420b7776ea6481e87081e679b6e79bb33b6968d7849042b515019e4a035cca078484891893c60e67b4d75
|
7
|
+
data.tar.gz: f160c3440008a732fc37b655746a19faabe4bc4c4b57e0075dea8c52302f9a74955256248348328a9dbf68960ed65449011b5279921d0e63acf6655b8ae4354b
|
data/.gitignore
CHANGED
@@ -106,18 +106,15 @@ class GithubBottle
|
|
106
106
|
ohai "brew-github-bottles: Downloading #{asset_uri}"
|
107
107
|
|
108
108
|
# Get the asset from github
|
109
|
-
|
110
|
-
req = Net::HTTP::Get.new(uri)
|
109
|
+
req = Net::HTTP::Get.new(asset_uri)
|
111
110
|
|
112
|
-
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
req["Accept"] = "application/octet-stream"
|
117
|
-
req
|
111
|
+
unless @authorization.nil?
|
112
|
+
req["Authorization"] = @authorization
|
118
113
|
end
|
119
114
|
|
120
|
-
|
115
|
+
req["Accept"] = "application/octet-stream"
|
116
|
+
|
117
|
+
res = send_request(asset_uri, req)
|
121
118
|
|
122
119
|
data = ""
|
123
120
|
begin
|
@@ -125,10 +122,8 @@ class GithubBottle
|
|
125
122
|
when Net::HTTPSuccess then
|
126
123
|
data = res.body
|
127
124
|
when Net::HTTPRedirection then
|
128
|
-
# Follow the redirect
|
129
|
-
|
130
|
-
new_req = build_request(redirect_uri)
|
131
|
-
res = send_request(redirect_uri, new_req)
|
125
|
+
# Follow the redirect, which already includes the credentials
|
126
|
+
res = Net::HTTP.get_response(URI(res['location']))
|
132
127
|
unless Net::HTTPOK === res
|
133
128
|
raise
|
134
129
|
end
|