bundler-multilock 1.0.8 → 1.0.10

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: c8dbbb09ada32b32ccfdb9dcab07a0d4a2c2a075abac7aba4544946f49ee159b
4
- data.tar.gz: c3309600b53071ae9bcd3982153f591386bb9865879eb4eebf7ff3b031ed29a5
3
+ metadata.gz: f71e197447bdcd02b427ac7bc3a21a7e41e20a3d67edda69ed3821dea293e3ac
4
+ data.tar.gz: bf11ee91ace5dff77af3bc2b56ec283d2d227513e8d9397ce00e199ab73e3d83
5
5
  SHA512:
6
- metadata.gz: 49d774d8d1e1ca350966bda2d30f7200d5d96473dcc67572d1a8dd54ba596de31972269ae1278447eb5305899e8d5afb9289e9356923c6ea9a3b9afd15c188f3
7
- data.tar.gz: 9762a7b102a14d56cf5cea40667a3d7d0ec54db20bccd8d0979a91eadce1033ce60b4c9574eeb6a789a3d2f6769bc53908f296ec5c2ef03b5bf717b6ae118923
6
+ metadata.gz: 4cad381cf2fbb7d441f98d39322d54a0496570ceb3e564669a39429072224b7cbbca1af2f68205bc1149e05dc7535ca75e3f51631795732c019354d92ce17952
7
+ data.tar.gz: 3ddb854fc272683a96711403a8f65fc4d588260c46e7753f71ca790192be19f8f9e7b9b7612457d99ea4596ab6830b8cf8eda5c0385621f0769949f41cb95c87
@@ -56,10 +56,7 @@ module Bundler
56
56
 
57
57
  begin
58
58
  definition.validate_runtime!
59
- Bundler.ui.silence do
60
- definition.resolve_only_locally!
61
- end
62
- not_installed = definition.missing_specs
59
+ not_installed = Bundler.ui.silence { definition.missing_specs }
63
60
  rescue RubyVersionMismatch, GemNotFound, SolveFailure
64
61
  return return_missing ? [] : false
65
62
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bundler
4
4
  module Multilock
5
- VERSION = "1.0.8"
5
+ VERSION = "1.0.10"
6
6
  end
7
7
  end
@@ -48,7 +48,9 @@ module Bundler
48
48
  current = true if current.nil? && lockfile_definitions.empty? && lockfile.nil? && gemfile.nil?
49
49
 
50
50
  # allow short-form lockfile names
51
- lockfile = "Gemfile.#{lockfile}.lock" if lockfile && !(lockfile.include?("/") || lockfile.end_with?(".lock"))
51
+ if lockfile.is_a?(String) && !(lockfile.include?("/") || lockfile.end_with?(".lock"))
52
+ lockfile = "Gemfile.#{lockfile}.lock"
53
+ end
52
54
  # if a gemfile was provided, but not a lockfile, infer the default lockfile for that gemfile
53
55
  lockfile ||= "#{gemfile}.lock" if gemfile
54
56
  # use absolute paths
@@ -339,8 +341,13 @@ module Bundler
339
341
  end
340
342
  end
341
343
 
342
- modified = inject_specific_preamble(gemfile, injection_point, bundle_preamble2, add_newline: true)
344
+ builder = Bundler::Plugin::DSL.new
345
+ builder.eval_gemfile(Bundler.default_gemfile)
346
+ gemfiles = builder.instance_variable_get(:@gemfiles).map(&:read)
347
+
348
+ modified = inject_specific_preamble(gemfile, gemfiles, injection_point, bundle_preamble2, add_newline: true)
343
349
  modified = true if inject_specific_preamble(gemfile,
350
+ gemfiles,
344
351
  injection_point,
345
352
  bundle_preamble1,
346
353
  match: bundle_preamble1_match,
@@ -357,8 +364,8 @@ module Bundler
357
364
 
358
365
  private
359
366
 
360
- def inject_specific_preamble(gemfile, injection_point, preamble, add_newline:, match: preamble)
361
- return false if gemfile.include?(match)
367
+ def inject_specific_preamble(gemfile, gemfiles, injection_point, preamble, add_newline:, match: preamble)
368
+ return false if gemfiles.any? { |g| g.include?(match) }
362
369
 
363
370
  add_newline = false unless gemfile[injection_point - 1] == "\n"
364
371
 
@@ -388,7 +395,7 @@ module Bundler
388
395
  if install
389
396
  current_definition = builder.to_definition(current_lockfile, {})
390
397
  begin
391
- current_definition.resolve_only_locally!
398
+ current_definition.resolve_with_cache!
392
399
  if current_definition.missing_specs.any?
393
400
  Bundler.with_default_lockfile(current_lockfile) do
394
401
  Installer.install(gemfile.dirname, current_definition, {})
@@ -435,3 +442,5 @@ module Bundler
435
442
  @prepare_block = nil
436
443
  end
437
444
  end
445
+
446
+ Bundler::Multilock.inject_preamble unless Bundler::Multilock.loaded?
data/plugins.rb CHANGED
@@ -46,5 +46,3 @@ end
46
46
  Bundler::Plugin.add_hook(Bundler::Plugin::Events::GEM_AFTER_INSTALL_ALL) do |_|
47
47
  Bundler::Multilock.after_install_all
48
48
  end
49
-
50
- Bundler::Multilock.inject_preamble unless Bundler::Multilock.loaded?
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.8
4
+ version: 1.0.10
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-18 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler