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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bdfc287d2ce5059a380ec106d67d325373c82f98f186821db0913dde4e037eb
4
- data.tar.gz: c228edf267188d832b780c78b10290af7b8d218245ce298f8ee74f8e959578c0
3
+ metadata.gz: 14fce520edc9365e1e59ffe1b6d374b22f29e140b72b3c8f3ae9622d01e4c833
4
+ data.tar.gz: a90d2fe577e3838e290d715edca6928a715b7e7ed042046b6cc0f166df102840
5
5
  SHA512:
6
- metadata.gz: 3549437af655b05ab057f181be9560728317f920b4739dd83e8c2072b578ef28cbb620ab799b02687b0764aeee4832eb80fc4f134c047e26a020ceea02f00dec
7
- data.tar.gz: b54dbb408fd7a60c652dec0d8798bb8b4d8c5600aeca0cf299c7267bf70eee99dcf7fa11f9347bd1430aa17ae860d0e283d77ba6e42f1f8548180b59638c5c8f
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 (since it will exclude unlisted
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
- response = Excon.get(
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.8
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-08 00:00:00.000000000 Z
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.8
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.8
26
+ version: 0.108.9
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement