dependabot-common 0.98.31 → 0.98.32

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: acad640cd551e4c5ee343d17311bac5cdfc4ad10807aa90f980b26299e87e9e1
4
- data.tar.gz: 70f12e0ac10bc80c53a319e5222cfc94a554e8b344d654414fbbf886bf259cec
3
+ metadata.gz: 25c0e74464e5a5fc1f0dfe7c799af9939d1636c948d3341413762f9967d7221c
4
+ data.tar.gz: 7b6162eec439ecd50dc0d19cd22b1c5fcd0db850912b1abc79ac35d59e330e2e
5
5
  SHA512:
6
- metadata.gz: f7ac6b7e472065c2513514a5544681cad0392d7a54b64b6168d11cfdf9189cb52974d6bcc9c3197c4df25aaa39fdb891589f6ebe13e237ec9d19e75fc0806097
7
- data.tar.gz: 33701004d42ae340edb275da8bdb6780a271f99f74ba34af35705fb9996f7e161c17e242a507457bf33c6c9972ff977c7753313b76c98f5fe5fa6ef9cf9c4f20
6
+ metadata.gz: 433eb08f26762e5fee3447f759d556aea736fe4061bcd415a38e426d9ead8b92f931c898ab964a6f2761a712d463921c58475076d40992717ed35b9baa2aa963
7
+ data.tar.gz: 9a7c393a0b76f62495248073fe670838d4f7c4663790df128524667ce1e1fc02e9852bcd65471ff087e6ed30b9b697aec9d93e94f6035ee340060956c89207b5
@@ -80,8 +80,8 @@ module Dependabot
80
80
  def get(url)
81
81
  response = Excon.get(
82
82
  url,
83
- user: credentials&.fetch("username"),
84
- password: credentials&.fetch("password"),
83
+ user: credentials&.fetch("username", nil),
84
+ password: credentials&.fetch("password", nil),
85
85
  idempotent: true,
86
86
  **Dependabot::SharedHelpers.excon_defaults
87
87
  )
@@ -30,6 +30,7 @@ module Dependabot
30
30
  credentials.
31
31
  select { |cred| cred["type"] == "git_source" }.
32
32
  select { |cred| cred["host"] == source.hostname }.
33
+ select { |cred| cred["password"] }.
33
34
  map { |cred| cred.fetch("password") }
34
35
 
35
36
  new(
@@ -43,6 +44,7 @@ module Dependabot
43
44
  credentials.
44
45
  select { |cred| cred["type"] == "git_source" }.
45
46
  select { |cred| cred["host"] == "github.com" }.
47
+ select { |cred| cred["password"] }.
46
48
  map { |cred| cred.fetch("password") }
47
49
 
48
50
  new(access_tokens: access_tokens)
@@ -5,9 +5,7 @@ require "gitlab"
5
5
  module Dependabot
6
6
  module Clients
7
7
  class GitlabWithRetries
8
- RETRYABLE_ERRORS = [
9
- Gitlab::Error::BadGateway
10
- ].freeze
8
+ RETRYABLE_ERRORS = [Gitlab::Error::BadGateway].freeze
11
9
 
12
10
  #######################
13
11
  # Constructor methods #
@@ -17,6 +15,7 @@ module Dependabot
17
15
  access_token =
18
16
  credentials.
19
17
  select { |cred| cred["type"] == "git_source" }.
18
+ select { |cred| cred["password"] }.
20
19
  find { |cred| cred["host"] == source.hostname }&.
21
20
  fetch("password")
22
21
 
@@ -30,6 +29,7 @@ module Dependabot
30
29
  access_token =
31
30
  credentials.
32
31
  select { |cred| cred["type"] == "git_source" }.
32
+ select { |cred| cred["password"] }.
33
33
  find { |cred| cred["host"] == "gitlab.com" }&.
34
34
  fetch("password")
35
35
 
@@ -98,7 +98,7 @@ module Dependabot
98
98
  if bare_uri.match?(%r{[^/]+:[^/]+@})
99
99
  # URI already has authentication details
100
100
  "https://#{bare_uri}"
101
- elsif cred
101
+ elsif cred&.fetch("username", nil) && cred&.fetch("password", nil)
102
102
  # URI doesn't have authentication details, but we have credentials
103
103
  auth_string = "#{cred.fetch('username')}:#{cred.fetch('password')}"
104
104
  "https://#{auth_string}@#{bare_uri}"
@@ -179,7 +179,8 @@ module Dependabot
179
179
 
180
180
  github_credentials = credentials.
181
181
  select { |c| c["type"] == "git_source" }.
182
- select { |c| c["host"] == "github.com" }
182
+ select { |c| c["host"] == "github.com" }.
183
+ select { |c| c["password"] || c["username"] }
183
184
 
184
185
  # If multiple credentials are specified for github.com, pick the one that
185
186
  # *isn't* just an app token (since it must have been added deliberately)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dependabot
4
- VERSION = "0.98.31"
4
+ VERSION = "0.98.32"
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.98.31
4
+ version: 0.98.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-22 00:00:00.000000000 Z
11
+ date: 2019-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-ecr