dependabot-cargo 0.106.23 → 0.106.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/cargo/update_checker/version_resolver.rb +43 -24
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc6e9304f7db40025107361697ca2bca51127fa6ad403788017766031806679d
|
4
|
+
data.tar.gz: e0183664d01e57af16159dac69112fa2a1a7f89ad499fed2107e8d67fa30db23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca603be5112e1636948300ab9bb4dfb93ba7fa72b934d48ae77aec350d5e840e8e92d8c4a62088583f5dc570a29c1996cffce8f1fcccc3ac9cd4809931bd1130
|
7
|
+
data.tar.gz: 4e8aca8abc6e91b8de79295e48b5570a80ae77dbd3b9c033f38069565f007f0d684fc1463e1a1bacf8c91cf193b8661f43ac525abeae31c3a37e1f49d0a40bfc
|
@@ -186,11 +186,19 @@ module Dependabot
|
|
186
186
|
|
187
187
|
if error.message.include?("authenticate when downloading repo") ||
|
188
188
|
error.message.include?("HTTP 200 response: got 401")
|
189
|
-
raise if unreachable_git_urls.none?
|
190
|
-
|
191
189
|
# Check all dependencies for reachability (so that we raise a
|
192
190
|
# consistent error)
|
193
|
-
|
191
|
+
urls = unreachable_git_urls
|
192
|
+
|
193
|
+
if urls.none?
|
194
|
+
url = error.message.match(UNABLE_TO_UPDATE).
|
195
|
+
named_captures.fetch("url").split(/[#?]/).first
|
196
|
+
raise if reachable_git_urls.include?(url)
|
197
|
+
|
198
|
+
urls << url
|
199
|
+
end
|
200
|
+
|
201
|
+
raise Dependabot::GitDependenciesNotReachable, urls
|
194
202
|
end
|
195
203
|
|
196
204
|
if error.message.match?(BRANCH_NOT_FOUND_REGEX)
|
@@ -232,30 +240,41 @@ module Dependabot
|
|
232
240
|
# rubocop:enable Metrics/MethodLength
|
233
241
|
|
234
242
|
def unreachable_git_urls
|
235
|
-
@unreachable_git_urls
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
select do |dep|
|
245
|
-
checker = GitCommitChecker.new(
|
246
|
-
dependency: dep,
|
247
|
-
credentials: credentials
|
248
|
-
)
|
249
|
-
|
250
|
-
checker.git_dependency? && !checker.git_repo_reachable?
|
251
|
-
end
|
243
|
+
return @unreachable_git_urls if defined?(@unreachable_git_urls)
|
244
|
+
|
245
|
+
@unreachable_git_urls = []
|
246
|
+
@reachable_git_urls = []
|
247
|
+
|
248
|
+
dependencies = FileParser.new(
|
249
|
+
dependency_files: original_dependency_files,
|
250
|
+
source: nil
|
251
|
+
).parse
|
252
252
|
|
253
|
-
|
254
|
-
|
255
|
-
|
253
|
+
dependencies.each do |dep|
|
254
|
+
checker = GitCommitChecker.new(
|
255
|
+
dependency: dep,
|
256
|
+
credentials: credentials
|
257
|
+
)
|
258
|
+
next unless checker.git_dependency?
|
259
|
+
|
260
|
+
url = dep.requirements.find { |r| r.dig(:source, :type) == "git" }.
|
256
261
|
fetch(:source).fetch(:url)
|
257
|
-
|
262
|
+
|
263
|
+
if checker.git_repo_reachable?
|
264
|
+
@reachable_git_urls << url
|
265
|
+
else
|
266
|
+
@unreachable_git_urls << url
|
258
267
|
end
|
268
|
+
end
|
269
|
+
|
270
|
+
@unreachable_git_urls
|
271
|
+
end
|
272
|
+
|
273
|
+
def reachable_git_urls
|
274
|
+
return @reachable_git_urls if defined?(@reachable_git_urls)
|
275
|
+
|
276
|
+
unreachable_git_urls
|
277
|
+
@reachable_git_urls
|
259
278
|
end
|
260
279
|
|
261
280
|
def resolvability_error?(message)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-cargo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.106.
|
4
|
+
version: 0.106.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.106.
|
19
|
+
version: 0.106.24
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.106.
|
26
|
+
version: 0.106.24
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|