diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c834d01..61d7de0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,12 @@ jobs: fail-fast: false matrix: ruby-version: [2.6, 2.7, "3.0", 3.1, 3.2] - bundler-version: [2.4.19, 2.4.22, 2.5.2] + bundler-version: [2.4.19, 2.4.22, 2.5.6] exclude: - ruby-version: 2.6 - bundler-version: 2.5.2 + bundler-version: 2.5.6 - ruby-version: 2.7 - bundler-version: 2.5.2 + bundler-version: 2.5.6 env: BUNDLER_VERSION: ${{ matrix.bundler-version }} BUNDLE_LOCKFILE: active diff --git a/Gemfile.lock b/Gemfile.lock index 8343aa0..5a21bfc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -13,7 +13,7 @@ GEM irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.5.0) - io-console (0.7.1) + io-console (0.7.2) irb (1.11.0) rdoc reline (>= 0.3.8) @@ -31,7 +31,7 @@ GEM rdoc (6.6.2) psych (>= 4.0.0) regexp_parser (2.8.1) - reline (0.4.1) + reline (0.4.2) io-console (~> 0.5) rexml (3.2.6) rspec (3.12.0) @@ -100,4 +100,4 @@ DEPENDENCIES stringio (~> 3.1) BUNDLED WITH - 2.5.2 + 2.5.6 diff --git a/Gemfile.ruby-2.6.lock b/Gemfile.ruby-2.6.lock index bbb39c3..02e5c86 100644 --- a/Gemfile.ruby-2.6.lock +++ b/Gemfile.ruby-2.6.lock @@ -11,11 +11,11 @@ GEM irb (>= 1.5.0) reline (>= 0.3.1) diff-lcs (1.5.0) - io-console (0.7.1) + io-console (0.7.2) irb (1.6.3) reline (>= 0.3.0) rake (13.0.6) - reline (0.4.1) + reline (0.4.2) io-console (~> 0.5) rspec (3.12.0) rspec-core (~> 3.12.0) @@ -48,4 +48,4 @@ DEPENDENCIES stringio (= 3.0.6) BUNDLED WITH - 2.5.2 + 2.5.6 diff --git a/lib/bundler/multilock.rb b/lib/bundler/multilock.rb index d9ec544..79c2a9d 100644 --- a/lib/bundler/multilock.rb +++ b/lib/bundler/multilock.rb @@ -470,7 +470,12 @@ def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: resolved_remotely = true end SharedHelpers.capture_filesystem_access do - definition.lock(lockfile_definition[:lockfile], true) + if Bundler.gem_version >= Gem::Version.new("2.5.6") + definition.instance_variable_set(:@lockfile, lockfile_definition[:lockfile]) + definition.lock(true) + else + definition.lock(lockfile_definition[:lockfile], true) + end end ensure Bundler.ui.level = previous_ui_level @@ -495,6 +500,8 @@ def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: end end +# see https://github.com/rubygems/rubygems/pull/7368 +Bundler::LazySpecification.include(Bundler::MatchMetadata) if defined?(Bundler::MatchMetadata) Bundler::Multilock.inject_preamble unless Bundler::Multilock.loaded? # this is terrible, but we can't prepend into these modules because we only load