bundler-multilock 1.0.2 → 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: ad2556137eeec88cc813f9ac79cbb7062a4a16b067bf88a61cfacb03d1ae9add
4
- data.tar.gz: 58c7c976aa0e57f426b80152f213d069ee7f24ea5b9da1ee0c1ef115a8208e64
3
+ metadata.gz: caaabd6305d7178a0f13e9892ad6c3ef7a87de1c18cc2098ee76761820dfee5d
4
+ data.tar.gz: c1cf4f2100eeeba5882a073e6db8db7b287e2a891bb6e8991d62f6f6512ac52b
5
5
  SHA512:
6
- metadata.gz: 84e3cd4a4b12513f2a5ea4d0d214abb9e1a061bf96d041d1bea16c833131941ce8da7f9109018dd2bc5b2ddc4afc363e68caae7948707ec7d3a68ac8dea745f3
7
- data.tar.gz: cb8d45a52af7437ab6192809711531df051f7da2343b91087d4522f520441ab90476c822499d6e0c13d015923bf0701a75c9cead68f52bc49026de439cd0fbbe
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:
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.0.2"
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.2
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