dependabot-common 0.150.0 → 0.153.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: 0d839b2dabda4fd931448e4dfbf13de96683da1629270179c4a3276c35adb987
4
- data.tar.gz: 4fe52c4cef7b3018809f2c41dfebac0d164af41934a9ba14426fae9fca5f0f26
3
+ metadata.gz: b925e841b375add05925858919a097192f19103ecb0c8dad020e9715421cccfc
4
+ data.tar.gz: cac534a9f4284d6b32a9821974be5004a7b8eaa8074e35de672334cce0e1d2fd
5
5
  SHA512:
6
- metadata.gz: 2b5a01835060f2ea548d06d71efe4266a73aa482333c13e79bcb4f1f2b952333c8ded5a7dec37b90a6ca91cd761b8d639e6357ab4013b05734366a497cd18ced
7
- data.tar.gz: 254c304d3f7160fe36a817d385ca0a557ba50551305bb19ac378a648e1cbe86bebd3bfcb79af6dc9607c89615aac4eef44cb3f1d0f97d7d0b4e49c8cd50cd3cd
6
+ metadata.gz: edcfde9f70df1bccbb99069846d8edfdfac6d8cbf30c9560a4bceb9f20548dec39c6cfdca6cb38bdeb332825bd23ed5b9e272be2bd646b3b0daf0cc1dbe15eb3
7
+ data.tar.gz: a7d41315db7c663d2ec22aa91a61d80ca39f4e0ad4b59eb1ca75733289a85b234a350f72701368acebbcdb29411c96b1a793f2811b8e029e775e01426e051801
@@ -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.150.0"
4
+ VERSION = "0.153.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.150.0
4
+ version: 0.153.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-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport