dependabot-common 0.151.0 → 0.154.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: e04098d7622d3fa70b58544f05bc8b8ad9373c4726255dbdeeab31645bfbb849
4
- data.tar.gz: 642eedb2c4b3fcb66609089b55e14f1feb10c17de66426918f527a4d9f4b96e2
3
+ metadata.gz: af277195b0ae65a3c391db6e6acd0102be4a47bd135950789353db2487fda651
4
+ data.tar.gz: 8d03fd259755386024fd8c65352e092047692dc85b2da443843434db9fd33ac1
5
5
  SHA512:
6
- metadata.gz: 8812a9fa2f9d493978f4fc1e684fdb3bda10becc0dda8200e356cb8e9c663302988a219eaa72adb5b665d95230a23d16e45075b695bdb56bf4f4110610f4997a
7
- data.tar.gz: 60439875ef3a69d1fa81f9f1222f61b015550e99e7c1a28df09cb709413de97d8c0147976bbe699b084eca690b3f9b1615d6ec7c06ec7439cb9a8e67a06a59d5
6
+ metadata.gz: 63321eba26689fa32d13618518f77aad5f132bcd6b632adc5b3d3c334069dc4c80428e662dd2feaa2778c67e718878f8b17217e3e79f6de3e47a18d146ea260c
7
+ data.tar.gz: 45a8f791bb0b0a141777ebc4f7892e198b7bd928448aba15c7222c47b97daf4b8967c7831a676b9620d15b4fca8ea029d73b90ca8ce2b8dee92e771613672a04
@@ -234,20 +234,29 @@ module Dependabot
234
234
  end
235
235
 
236
236
  def post(url, json)
237
- response = Excon.post(
238
- url,
239
- body: json,
240
- user: credentials&.fetch("username", nil),
241
- password: credentials&.fetch("password", nil),
242
- idempotent: true,
243
- **SharedHelpers.excon_defaults(
244
- headers: auth_header.merge(
245
- {
246
- "Content-Type" => "application/json"
247
- }
237
+ response = nil
238
+
239
+ retry_connection_failures do
240
+ response = Excon.post(
241
+ url,
242
+ body: json,
243
+ user: credentials&.fetch("username", nil),
244
+ password: credentials&.fetch("password", nil),
245
+ idempotent: true,
246
+ **SharedHelpers.excon_defaults(
247
+ headers: auth_header.merge(
248
+ {
249
+ "Content-Type" => "application/json"
250
+ }
251
+ )
248
252
  )
249
253
  )
250
- )
254
+
255
+ raise InternalServerError if response.status == 500
256
+ raise BadGateway if response.status == 502
257
+ raise ServiceNotAvailable if response.status == 503
258
+ end
259
+
251
260
  raise NotFound if response.status == 404
252
261
 
253
262
  response
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.151.0"
4
+ VERSION = "0.154.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.151.0
4
+ version: 0.154.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-07 00:00:00.000000000 Z
11
+ date: 2021-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport