From 7d7cab3175be1ee6ef14c36fc18daa261538216f Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Thu, 21 Dec 2023 11:55:59 -0700 Subject: [PATCH] Update references to "default" or "current" lockfile to be "active" The kwarg was changed from default to active quite a while ago --- README.md | 4 ++-- lib/bundler/multilock.rb | 2 +- spec/bundler/multilock_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6dc1f01..f80bdb6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ the default lockfile (Gemfile.lock), afterwhich all other lockfiles will be re-created based on this default lockfile. Additional lockfiles can be based on the same Gemfile, but vary at runtime. You can force a specific lockfile by setting the `BUNDLE_LOCKFILE` environment variable, or customize -it any way you want by setting `current: true` on one of your lockfiles +it any way you want by setting `active: true` on one of your lockfiles in your Gemfile. Alternately (or in addition!), you can define a lockfile to use a completely @@ -85,7 +85,7 @@ with `BUNDLE_LOCKFILE`: BUNDLE_LOCKFILE=rails-7.0 bundle exec rspec ``` -You can also dynamically select it in your Gemfile, and pass `current: true` +You can also dynamically select it in your Gemfile, and pass `active: true` to (exactly one!) `lockfile` method. ## Comparison to Appraisal diff --git a/lib/bundler/multilock.rb b/lib/bundler/multilock.rb index c3a5ce5..becc14b 100644 --- a/lib/bundler/multilock.rb +++ b/lib/bundler/multilock.rb @@ -313,7 +313,7 @@ def loaded! end return unless default_lockfile_definition && default_lockfile_definition[:active] == false - raise GemfileEvalError, "No lockfiles marked as default" + raise GemfileEvalError, "No lockfiles marked as active" end # @!visibility private diff --git a/spec/bundler/multilock_spec.rb b/spec/bundler/multilock_spec.rb index ee1061f..5c6c55e 100644 --- a/spec/bundler/multilock_spec.rb +++ b/spec/bundler/multilock_spec.rb @@ -121,12 +121,12 @@ end end - it "disallows no lockfile set as the default" do + it "disallows no lockfile set as active" do with_gemfile(<<~RUBY) do lockfile(default: false) lockfile("full") RUBY - expect { invoke_bundler("install") }.to raise_error(/No lockfiles marked as default/) + expect { invoke_bundler("install") }.to raise_error(/No lockfiles marked as active/) end end