bundler-multilock 1.0.4 → 1.0.6

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: 514c6dd3f4961f833ea20dee15047941b649cdbe787f94808d9547e310ac7ff0
4
- data.tar.gz: 79b046545b14b3b29c33a629e528cf9bf60712337052b0381fc1b6bf240228c1
3
+ metadata.gz: 4ac5957b4e60ef1153bb017f5fcfd90c255f349cfb734cf59203229f334f5681
4
+ data.tar.gz: d563a7ee8a4bafe90c045a91f96d43f8e0d14e3cb7b25240a2f2fc282640fc68
5
5
  SHA512:
6
- metadata.gz: d071c456f788219cfb144b70cfb3161f1b53d9add8d9a2d5395be1bceb56f1681abd787047ec1e6f109c2937944756cf9b7f4cd85ff6ad9483666d46f3acfa2d
7
- data.tar.gz: 887dbb68890c5f643fdfb925eade83055afd262115a3a8970dd900955d1793ba4109569a56f9d4f273229023a051b63aec86c05fce2c6bf7ecc6bfe59f00e95b
6
+ metadata.gz: b9b2ec93fb27705796664bfc22b0a78797bcc1ecf49d4f57708838907f78fe49b4130ca6be3a223b1a04ff590ef305418254647cff5c6d57f587aab633e378f7
7
+ data.tar.gz: 9426a93cddf07b541c65d02de0d439a30efc21e696499cc18213bd9bdbf6a2f170843547a1ae13bd6ae5b659371da2a2b0c6b1d8707f1b312be3f1e7ebd16021
@@ -19,13 +19,14 @@ module Bundler
19
19
  end
20
20
  end
21
21
 
22
- def run
22
+ def run(skip_base_checks: false)
23
23
  return true unless Bundler.default_lockfile.exist?
24
24
 
25
25
  success = true
26
- missing_specs = base_check({ gemfile: Bundler.default_gemfile, lockfile: Bundler.default_lockfile },
27
- return_missing: true).to_set
28
-
26
+ unless skip_base_checks
27
+ missing_specs = base_check({ gemfile: Bundler.default_gemfile, lockfile: Bundler.default_lockfile },
28
+ return_missing: true).to_set
29
+ end
29
30
  Multilock.lockfile_definitions.each do |lockfile_definition|
30
31
  next if lockfile_definition[:lockfile] == Bundler.default_lockfile
31
32
 
@@ -34,9 +35,11 @@ module Bundler
34
35
  success = false
35
36
  end
36
37
 
37
- new_missing = base_check(lockfile_definition, log_missing: missing_specs, return_missing: true)
38
- success = false unless new_missing.empty?
39
- missing_specs.merge(new_missing)
38
+ unless skip_base_checks
39
+ new_missing = base_check(lockfile_definition, log_missing: missing_specs, return_missing: true)
40
+ success = false unless new_missing.empty?
41
+ missing_specs.merge(new_missing)
42
+ end
40
43
  success = false unless check(lockfile_definition)
41
44
  end
42
45
  success
@@ -53,7 +56,9 @@ module Bundler
53
56
 
54
57
  begin
55
58
  definition.validate_runtime!
56
- definition.resolve_only_locally!
59
+ Bundler.ui.silence do
60
+ definition.resolve_only_locally!
61
+ end
57
62
  not_installed = definition.missing_specs
58
63
  rescue RubyVersionMismatch, GemNotFound, SolveFailure
59
64
  return return_missing ? [] : false
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.0.4"
5
+ VERSION = "1.0.6"
6
6
  end
7
7
  end
@@ -85,10 +85,13 @@ module Bundler
85
85
  defined?(CLI::Install) ||
86
86
  defined?(CLI::Lock) ||
87
87
  defined?(CLI::Update)) &&
88
- !defined?(CLI::Cache)
88
+ !defined?(CLI::Cache) && !env_lockfile
89
89
  # always use Gemfile.lock for `bundle check`, `bundle install`,
90
90
  # `bundle lock`, and `bundle update`. `bundle cache` delegates to
91
91
  # `bundle install`, but we want that to run as normal.
92
+ # If they're using BUNDLE_LOCKFILE, then they really do want to
93
+ # use a particular lockfile, and it overrides whatever they
94
+ # dynamically set in their gemfile
92
95
  current = lockfile == Bundler.default_lockfile(force_original: true)
93
96
  end
94
97
 
@@ -152,6 +155,7 @@ module Bundler
152
155
  attempts = 1
153
156
 
154
157
  checker = Check.new
158
+ synced_any = false
155
159
  Bundler.settings.temporary(cache_all_platforms: true, suppress_install_using_messages: true) do
156
160
  lockfile_definitions.each do |lockfile_definition|
157
161
  # we already wrote the default lockfile
@@ -188,6 +192,7 @@ module Bundler
188
192
  write_lockfile(lockfile_definition, lockfile_definition[:lockfile], install: install)
189
193
  else
190
194
  Bundler.ui.info("Syncing to #{relative_lockfile}...") if attempts == 1
195
+ synced_any = true
191
196
 
192
197
  # adjust locked paths from the default lockfile to be relative to _this_ gemfile
193
198
  adjusted_default_lockfile_contents =
@@ -272,7 +277,7 @@ module Bundler
272
277
  end
273
278
  end
274
279
 
275
- exit 1 unless checker.run
280
+ exit 1 unless checker.run(skip_base_checks: !synced_any)
276
281
  ensure
277
282
  @recursive = previous_recursive
278
283
  end
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.4
4
+ version: 1.0.6
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-14 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler