dependabot-python 0.86.8 → 0.86.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bce889c8431b2b11f31dfb6f070d4f165c556d36c2570afd3d49839db825fc21
|
4
|
+
data.tar.gz: c2bfbb3aa8425c0045703c620ba70355bb0832ce245f879eb52a38bdd76361e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ef345fc811c2928373b5ea3789a307486a7b3b6641a4a91288d273a87f4c2ee468fd513653bc0e25397cd98ac73a9f785c41123b1af5c0dbdae63ae1156a87a
|
7
|
+
data.tar.gz: b3c2bdaa5a69b84047c61b18e280eec7e0aa430e7c036b369856f9fc3ba92673bf394dd0507ee78cf1c3ea6b6333540a7e0901363a5a08c5991d62027c71fc4d
|
@@ -71,7 +71,7 @@ module Dependabot
|
|
71
71
|
updated_content = File.read(file.name)
|
72
72
|
|
73
73
|
updated_content =
|
74
|
-
|
74
|
+
post_process_compiled_file(updated_content, file)
|
75
75
|
next if updated_content == file.content
|
76
76
|
|
77
77
|
file.dup.tap { |f| f.content = updated_content }
|
@@ -230,6 +230,11 @@ module Dependabot
|
|
230
230
|
).updated_content
|
231
231
|
end
|
232
232
|
|
233
|
+
def post_process_compiled_file(updated_content, file)
|
234
|
+
content = replace_header_with_original(updated_content, file.content)
|
235
|
+
replace_absolute_file_paths(content, file.content)
|
236
|
+
end
|
237
|
+
|
233
238
|
def replace_header_with_original(updated_content, original_content)
|
234
239
|
original_header_lines =
|
235
240
|
original_content.lines.take_while { |l| l.start_with?("#") }
|
@@ -240,6 +245,26 @@ module Dependabot
|
|
240
245
|
[*original_header_lines, *updated_content_lines].join
|
241
246
|
end
|
242
247
|
|
248
|
+
def replace_absolute_file_paths(updated_content, original_content)
|
249
|
+
content = updated_content
|
250
|
+
|
251
|
+
update_count = 0
|
252
|
+
original_content.lines.each do |original_line|
|
253
|
+
next unless original_line.start_with?("-e")
|
254
|
+
|
255
|
+
line_to_update =
|
256
|
+
updated_content.lines.
|
257
|
+
select { |l| l.start_with?("-e") }.
|
258
|
+
at(update_count)
|
259
|
+
raise "Mismatch in editable requirements!" unless line_to_update
|
260
|
+
|
261
|
+
content = content.gsub(line_to_update, original_line)
|
262
|
+
update_count += 1
|
263
|
+
end
|
264
|
+
|
265
|
+
content
|
266
|
+
end
|
267
|
+
|
243
268
|
def pip_compile_options(filename)
|
244
269
|
current_requirements_file_name = filename.sub(/\.in$/, ".txt")
|
245
270
|
|
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.86.
|
4
|
+
version: 0.86.9
|
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.86.
|
19
|
+
version: 0.86.9
|
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.86.
|
26
|
+
version: 0.86.9
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|