dependabot-python 0.170.0 → 0.171.1

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: 91d3d253ec046dc5a97dd0f8e8655446454896664ceaeb860ce145401f1923c8
4
- data.tar.gz: a7c6c0225cdd7d271fef661dac76b3e775485c370da674a343786391d53d0f4c
3
+ metadata.gz: 531a56b5a25e9489c3c733741e6f61e12b1e397eade488cb590d2dd7534f9870
4
+ data.tar.gz: adb4e4e989ce0ff40b4d6976870bd45adde28f8b3338f29e377b684fc29668ed
5
5
  SHA512:
6
- metadata.gz: 23fbc0a6c06f2fcbb6b18966f2d0a75073d9506da9ccea8b808353f3e40e67881c4d1c2a711f40f41a39bbada66dcd41b3c051bb019231e2217b144829561a50
7
- data.tar.gz: 6d1202df025248edd802f37494a90ee5bf4a260ce00ce715121db49d8317d7775560f00f379234e729d3338e474d1383c610e0b01c30978b1a7117d2cb0910fe
6
+ metadata.gz: 966cd3dbe50b5fed0c00b2d666628f7d33d59294f8d1e2b01cf3648536d58a8e65880eb7d869446372d52f63ae4e24ef2040f6e44d6c6c0d5286bc36fe264662
7
+ data.tar.gz: f11ad4ccbbce7bf218fc547761175fc5981318195c068e20f18b9b27df5a76bfa6d67e7b24dcf8a9f8037584a05e9c66f35ec7061e76d17140cb847d7948c7f1
data/helpers/build CHANGED
@@ -2,12 +2,14 @@
2
2
 
3
3
  set -e
4
4
 
5
- install_dir=$1
6
- if [ -z "$install_dir" ]; then
7
- echo "usage: $0 INSTALL_DIR"
5
+ if [ -z "$DEPENDABOT_NATIVE_HELPERS_PATH" ]; then
6
+ echo "Unable to build, DEPENDABOT_NATIVE_HELPERS_PATH is not set"
8
7
  exit 1
9
8
  fi
10
9
 
10
+ install_dir="$DEPENDABOT_NATIVE_HELPERS_PATH/python"
11
+ mkdir -p "$install_dir"
12
+
11
13
  helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
12
14
  cp -r \
13
15
  "$helpers_dir/lib" \
@@ -2,7 +2,7 @@ pip==21.3.1
2
2
  pip-tools==6.4.0
3
3
  flake8==4.0.1
4
4
  hashin==0.15.0
5
- pipenv==2021.11.23
5
+ pipenv==2022.1.8
6
6
  pipfile==0.0.2
7
7
  poetry==1.1.12
8
8
  wheel==0.37.1
@@ -22,8 +22,18 @@ module Dependabot
22
22
  pyproject_object = TomlRB.parse(pyproject_content)
23
23
  poetry_object = pyproject_object.fetch("tool").fetch("poetry")
24
24
 
25
- sources = pyproject_sources + config_variable_sources(credentials)
26
- poetry_object["source"] = sources if sources.any?
25
+ sources_hash = pyproject_sources.map { |source| [source["url"], source] }.to_h
26
+
27
+ config_variable_sources(credentials).each do |source|
28
+ if sources_hash.key?(source["original_url"])
29
+ sources_hash[source["original_url"]]["url"] = source["url"]
30
+ else
31
+ source.delete("original_url")
32
+ sources_hash[source["url"]] = source
33
+ end
34
+ end
35
+
36
+ poetry_object["source"] = sources_hash.values unless sources_hash.empty?
27
37
 
28
38
  TomlRB.dump(pyproject_object)
29
39
  end
@@ -105,6 +115,7 @@ module Dependabot
105
115
  select { |cred| cred["type"] == "python_index" }.
106
116
  map do |c|
107
117
  {
118
+ "original_url" => c["index-url"],
108
119
  "url" => AuthedUrlBuilder.authed_url(credential: c),
109
120
  "name" => SecureRandom.hex[0..3],
110
121
  "default" => c["replaces-base"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-python
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.170.0
4
+ version: 0.171.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-05 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dependabot-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.170.0
19
+ version: 0.171.1
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.170.0
26
+ version: 0.171.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: debug
29
29
  requirement: !ruby/object:Gem::Requirement