dependabot-python 0.98.52 → 0.98.53

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: cfa6b7afe25c99296cfebb1bd098ee133994b86414094c4a522e74af01371a4a
4
- data.tar.gz: e8928e8dadb1a2d139a724948519eb0975686fade6d698a1442ae85a0216ff62
3
+ metadata.gz: 7c803615e0e7fde5db7129591671643c7cb7d6ab137790a7d0e272d856de35ef
4
+ data.tar.gz: 025aa1ffbdca5ddfd42e9b2bf334e0fe8761d5c156b0144bac28d532a9098323
5
5
  SHA512:
6
- metadata.gz: dcfccaaa4cb7acd47bcf4d791d4753a07aa1cb9e34df1081c9f88eabb6a4a1405ed42d8bc6632a0855a5dd8f57e88aa73b71182c2e5443270e88e46b0ae4a6ca
7
- data.tar.gz: dfc3eb95f4c7ef6730ff6075572555056aef3166c06c6bd7b1ffa10c3be64bbdab376cdaad01ea4d6ae1bacd5ca8b21cdd373bc1a5960d8c741a76e992127a11
6
+ metadata.gz: c71022e72ed94b36b58f63ba51e12adc5a94d7d4dd30915fb62b263433519fbddc67c761177d491058bae3991f0a8f022d18f0bed4459ff48e553ee60ed8f839
7
+ data.tar.gz: d508823112589ce15ed3ba29fd78d61a7313eeb72e0c0859523cf4ea9c03a06393cdefd3b5d1a63c92a2a137ef494cdff3b5ed6849285e808f4457aba1a6ed3e
@@ -238,18 +238,25 @@ module Dependabot
238
238
 
239
239
  cleaned_url = url.gsub(%r{#{ENVIRONMENT_VARIABLE_REGEX}/?}, "")
240
240
  authed_url = authed_base_url(cleaned_url)
241
- return authed_url unless authed_url == cleaned_url
241
+ return authed_url if credential_for(cleaned_url)
242
242
 
243
243
  raise PrivateSourceAuthenticationFailure, url
244
244
  end
245
245
 
246
246
  def authed_base_url(base_url)
247
- cred = credentials.
248
- select { |c| c["type"] == "python_index" }.
249
- find { |c| c.fetch("index-url").include?(base_url) }
247
+ cred = credential_for(base_url)
250
248
  return base_url unless cred
251
249
 
252
- AuthedUrlBuilder.authed_url(credential: cred)
250
+ AuthedUrlBuilder.authed_url(credential: cred).gsub(%r{/*$}, "") + "/"
251
+ end
252
+
253
+ def credential_for(url)
254
+ credentials.
255
+ select { |c| c["type"] == "python_index" }.
256
+ find do |c|
257
+ cred_url = c.fetch("index-url").gsub(%r{/*$}, "") + "/"
258
+ cred_url.include?(url)
259
+ end
253
260
  end
254
261
 
255
262
  def ignore_reqs
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.98.52
4
+ version: 0.98.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.98.52
19
+ version: 0.98.53
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.98.52
26
+ version: 0.98.53
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement