gem_version_check 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gem_version_check/lockfile_fetcher.rb +6 -5
- data/lib/gem_version_check/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: ca4555e0f6aa6c50880e033511160aff7734589e
|
4
|
+
data.tar.gz: 920cf30fe393e38b8c5ce21cb5bd33f2e1442d43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9469d853daa9133b2febff950eb91631b6b3e3d70084841acee92dda12b342eda56c408b2d472b4ac7151754566eb254bed924dc20c91da4fd0a2f9383d47231
|
7
|
+
data.tar.gz: e78b2e6557f2d8260981a297ce417eaa6c0c4730fbe8874091cc8b911d0bb50cffbaca1711bab57d1d8fb219f3da442b257c2f3bdb8ea0894cc937ad98d23b14
|
@@ -28,13 +28,11 @@ module GemVersionCheck
|
|
28
28
|
# github enterprise does not redirect
|
29
29
|
# TODO: change if github enterprise redirects too
|
30
30
|
def gemfile_lock_url
|
31
|
-
|
31
|
+
host = GemVersionCheck.configuration.github_host
|
32
32
|
if GemVersionCheck.configuration.github_host == "github.com"
|
33
|
-
"https://raw.#{
|
34
|
-
elsif token
|
35
|
-
"https://#{GemVersionCheck.configuration.github_host}/raw/#{@project}/master/Gemfile.lock?token=#{token}"
|
33
|
+
"https://raw.#{host}/#{@project}/master/Gemfile.lock"
|
36
34
|
else
|
37
|
-
"https://#{
|
35
|
+
"https://#{host}/raw/#{@project}/master/Gemfile.lock"
|
38
36
|
end
|
39
37
|
end
|
40
38
|
|
@@ -42,6 +40,9 @@ module GemVersionCheck
|
|
42
40
|
http = Net::HTTP.new(uri.host, uri.port)
|
43
41
|
http.use_ssl = true if uri.scheme == 'https'
|
44
42
|
request = Net::HTTP::Get.new(uri.request_uri)
|
43
|
+
if token = GemVersionCheck.configuration.token
|
44
|
+
request.basic_auth token, 'x-oauth-basic'
|
45
|
+
end
|
45
46
|
response = http.request(request)
|
46
47
|
if response.code == "200"
|
47
48
|
response.body
|