dependabot-common 0.115.2 → 0.116.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 100592e19e79ca976be5212fd173dae233cb216d37057632382120d7717edcf9
|
4
|
+
data.tar.gz: 605473cb4148339c77bd604ef8c2b1bff894a06f09811661f9ef8ae7446766f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5e0befccd09c82e2fbce6b6fcbc80d4c6f92fa379ec88bf6e318c8d77f6098e88c75520711d4bab28b597f1552307d5ed452ccf8622f2057dd1f19fca10988
|
7
|
+
data.tar.gz: deb8403fb9af1c6ca9c2477a78e6145738f409699b3a97b2951642f53af33d0da0f7182303bae5cb22ff017d388bab8f51b973e3c45d709489441712f805785e
|
@@ -156,16 +156,26 @@ module Dependabot
|
|
156
156
|
cred = credentials.select { |c| c["type"] == "git_source" }.
|
157
157
|
find { |c| bare_uri.start_with?(c["host"]) }
|
158
158
|
|
159
|
+
scheme = scheme_for_uri(uri)
|
160
|
+
|
159
161
|
if bare_uri.match?(%r{[^/]+:[^/]+@})
|
160
162
|
# URI already has authentication details
|
161
|
-
"
|
163
|
+
"#{scheme}://#{bare_uri}"
|
162
164
|
elsif cred&.fetch("username", nil) && cred&.fetch("password", nil)
|
163
165
|
# URI doesn't have authentication details, but we have credentials
|
164
166
|
auth_string = "#{cred.fetch('username')}:#{cred.fetch('password')}"
|
165
|
-
"
|
167
|
+
"#{scheme}://#{auth_string}@#{bare_uri}"
|
168
|
+
else
|
169
|
+
# No credentials, so just return the http(s) URI
|
170
|
+
"#{scheme}://#{bare_uri}"
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
def scheme_for_uri(uri)
|
175
|
+
if uri.match?(%r{^http://})
|
176
|
+
"http"
|
166
177
|
else
|
167
|
-
|
168
|
-
"https://#{bare_uri}"
|
178
|
+
"https"
|
169
179
|
end
|
170
180
|
end
|
171
181
|
|
@@ -62,9 +62,12 @@ module Dependabot
|
|
62
62
|
doc.walk do |node|
|
63
63
|
if node.type == :link && node.url.match?(GITHUB_REF_REGEX)
|
64
64
|
node.each do |subnode|
|
65
|
-
|
66
|
-
|
65
|
+
unless subnode.type == :text &&
|
66
|
+
subnode.string_content.match?(GITHUB_REF_REGEX)
|
67
|
+
next
|
68
|
+
end
|
67
69
|
|
70
|
+
last_match = subnode.string_content.match(GITHUB_REF_REGEX)
|
68
71
|
number = last_match.named_captures.fetch("number")
|
69
72
|
repo = last_match.named_captures.fetch("repo")
|
70
73
|
subnode.string_content = "#{repo}##{number}"
|
data/lib/dependabot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.116.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-codecommit
|
@@ -300,14 +300,14 @@ dependencies:
|
|
300
300
|
requirements:
|
301
301
|
- - "~>"
|
302
302
|
- !ruby/object:Gem::Version
|
303
|
-
version: 0.
|
303
|
+
version: 0.79.0
|
304
304
|
type: :development
|
305
305
|
prerelease: false
|
306
306
|
version_requirements: !ruby/object:Gem::Requirement
|
307
307
|
requirements:
|
308
308
|
- - "~>"
|
309
309
|
- !ruby/object:Gem::Version
|
310
|
-
version: 0.
|
310
|
+
version: 0.79.0
|
311
311
|
- !ruby/object:Gem::Dependency
|
312
312
|
name: vcr
|
313
313
|
requirement: !ruby/object:Gem::Requirement
|