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 +4 -4
- data/lib/bundler/multilock/version.rb +1 -1
- data/lib/bundler/multilock.rb +9 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67b3efef0037c3c22b0b8fccee25a6388b3cc3aa38b92dc2dfdc956b2eca01e8
|
4
|
+
data.tar.gz: e12da2edaeacc80d5d5b90108a333c1d195be6d0784618ab40ebe5d5807981fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f62f4d2d35d55cacb8d751be9708d56f4d60348c69faa61f8ea8c48a0ff273fd355238fe71175e0d36c2ad7cbe6f55e225fb6ea56be8361d258d5cb6ae45d8
|
7
|
+
data.tar.gz: 393ca25f67035f032b83442e7dd7bf5a4cec5002f72c94eb1f42a3d962117f79a39e029e1280c845520af398fc7b68d4cbd5d2dd60ab9d6181891a1ee10ab36b
|
data/lib/bundler/multilock.rb
CHANGED
@@ -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
|
-
|
314
|
-
|
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
|
458
|
+
spec.source.specs << spec
|
464
459
|
end
|
465
460
|
definition.resolve_with_cache!
|
466
461
|
rescue GemNotFound, SolveFailure
|