dependabot-python 0.113.5 → 0.113.6

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: 598505b8d28ff5ac5d4cd32d6a74d514ffebc0b0095fc6cbe182185c5fab21ed
4
- data.tar.gz: d47b72c8c345a8d926973d8a78c40761dbb8fc646d0aa3adae360ae555f780ea
3
+ metadata.gz: 13d1812fe995ffa9363746fda891591229a28e970fe13e09d46e4b0f348cd8c9
4
+ data.tar.gz: ea471121eeef0b8faad3316e794e817fa86fa1dfff9ae54a452c87148701c1ba
5
5
  SHA512:
6
- metadata.gz: 3f0613f49e5c127fb7d7f2b2f76454281c68bec075796cd618d2ea2099552b90652443aa507255fb1bd423b6e55121dfd85470130f0313e9be6995f41110fdf2
7
- data.tar.gz: 4b4db90249a57a6e5478c7db213c070a6c3b7168557fe51182d8477da5a4dd393f8e8aff1492d0624d8bb0fdbaa7b6ec5b3f67d81eedb3235a6d6095d2f31357
6
+ metadata.gz: ece27c13514891e81827435f7e948a3f40df6824e7fe3718cf6783b632e6848cd81472c585420505a0c0b6dc8bb0d715a1db75a6098abea957cf07f74cad7c2b
7
+ data.tar.gz: ce4a710b1a809bb939e5e7277a9c311a19a217e89fe702e04ee70028444e2d1c198d9409ab00f303a6bc8fad0f9cc221dd2254a999c1b10c3d22c803613edf08
@@ -364,7 +364,12 @@ module Dependabot
364
364
  map(&:strip).
365
365
  reject { |p| p.include?("://") || p.include?("git@") }
366
366
 
367
- uneditable_reqs + editable_reqs
367
+ current_dir = File.dirname(req_file.name)
368
+
369
+ (uneditable_reqs + editable_reqs).map do |path|
370
+ path = File.join(current_dir, path) unless current_dir == "."
371
+ Pathname.new(path).cleanpath.to_path
372
+ end
368
373
  end
369
374
 
370
375
  def pipfile_path_setup_file_paths
@@ -181,10 +181,17 @@ module Dependabot
181
181
  each do |file|
182
182
  path = file.name
183
183
  FileUtils.mkdir_p(Pathname.new(path).dirname)
184
- File.write(path, file.content)
184
+ File.write(path, remove_imports(file.content))
185
185
  end
186
186
  end
187
187
 
188
+ def remove_imports(content)
189
+ content.lines.
190
+ reject { |l| l.match?(/^['"]?(?<path>\..*?)(?=\[|#|'|"|$)/) }.
191
+ reject { |l| l.match?(/^(?:-e)\s+['"]?(?<path>.*?)(?=\[|#|'|"|$)/) }.
192
+ join
193
+ end
194
+
188
195
  def normalised_name(name)
189
196
  NameNormaliser.normalise(name)
190
197
  end
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.113.5
4
+ version: 0.113.6
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.113.5
19
+ version: 0.113.6
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.113.5
26
+ version: 0.113.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '12'
61
+ version: '13'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '12'
68
+ version: '13'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement