dependabot-common 0.149.5 → 0.152.1

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: c97e5c4cf89f184d4d98a05ea896a8d14488f69690c686fc4e5a207f17e46ea9
4
- data.tar.gz: 2bc1152ae4c1ed87f49928e72d1ff99909de67b7c37c7c11a3902d33cf7e1e7e
3
+ metadata.gz: 227ecf39344ff4ccaf9223ea73f91c38a3bfb93df044cf9fba7edb22a9be4f47
4
+ data.tar.gz: 6c380dfde76fc9675b88c4ed278dc9ee04fb7fd66d204a7468c2a88bfa0f94f6
5
5
  SHA512:
6
- metadata.gz: aa9def953c744302de0e70a1a72013b6a645d0f011efc679cddfcdcc8f40f76b17f411adb6e6f972d4095e43d4433d4aee81ac3ebc88a3bec6f60efea06b2e47
7
- data.tar.gz: d167919e92a83512f160f12a3a040a475773da4ac5c8e6a9a8955bc826007a0f97937a60615468305c426839f614d93f40b7231569508ab54fc4cf0ef3e53277
6
+ metadata.gz: 4fa7f05b9e9ed5a3fc1f54fa11b0f77c1c4042f885024d0f87e657a825c06486c6c50a5a45ea69f04a9e4ffac9e377cc4606165b0d477241bb2b699b5bfea84a
7
+ data.tar.gz: 930803926c2e8f6d2f353ae3fb7e1daa47aced526526d47a94e34ae215496b310e20d567f055aa98499558f55a992e09c1b70ada36986206e1153c04c486b901
@@ -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.149.5"
4
+ VERSION = "0.152.1"
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.149.5
4
+ version: 0.152.1
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-02 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport