bundler-multilock 1.1.0 → 1.1.2

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: 12e431ea7783f9bc36d1efae8aaeda88434936f587c954c34ad4163b3338dc44
4
- data.tar.gz: 8eda2e0bc8f785b0ceefb312d4d34c6fd754dab58c835ec7b818c551af903bdf
3
+ metadata.gz: 67b3efef0037c3c22b0b8fccee25a6388b3cc3aa38b92dc2dfdc956b2eca01e8
4
+ data.tar.gz: e12da2edaeacc80d5d5b90108a333c1d195be6d0784618ab40ebe5d5807981fc
5
5
  SHA512:
6
- metadata.gz: 3fea018e198880d1c2a7dcaa635faa1ccff9b65d46bbb72c15cb153dd20acf34dfb833189bd1c4f3dd04f3053b23e2220ca769b101806e2b99a3ddc92097675c
7
- data.tar.gz: 80095ec510ebefa11c457ef13c45bc0af40b6961b1ffff54c0724f5010cd72b6fa512f3de11155a6883db71dd6dc87322c6fbef314d5b7c61e99572e4fe77b43
6
+ metadata.gz: 64f62f4d2d35d55cacb8d751be9708d56f4d60348c69faa61f8ea8c48a0ff273fd355238fe71175e0d36c2ad7cbe6f55e225fb6ea56be8361d258d5cb6ae45d8
7
+ data.tar.gz: 393ca25f67035f032b83442e7dd7bf5a4cec5002f72c94eb1f42a3d962117f79a39e029e1280c845520af398fc7b68d4cbd5d2dd60ab9d6181891a1ee10ab36b
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.2"
6
6
  end
7
7
  end
@@ -62,14 +62,8 @@ module Bundler
62
62
  raise ArgumentError, "Lockfile #{lockfile} is already defined"
63
63
  end
64
64
 
65
- env_lockfile = ENV["BUNDLE_LOCKFILE"]
66
- if env_lockfile
67
- unless env_lockfile.include?("/") || env_lockfile.end_with?(".lock")
68
- env_lockfile = "Gemfile.#{env_lockfile}.lock"
69
- end
70
- env_lockfile = Bundler.root.join(env_lockfile).expand_path
71
- active = env_lockfile == lockfile
72
- end
65
+ env_lockfile = ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) }
66
+ active = env_lockfile == lockfile if env_lockfile
73
67
 
74
68
  if active && (old_active = lockfile_definitions.find { |definition| definition[:active] })
75
69
  raise ArgumentError, "Only one lockfile (#{old_active[:lockfile]}) can be flagged as the default"
@@ -310,16 +304,17 @@ module Bundler
310
304
 
311
305
  return unless lockfile_definitions.none? { |definition| definition[:active] }
312
306
 
313
- # Gemfile.lock isn't explicitly specified, otherwise it would be active
314
- default_lockfile_definition = lockfile_definitions.find do |definition|
315
- definition[:lockfile] == Bundler.default_lockfile(force_original: true)
316
- end
317
- if ENV["BUNDLE_LOCKFILE"] == Bundler.default_lockfile(force_original: true) && default_lockfile_definition
307
+ if ENV["BUNDLE_LOCKFILE"]&.then { |l| expand_lockfile(l) } ==
308
+ Bundler.default_lockfile(force_original: true)
318
309
  return
319
310
  end
320
311
 
321
312
  raise GemfileNotFound, "Could not locate lockfile #{ENV["BUNDLE_LOCKFILE"].inspect}" if ENV["BUNDLE_LOCKFILE"]
322
313
 
314
+ # Gemfile.lock isn't explicitly specified, otherwise it would be active
315
+ default_lockfile_definition = lockfile_definitions.find do |definition|
316
+ definition[:lockfile] == Bundler.default_lockfile(force_original: true)
317
+ end
323
318
  return unless default_lockfile_definition && default_lockfile_definition[:active] == false
324
319
 
325
320
  raise GemfileEvalError, "No lockfiles marked as default"
@@ -460,7 +455,7 @@ module Bundler
460
455
  definition.send(:source_map).locked_specs.each do |spec|
461
456
  next if spec.match_platform(Bundler.local_platform)
462
457
 
463
- spec.source.specs.add(spec)
458
+ spec.source.specs << spec
464
459
  end
465
460
  definition.resolve_with_cache!
466
461
  rescue GemNotFound, SolveFailure
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-multilock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure