dependabot-python 0.106.35 → 0.106.36

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: efef013a40b55eedacbb53f7a4783733a901bd0396348d79864c57aee8dd7a7f
4
- data.tar.gz: 4c547183481a61048469a3abb469c13c3439a0ae6b50791108dbbffac1cf2c79
3
+ metadata.gz: dc8b4de9c1b27596b1e201c1484fdba88e2ad1a0bd253b280b615e6780fd784d
4
+ data.tar.gz: 27148963c8952cc231b2778a532e7f959c752064fb089c386ba7a83206bda7e7
5
5
  SHA512:
6
- metadata.gz: 60a9b85a95cecd32612384019638487cd2917e19e88cd7fb251940b575a7779c7bc8b90ad5311a44e589468a155a4102728f71b6aefb43b692fbd959cb93beaf
7
- data.tar.gz: cd8db7aee819a4564affedb1971f1ba3d96a06ae706b11b5f812ecc93ac6a9139ccf7b4b44e8831c5f1209af7723aa7f3c50528801326910685856c5c26e2d8f
6
+ metadata.gz: d2d801181848e68c74876d9d572cd90ca94c5f6d2749f76048d33226d31bb8a6a7693893e24d0f20dbd560c96349dfc0f66e1284cbc94bddd43d69d1536d28fc
7
+ data.tar.gz: 1430ef02e2a95522bee4c533e0a9eb74ca334c458c48e06f4040f8adb60220d99123042a5f3ccda5f7cc8e71a89c861327dbddb9603285a532921084f157d5d8
@@ -205,32 +205,27 @@ module Dependabot
205
205
 
206
206
  def write_updated_dependency_files
207
207
  dependency_files.each do |file|
208
- next if irrelevant_pyproject?(file)
209
-
210
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
211
- File.write(file.name, freeze_dependency_requirement(file))
208
+ path = file.name
209
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
210
+ File.write(path, freeze_dependency_requirement(file))
212
211
  end
213
212
 
214
213
  # Overwrite the .python-version with updated content
215
214
  File.write(".python-version", python_version)
216
215
 
217
216
  setup_files.each do |file|
218
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
219
- File.write(file.name, sanitized_setup_file_content(file))
217
+ path = file.name
218
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
219
+ File.write(path, sanitized_setup_file_content(file))
220
220
  end
221
221
 
222
222
  setup_cfg_files.each do |file|
223
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
224
- File.write(file.name, "[metadata]\nname = sanitized-package\n")
223
+ path = file.name
224
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
225
+ File.write(path, "[metadata]\nname = sanitized-package\n")
225
226
  end
226
227
  end
227
228
 
228
- def irrelevant_pyproject?(file)
229
- return false unless file.name == "pyproject.toml"
230
-
231
- !file.content.include?("build-backend")
232
- end
233
-
234
229
  def install_required_python
235
230
  if run_command("pyenv versions").include?("#{python_version}\n")
236
231
  return
@@ -248,34 +248,33 @@ module Dependabot
248
248
  message.include?('Command "python setup.py egg_info" failed')
249
249
  end
250
250
 
251
- # rubocop:disable Metrics/AbcSize
252
251
  def write_temporary_dependency_files(updated_req: nil,
253
252
  update_requirement: true)
254
253
  dependency_files.each do |file|
255
- next if irrelevant_pyproject?(file)
256
-
257
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
254
+ path = file.name
255
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
258
256
  updated_content =
259
257
  if update_requirement then update_req_file(file, updated_req)
260
258
  else file.content
261
259
  end
262
- File.write(file.name, updated_content)
260
+ File.write(path, updated_content)
263
261
  end
264
262
 
265
263
  # Overwrite the .python-version with updated content
266
264
  File.write(".python-version", python_version)
267
265
 
268
266
  setup_files.each do |file|
269
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
270
- File.write(file.name, sanitized_setup_file_content(file))
267
+ path = file.name
268
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
269
+ File.write(path, sanitized_setup_file_content(file))
271
270
  end
272
271
 
273
272
  setup_cfg_files.each do |file|
274
- FileUtils.mkdir_p(Pathname.new(file.name).dirname)
275
- File.write(file.name, "[metadata]\nname = sanitized-package\n")
273
+ path = file.name
274
+ FileUtils.mkdir_p(Pathname.new(path).dirname)
275
+ File.write(path, "[metadata]\nname = sanitized-package\n")
276
276
  end
277
277
  end
278
- # rubocop:enable Metrics/AbcSize
279
278
 
280
279
  def write_original_manifest_files
281
280
  pip_compile_files.each do |file|
@@ -284,12 +283,6 @@ module Dependabot
284
283
  end
285
284
  end
286
285
 
287
- def irrelevant_pyproject?(file)
288
- return false unless file.name == "pyproject.toml"
289
-
290
- !file.content.include?("build-backend")
291
- end
292
-
293
286
  def install_required_python
294
287
  if run_command("pyenv versions").include?("#{python_version}\n")
295
288
  return
@@ -419,7 +412,6 @@ module Dependabot
419
412
  updated_files =
420
413
  dependency_files.map do |file|
421
414
  next file if file.name == ".python-version"
422
- next file if file.name == "pyproject.toml"
423
415
 
424
416
  updated_file = file.dup
425
417
  updated_file.content = File.read(file.name)
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.106.35
4
+ version: 0.106.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-07 00:00:00.000000000 Z
11
+ date: 2019-05-08 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.106.35
19
+ version: 0.106.36
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.106.35
26
+ version: 0.106.36
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement