bundler-multilock 1.0.8 → 1.0.9

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: c3c22d18b37d9d24220bfd86fa998d94cf5a1369252150b17d579b1921c2a7ff
4
+ data.tar.gz: 571095e3e063925db5afd3403c401d3c38eb598b2da0af7d7fe09b613b5a2686
5
5
  SHA512:
6
- metadata.gz: 49d774d8d1e1ca350966bda2d30f7200d5d96473dcc67572d1a8dd54ba596de31972269ae1278447eb5305899e8d5afb9289e9356923c6ea9a3b9afd15c188f3
7
- data.tar.gz: 9762a7b102a14d56cf5cea40667a3d7d0ec54db20bccd8d0979a91eadce1033ce60b4c9574eeb6a789a3d2f6769bc53908f296ec5c2ef03b5bf717b6ae118923
6
+ metadata.gz: 8088c2a27858e008353eea944d3ed0c803433a2b5c3b71ee1f3e4e694624d9deebb54d0dc4b8af29241eb77fb59abb158191c3077b9eb261813228627930285c
7
+ data.tar.gz: a4ec23e48dba110e68773b170998f3c334a7adf117e8bd6a3a6c5485414901073006d76d07a48ebd7d8dfc20cb2a93ef4e8112e465dd4a21279a827ba4c03928
@@ -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.9"
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,6 @@ module Bundler
388
395
  if install
389
396
  current_definition = builder.to_definition(current_lockfile, {})
390
397
  begin
391
- current_definition.resolve_only_locally!
392
398
  if current_definition.missing_specs.any?
393
399
  Bundler.with_default_lockfile(current_lockfile) do
394
400
  Installer.install(gemfile.dirname, current_definition, {})
@@ -435,3 +441,5 @@ module Bundler
435
441
  @prepare_block = nil
436
442
  end
437
443
  end
444
+
445
+ 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.9
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-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler