dependabot-python 0.107.44 → 0.107.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6374dc5aec985c18310a4c3cbbe12b9d3a829a8a81b5315019e3d5e1cf989bd4
|
4
|
+
data.tar.gz: 8e93a3bf1bc85a936a76bca68685aaa3a09e8eeb5169b6f94cc4ee7a844019b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c42ab69f01eef089c1966df4941363288929459ceef5d00b321ba258a66f5e4258265f579673dca774bfaa8ad3084639f90ddd189e9743cef396bc169c452b
|
7
|
+
data.tar.gz: 9f4639d8dd902c9df3aff4380d151ef553c1f7b8980e40f6b427578403d1db88b3abe1b784021f932ad9706bb667f88d9534284e0d5fd7de4ebc32316f12717d
|
@@ -5,6 +5,7 @@ require "toml-rb"
|
|
5
5
|
require "dependabot/python/file_parser"
|
6
6
|
require "dependabot/python/file_updater"
|
7
7
|
require "dependabot/python/authed_url_builder"
|
8
|
+
require "securerandom"
|
8
9
|
|
9
10
|
module Dependabot
|
10
11
|
module Python
|
@@ -97,7 +98,13 @@ module Dependabot
|
|
97
98
|
@config_variable_sources ||=
|
98
99
|
credentials.
|
99
100
|
select { |cred| cred["type"] == "python_index" }.
|
100
|
-
map
|
101
|
+
map do |c|
|
102
|
+
{
|
103
|
+
"url" => AuthedUrlBuilder.authed_url(credential: c),
|
104
|
+
"name" => SecureRandom.hex[0..3],
|
105
|
+
"default" => c["replaces-base"]
|
106
|
+
}.compact
|
107
|
+
end
|
101
108
|
end
|
102
109
|
|
103
110
|
def parsed_lockfile
|
@@ -14,6 +14,7 @@ require "dependabot/python/native_helpers"
|
|
14
14
|
require "dependabot/python/python_versions"
|
15
15
|
require "dependabot/python/authed_url_builder"
|
16
16
|
|
17
|
+
# rubocop:disable Metrics/ClassLength
|
17
18
|
module Dependabot
|
18
19
|
module Python
|
19
20
|
class UpdateChecker
|
@@ -239,6 +240,7 @@ module Dependabot
|
|
239
240
|
|
240
241
|
def updated_pyproject_content(updated_requirement:)
|
241
242
|
content = pyproject.content
|
243
|
+
content = add_private_sources(content)
|
242
244
|
content = sanitize_pyproject_content(content)
|
243
245
|
content = freeze_other_dependencies(content)
|
244
246
|
content = set_target_dependency_req(content, updated_requirement)
|
@@ -247,6 +249,7 @@ module Dependabot
|
|
247
249
|
|
248
250
|
def sanitized_pyproject_content
|
249
251
|
content = pyproject.content
|
252
|
+
content = add_private_sources(content)
|
250
253
|
content = sanitize_pyproject_content(content)
|
251
254
|
content
|
252
255
|
end
|
@@ -257,6 +260,12 @@ module Dependabot
|
|
257
260
|
sanitize
|
258
261
|
end
|
259
262
|
|
263
|
+
def add_private_sources(pyproject_content)
|
264
|
+
Python::FileUpdater::PyprojectPreparer.
|
265
|
+
new(pyproject_content: pyproject_content).
|
266
|
+
replace_sources(credentials)
|
267
|
+
end
|
268
|
+
|
260
269
|
def freeze_other_dependencies(pyproject_content)
|
261
270
|
Python::FileUpdater::PyprojectPreparer.
|
262
271
|
new(pyproject_content: pyproject_content, lockfile: lockfile).
|
@@ -351,3 +360,4 @@ module Dependabot
|
|
351
360
|
end
|
352
361
|
end
|
353
362
|
end
|
363
|
+
# rubocop:enable Metrics/ClassLength
|
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.107.
|
4
|
+
version: 0.107.45
|
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.107.
|
19
|
+
version: 0.107.45
|
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.107.
|
26
|
+
version: 0.107.45
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|