dependabot-python 0.98.39 → 0.98.40

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: 7f72cc32a0fa744bc24bf0fc273116cf4803ded44e617c7d76d96425b8eca596
4
- data.tar.gz: a1a5306b74333826c060cc3c6e860ce5b99d411926247a5800bb0ec64a343df6
3
+ metadata.gz: f2149254c88cad4a314ed5079edc0f4404f277b805b96655bd84318f489d26c6
4
+ data.tar.gz: 8a6f319934bf0838fe1cf07118080f784c39e7e0895ed1a79144baef3b8775d7
5
5
  SHA512:
6
- metadata.gz: e818c8cb4ad6801d74dd8fc202751d764e889fdd2460523fcda280f363e6b32f6fb507216233a79d384bff1884aa8dcb5a296807e4e3f0b9355b9bb028da1ba8
7
- data.tar.gz: 0ae787c798f0eaf861dc88b41cd39edc6cf3ac0f2d89d1d1dee1de23092cb9ae753d97c038f46937bfec696e44faad4f89b501401c2162b4b444b8fd2e0564f8
6
+ metadata.gz: 22949505d1565c1369b42f2b157631483171ee87f9b8a03459a04b1b98e9b4ebc299612b00010fcd94f6fba24f2b51419fa1b572edd7a2cdf0f5ef02748d3af1
7
+ data.tar.gz: 2e27c9d438ab873b0ec6541af22a5f94bf4368adcbc90beb42b82079c420b7a77df084b9345ffa0d3ed0b49a6f12d70de71c965efc912e127829aa5bf2170090
@@ -212,23 +212,17 @@ module Dependabot
212
212
 
213
213
  def clean_check_and_remove_environment_variables(url)
214
214
  url = url.strip.gsub(%r{/*$}, "") + "/"
215
- return url unless url.match?(ENVIRONMENT_VARIABLE_REGEX)
216
-
217
- config_variable_urls =
218
- [
219
- config_variable_index_urls[:main],
220
- *config_variable_index_urls[:extra]
221
- ].
222
- compact.
223
- map { |u| u.strip.gsub(%r{/*$}, "") + "/" }
224
-
225
- regexp = url.split(ENVIRONMENT_VARIABLE_REGEX).
226
- map { |part| Regexp.quote(part) }.
227
- join(".+")
228
- authed_url = config_variable_urls.find { |u| u.match?(regexp) }
229
- return authed_url if authed_url
230
-
231
- raise PrivateSourceAuthenticationFailure, url
215
+ url = url.gsub(%r{#{ENVIRONMENT_VARIABLE_REGEX}/?}, "")
216
+ authed_base_url(url)
217
+ end
218
+
219
+ def authed_base_url(base_url)
220
+ cred = credentials.
221
+ select { |c| c["type"] == "python_index" }.
222
+ find { |c| c.fetch("index-url").include?(base_url) }
223
+ return base_url unless cred
224
+
225
+ AuthedUrlBuilder.authed_url(credential: cred)
232
226
  end
233
227
 
234
228
  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.39
4
+ version: 0.98.40
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.39
19
+ version: 0.98.40
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.39
26
+ version: 0.98.40
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement