From acb8d98c9ff7f58c0bf5421a337fc5f388c61120 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Fri, 6 Oct 2023 11:34:34 -0600 Subject: [PATCH] restore compatibility with bundler 2.4.19 (#10) --- Gemfile.lock | 2 +- lib/bundler/multilock.rb | 2 +- lib/bundler/multilock/version.rb | 2 +- spec/bundler/multilock_spec.rb | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index eec4ab4..dc6adf3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - bundler-multilock (1.1.0) + bundler-multilock (1.1.1) bundler (~> 2.4.19) GEM diff --git a/lib/bundler/multilock.rb b/lib/bundler/multilock.rb index 1ff2830..6a79c28 100644 --- a/lib/bundler/multilock.rb +++ b/lib/bundler/multilock.rb @@ -460,7 +460,7 @@ def write_lockfile(lockfile_definition, lockfile, install:, dependency_changes: definition.send(:source_map).locked_specs.each do |spec| next if spec.match_platform(Bundler.local_platform) - spec.source.specs.add(spec) + spec.source.specs << spec end definition.resolve_with_cache! rescue GemNotFound, SolveFailure diff --git a/lib/bundler/multilock/version.rb b/lib/bundler/multilock/version.rb index a118e51..11531c7 100644 --- a/lib/bundler/multilock/version.rb +++ b/lib/bundler/multilock/version.rb @@ -2,6 +2,6 @@ module Bundler module Multilock - VERSION = "1.1.0" + VERSION = "1.1.1" end end diff --git a/spec/bundler/multilock_spec.rb b/spec/bundler/multilock_spec.rb index afc7acc..c3c3818 100644 --- a/spec/bundler/multilock_spec.rb +++ b/spec/bundler/multilock_spec.rb @@ -36,7 +36,7 @@ source "https://rubygems.org" - plugin "bundler-multilock", "~> 1.0" + plugin "bundler-multilock", "~> 1.1" return unless Plugin.installed?("bundler-multilock") Plugin.send(:load_plugin, "bundler-multilock") @@ -52,7 +52,7 @@ source 'https://rubygems.org' - plugin 'bundler-multilock', '~> 1.0' + plugin 'bundler-multilock', '~> 1.1' return unless Plugin.installed?('bundler-multilock') Plugin.send(:load_plugin, 'bundler-multilock') @@ -81,7 +81,7 @@ RUBY File.write("injected.rb", <<~RUBY) - plugin "bundler-multilock", "~> 1.0", path: #{File.expand_path("../..", __dir__).inspect} + plugin "bundler-multilock", "~> 1.1", path: #{File.expand_path("../..", __dir__).inspect} return unless Plugin.installed?("bundler-multilock") Plugin.send(:load_plugin, "bundler-multilock") @@ -740,7 +740,7 @@ def write_gemfile(content) File.write("Gemfile", <<~RUBY) source "https://rubygems.org" - plugin "bundler-multilock", "~> 1.0", path: #{File.expand_path("../..", __dir__).inspect} + plugin "bundler-multilock", "~> 1.1", path: #{File.expand_path("../..", __dir__).inspect} return unless Plugin.installed?("bundler-multilock") Plugin.send(:load_plugin, "bundler-multilock")