bundler-multilock 1.0.1 → 1.0.3

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: 1a44fab8512a3a0912817ccf20f482b9e50e4f95dfd9c19b4650e0646b24eb33
4
- data.tar.gz: a3f523373eb598adcfde15044b0c585f0aec588ec922b8443079720a07058a75
3
+ metadata.gz: caaabd6305d7178a0f13e9892ad6c3ef7a87de1c18cc2098ee76761820dfee5d
4
+ data.tar.gz: c1cf4f2100eeeba5882a073e6db8db7b287e2a891bb6e8991d62f6f6512ac52b
5
5
  SHA512:
6
- metadata.gz: 2e315ad8dd6fcf0a6fb7f58c1875d364e558aea761f908aa61b6591fd65e3993d039a6ba9a97ce7373fafa30149bf1486693cf336ce314c6f57bd1f3cd4936cc
7
- data.tar.gz: a83535ae988209c4776317332bc51d565e49c8754543f52c41db6dbad211d6e38f1faac916ca0b54896e78f6a13f354e6476fa8b28c5f3da6a2ade396088acb1
6
+ metadata.gz: ec3b461286a3f046a12f2ec0539b441ba15c8367037994c53ece2f8c679a17788e93dfe85c88046b1e8ddeca6303b3d8be968edb12ffcaec9a900e80aeb756ba
7
+ data.tar.gz: 8c1e2d525bc7c6955d750be9ef8c30cf5f120cb07d65fa844a0fcfa61ea54eecdb7faf10e38a7e5a4591a928c3aaaa2574dc7156207c8135976bd611c8497cb1
@@ -15,6 +15,12 @@ module Bundler
15
15
  end
16
16
  super
17
17
  end
18
+
19
+ def validate_runtime!
20
+ Multilock.loaded! unless Multilock.lockfile_definitions.empty?
21
+
22
+ super
23
+ end
18
24
  end
19
25
  end
20
26
  end
@@ -27,6 +27,7 @@ module Bundler
27
27
  def initialize
28
28
  super
29
29
  @gemfiles = Set.new
30
+ Multilock.loaded! unless Multilock.lockfile_definitions.empty?
30
31
  end
31
32
 
32
33
  # Significant changes:
@@ -53,7 +54,7 @@ module Bundler
53
54
  end
54
55
 
55
56
  def lockfile(*args, **kwargs, &block)
56
- return if Multilock.loaded?
57
+ return true if Multilock.loaded?
57
58
 
58
59
  Multilock.add_lockfile(*args, builder: self, **kwargs, &block)
59
60
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
@@ -283,14 +283,21 @@ module Bundler
283
283
 
284
284
  @loaded = true
285
285
  return if lockfile_definitions.empty?
286
+
286
287
  return unless lockfile_definitions.none? { |definition| definition[:current] }
288
+
287
289
  # Gemfile.lock isn't explicitly specified, otherwise it would be current
288
- return if lockfile_definitions.none? do |definition|
289
- definition[:lockfile] == Bundler.default_lockfile(force_original: true)
290
- end
290
+ default_lockfile_definition = lockfile_definitions.find do |definition|
291
+ definition[:lockfile] == Bundler.default_lockfile(force_original: true)
292
+ end
293
+ if ENV["BUNDLE_LOCKFILE"] == Bundler.default_lockfile(force_original: true) && default_lockfile_definition
294
+ return
295
+ end
291
296
 
292
297
  raise GemfileNotFound, "Could not locate lockfile #{ENV["BUNDLE_LOCKFILE"].inspect}" if ENV["BUNDLE_LOCKFILE"]
293
298
 
299
+ return unless default_lockfile_definition && default_lockfile_definition[:current] == false
300
+
294
301
  raise GemfileEvalError, "No lockfiles marked as default"
295
302
  end
296
303
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-multilock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler