dependabot-nuget 0.108.8 → 0.108.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dependabot/nuget/update_checker/version_finder.rb +23 -14
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14fce520edc9365e1e59ffe1b6d374b22f29e140b72b3c8f3ae9622d01e4c833
|
4
|
+
data.tar.gz: a90d2fe577e3838e290d715edca6928a715b7e7ed042046b6cc0f166df102840
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5eaf393a40180d3876f18d7ddc140022436deb8e57162b2937b5b9209abd7a45728ae9e2efdc2dd820a74b4c4ffc388689fed67d347caf3e46b940fbe165cc
|
7
|
+
data.tar.gz: d4e8108c8e651e30317c495b3247da0e74a83bd04a3dcf6b981d381613553cc25f52c80ca5ec84353a10868653fd2d653b4ca16273126b3b80d7f3b1e8d525b5
|
@@ -216,21 +216,10 @@ module Dependabot
|
|
216
216
|
end
|
217
217
|
|
218
218
|
def versions_for_v3_repository(repository_details)
|
219
|
-
# If we have a search URL we use it
|
220
|
-
# versions)
|
219
|
+
# If we have a search URL that returns results we use it
|
220
|
+
# (since it will exclude unlisted versions)
|
221
221
|
if repository_details[:search_url]
|
222
|
-
|
223
|
-
repository_details[:search_url],
|
224
|
-
headers: repository_details[:auth_header],
|
225
|
-
idempotent: true,
|
226
|
-
**excon_defaults
|
227
|
-
)
|
228
|
-
return unless response.status == 200
|
229
|
-
|
230
|
-
JSON.parse(response.body).fetch("data").
|
231
|
-
find { |d| d.fetch("id").casecmp(sanitized_name).zero? }&.
|
232
|
-
fetch("versions")&.
|
233
|
-
map { |d| d.fetch("version") }
|
222
|
+
fetch_versions_from_search_url(repository_details)
|
234
223
|
# Otherwise, use the versions URL
|
235
224
|
elsif repository_details[:versions_url]
|
236
225
|
response = Excon.get(
|
@@ -245,6 +234,26 @@ module Dependabot
|
|
245
234
|
end
|
246
235
|
end
|
247
236
|
|
237
|
+
def fetch_versions_from_search_url(repository_details)
|
238
|
+
response = Excon.get(
|
239
|
+
repository_details[:search_url],
|
240
|
+
headers: repository_details[:auth_header],
|
241
|
+
idempotent: true,
|
242
|
+
**excon_defaults
|
243
|
+
)
|
244
|
+
return unless response.status == 200
|
245
|
+
|
246
|
+
JSON.parse(response.body).fetch("data").
|
247
|
+
find { |d| d.fetch("id").casecmp(sanitized_name).zero? }&.
|
248
|
+
fetch("versions")&.
|
249
|
+
map { |d| d.fetch("version") }
|
250
|
+
rescue Excon::Error::Timeout, Excon::Error::Socket
|
251
|
+
repo_url = repository_details[:repository_url]
|
252
|
+
raise if repo_url == RepositoryFinder::DEFAULT_REPOSITORY_URL
|
253
|
+
|
254
|
+
raise PrivateSourceTimedOut, repo_url
|
255
|
+
end
|
256
|
+
|
248
257
|
def dependency_urls
|
249
258
|
@dependency_urls ||=
|
250
259
|
RepositoryFinder.new(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dependabot-nuget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.108.
|
4
|
+
version: 0.108.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dependabot-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.108.
|
19
|
+
version: 0.108.9
|
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.108.
|
26
|
+
version: 0.108.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|