Skip to content

Commit

Permalink
Update references to "default" or "current" lockfile to be "active"
Browse files Browse the repository at this point in the history
The kwarg was changed from default to active quite a while ago
  • Loading branch information
ccutrer committed Dec 21, 2023
1 parent 6948ba0 commit 7d7cab3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler/multilock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/bundler/multilock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7d7cab3

Please sign in to comment.