dependabot-common 0.183.0 → 0.186.0

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: fc6c5c815952b755fe062f6d8dcaf0bbecfa5f0389f6b793d2cb28ee9f658374
4
- data.tar.gz: f0aa19cb14cf0f583654bfb4b690789f0a6a3c9d425dc74d49b1a51c5037cf0d
3
+ metadata.gz: 33eecfa39f6608119020cfa0e524c3e2fc2fb55846e3dbfa2c538f9955532c2c
4
+ data.tar.gz: 543761b8d4f265889d799a72bf6fd8b25ac7454086096a1e47995968df33e141
5
5
  SHA512:
6
- metadata.gz: 2f586d881a78ec9b173200493fad7e5dd2c885618a6d3234c2bb867ca1f090812762d3478698f772f3a7ec2434e2036c774ca6cd4fc4727ff3597647f0a74f85
7
- data.tar.gz: a4878c0032c3a8ba309970b2a7deef30768fb299d4b837940fb6e677ac893653f877bb5effa696b2522bb55e39f03a7fc9d2ce532dce034ab15f2e8a1c606f9f
6
+ metadata.gz: e27eb207877d7d6efe953bf8c79410dae87c1ac64f62a97fc9610bd282bc38f8266eeb66a80107e21eb84c82724554e329ae5eab75746497d2d62b30c53333ca
7
+ data.tar.gz: 8533e3c311c4f92f4292478587d8d9b63507d760272e2e0147192bc076b90e30c7310b59555ea86036a41ac7c512a9aff3b3a9b3e4b99d5c28cca443122f4edb
@@ -160,7 +160,8 @@ module Dependabot
160
160
  url,
161
161
  user: credentials&.fetch("username", nil),
162
162
  password: credentials&.fetch("password", nil),
163
- idempotent: true,
163
+ # Setting to false to prevent Excon retries, use BitbucketWithRetries for retries.
164
+ idempotent: false,
164
165
  **Dependabot::SharedHelpers.excon_defaults(
165
166
  headers: auth_header
166
167
  )
@@ -446,7 +446,13 @@ module Dependabot
446
446
  )
447
447
  end
448
448
 
449
- Base64.decode64(tmp.content).force_encoding("UTF-8").encode
449
+ if tmp.content == ""
450
+ # The file may have exceeded the 1MB limit
451
+ # see https://github.blog/changelog/2022-05-03-increased-file-size-limit-when-retrieving-file-contents-via-rest-api/
452
+ github_client.contents(repo, path: path, ref: commit, accept: "application/vnd.github.v3.raw")
453
+ else
454
+ Base64.decode64(tmp.content).force_encoding("UTF-8").encode
455
+ end
450
456
  rescue Octokit::Forbidden => e
451
457
  raise unless e.message.include?("too_large")
452
458
 
@@ -48,7 +48,6 @@ module Dependabot
48
48
 
49
49
  attr_reader :url, :credentials
50
50
 
51
- # rubocop:disable Metrics/PerceivedComplexity
52
51
  def fetch_upload_pack_for(uri)
53
52
  response = fetch_raw_upload_pack_for(uri)
54
53
  return response.body if response.status == 200
@@ -70,15 +69,10 @@ module Dependabot
70
69
 
71
70
  raise Dependabot::GitDependenciesNotReachable, [uri]
72
71
  rescue Excon::Error::Socket, Excon::Error::Timeout
73
- retry_count ||= 0
74
- retry_count += 1
75
-
76
- sleep(rand(0.9)) && retry if retry_count <= 2 && uri.match?(KNOWN_HOSTS)
77
72
  raise if uri.match?(KNOWN_HOSTS)
78
73
 
79
74
  raise Dependabot::GitDependenciesNotReachable, [uri]
80
75
  end
81
- # rubocop:enable Metrics/PerceivedComplexity
82
76
 
83
77
  def fetch_raw_upload_pack_for(uri)
84
78
  url = service_pack_uri(uri)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.183.0"
4
+ VERSION = "0.186.0"
5
5
  end
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.183.0
4
+ version: 0.186.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-29 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -226,16 +226,30 @@ dependencies:
226
226
  name: debase
227
227
  requirement: !ruby/object:Gem::Requirement
228
228
  requirements:
229
- - - "~>"
229
+ - - '='
230
230
  - !ruby/object:Gem::Version
231
- version: 0.2.4.1
231
+ version: 0.2.3
232
232
  type: :development
233
233
  prerelease: false
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  requirements:
236
- - - "~>"
236
+ - - '='
237
+ - !ruby/object:Gem::Version
238
+ version: 0.2.3
239
+ - !ruby/object:Gem::Dependency
240
+ name: debase-ruby_core_source
241
+ requirement: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - '='
244
+ - !ruby/object:Gem::Version
245
+ version: 0.10.14
246
+ type: :development
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ requirements:
250
+ - - '='
237
251
  - !ruby/object:Gem::Version
238
- version: 0.2.4.1
252
+ version: 0.10.14
239
253
  - !ruby/object:Gem::Dependency
240
254
  name: debug
241
255
  requirement: !ruby/object:Gem::Requirement
@@ -312,14 +326,14 @@ dependencies:
312
326
  requirements:
313
327
  - - "~>"
314
328
  - !ruby/object:Gem::Version
315
- version: 1.27.0
329
+ version: 1.28.2
316
330
  type: :development
317
331
  prerelease: false
318
332
  version_requirements: !ruby/object:Gem::Requirement
319
333
  requirements:
320
334
  - - "~>"
321
335
  - !ruby/object:Gem::Version
322
- version: 1.27.0
336
+ version: 1.28.2
323
337
  - !ruby/object:Gem::Dependency
324
338
  name: ruby-debug-ide
325
339
  requirement: !ruby/object:Gem::Requirement