[rubygems/rubygems] Use "frozen" rather than "deployment" in error message

I think it communicates better what's going on.

https://github.com/rubygems/rubygems/commit/07a25767a4
This commit is contained in:
David Rodríguez 2023-06-10 00:03:51 +02:00 committed by Hiroshi SHIBATA
parent 2ff9b7b93d
commit 23ecaab8dd
6 changed files with 18 additions and 18 deletions

View File

@ -365,7 +365,7 @@ module Bundler
def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false) def ensure_equivalent_gemfile_and_lockfile(explicit_flag = false)
msg = String.new msg = String.new
msg << "You are trying to install in deployment mode after changing your Gemfile.\n" \ msg << "You are trying to install in frozen mode after changing your Gemfile.\n" \
"Run `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n" "Run `bundle install` elsewhere and add the updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control.\n"
unless explicit_flag unless explicit_flag

View File

@ -301,7 +301,7 @@ RSpec.describe "bundle cache" do
G G
subject subject
expect(exitstatus).to eq(16) expect(exitstatus).to eq(16)
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile") expect(err).to include("You have added to the Gemfile")
expect(err).to include("* rack-obama") expect(err).to include("* rack-obama")
bundle "env" bundle "env"

View File

@ -109,7 +109,7 @@ Usage: "bundle inject GEM VERSION"
gem "rack-obama" gem "rack-obama"
G G
bundle "inject 'rack' '> 0'", :raise_on_error => false bundle "inject 'rack' '> 0'", :raise_on_error => false
expect(err).to match(/trying to install in deployment mode after changing/) expect(err).to match(/trying to install in frozen mode after changing/)
expect(bundled_app_lock.read).not_to match(/rack-obama/) expect(bundled_app_lock.read).not_to match(/rack-obama/)
end end

View File

@ -658,27 +658,27 @@ RSpec.describe "bundle update" do
bundle "update", :all => true, :raise_on_error => false bundle "update", :all => true, :raise_on_error => false
expect(last_command).to be_failure expect(last_command).to be_failure
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/) expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/)
expect(err).to match(/freeze by running `bundle config set frozen false`./) expect(err).to match(/freeze by running `bundle config set frozen false`./)
end end
it "should fail loudly when frozen is set globally" do it "should fail loudly when frozen is set globally" do
bundle "config set --global frozen 1" bundle "config set --global frozen 1"
bundle "update", :all => true, :raise_on_error => false bundle "update", :all => true, :raise_on_error => false
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/). expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/).
and match(/freeze by running `bundle config set frozen false`./) and match(/freeze by running `bundle config set frozen false`./)
end end
it "should fail loudly when deployment is set globally" do it "should fail loudly when deployment is set globally" do
bundle "config set --global deployment true" bundle "config set --global deployment true"
bundle "update", :all => true, :raise_on_error => false bundle "update", :all => true, :raise_on_error => false
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/). expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/).
and match(/freeze by running `bundle config set frozen false`./) and match(/freeze by running `bundle config set frozen false`./)
end end
it "should not suggest any command to unfreeze bundler if frozen is set through ENV" do it "should not suggest any command to unfreeze bundler if frozen is set through ENV" do
bundle "update", :all => true, :raise_on_error => false, :env => { "BUNDLE_FROZEN" => "true" } bundle "update", :all => true, :raise_on_error => false, :env => { "BUNDLE_FROZEN" => "true" }
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/) expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/)
expect(err).not_to match(/by running/) expect(err).not_to match(/by running/)
end end
end end

View File

@ -66,7 +66,7 @@ RSpec.describe "install in deployment or frozen mode" do
G G
bundle "install --deployment", :raise_on_error => false bundle "install --deployment", :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile") expect(err).to include("You have added to the Gemfile")
expect(err).to include("* rack-obama") expect(err).to include("* rack-obama")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
@ -272,7 +272,7 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle :install, :raise_on_error => false bundle :install, :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile") expect(err).to include("You have added to the Gemfile")
expect(err).to include("* rack-obama") expect(err).to include("* rack-obama")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
@ -337,7 +337,7 @@ RSpec.describe "install in deployment or frozen mode" do
ENV["BUNDLE_FROZEN"] = "1" ENV["BUNDLE_FROZEN"] = "1"
bundle "install", :raise_on_error => false bundle "install", :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile") expect(err).to include("You have added to the Gemfile")
expect(err).to include("* rack-obama") expect(err).to include("* rack-obama")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
@ -353,7 +353,7 @@ RSpec.describe "install in deployment or frozen mode" do
ENV["BUNDLE_DEPLOYMENT"] = "true" ENV["BUNDLE_DEPLOYMENT"] = "true"
bundle "install", :raise_on_error => false bundle "install", :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile") expect(err).to include("You have added to the Gemfile")
expect(err).to include("* rack-obama") expect(err).to include("* rack-obama")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
@ -383,7 +383,7 @@ RSpec.describe "install in deployment or frozen mode" do
ENV["BUNDLE_FROZEN"] = "false" ENV["BUNDLE_FROZEN"] = "false"
ENV["BUNDLE_DEPLOYMENT"] = "false" ENV["BUNDLE_DEPLOYMENT"] = "false"
bundle "install" bundle "install"
expect(out).not_to include("deployment mode") expect(out).not_to include("frozen mode")
expect(out).not_to include("You have added to the Gemfile") expect(out).not_to include("You have added to the Gemfile")
expect(out).not_to include("* rack-obama") expect(out).not_to include("* rack-obama")
end end
@ -396,7 +396,7 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle :install, :raise_on_error => false bundle :install, :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have added to the Gemfile:\n* activesupport\n\n") expect(err).to include("You have added to the Gemfile:\n* activesupport\n\n")
expect(err).to include("You have deleted from the Gemfile:\n* rack") expect(err).to include("You have deleted from the Gemfile:\n* rack")
expect(err).not_to include("You have changed in the Gemfile") expect(err).not_to include("You have changed in the Gemfile")
@ -410,7 +410,7 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle :install, :raise_on_error => false bundle :install, :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).not_to include("You have added to the Gemfile") expect(err).not_to include("You have added to the Gemfile")
expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `git://hubz.com`") expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `git://hubz.com`")
end end
@ -430,7 +430,7 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle :install, :raise_on_error => false bundle :install, :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
expect(err).not_to include("You have added to the Gemfile") expect(err).not_to include("You have added to the Gemfile")
expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack-1.0")}` to `no specified source`") expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack-1.0")}` to `no specified source`")
@ -454,7 +454,7 @@ RSpec.describe "install in deployment or frozen mode" do
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle :install, :raise_on_error => false bundle :install, :raise_on_error => false
expect(err).to include("deployment mode") expect(err).to include("frozen mode")
expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack")}` to `no specified source`") expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack")}` to `no specified source`")
expect(err).not_to include("You have added to the Gemfile") expect(err).not_to include("You have added to the Gemfile")
expect(err).not_to include("You have deleted from the Gemfile") expect(err).not_to include("You have deleted from the Gemfile")
@ -506,7 +506,7 @@ You have deleted from the Gemfile:
simulate_new_machine simulate_new_machine
bundle "config set --local deployment true" bundle "config set --local deployment true"
bundle "install --verbose" bundle "install --verbose"
expect(out).not_to include("You are trying to install in deployment mode after changing your Gemfile") expect(out).not_to include("You are trying to install in frozen mode after changing your Gemfile")
expect(out).not_to include("You have added to the Gemfile") expect(out).not_to include("You have added to the Gemfile")
expect(out).not_to include("You have deleted from the Gemfile") expect(out).not_to include("You have deleted from the Gemfile")
expect(out).to include("vendor/cache/foo") expect(out).to include("vendor/cache/foo")

View File

@ -150,7 +150,7 @@ RSpec.describe "bundle install from an existing gemspec" do
output = bundle("install", :dir => tmp.join("foo")) output = bundle("install", :dir => tmp.join("foo"))
expect(output).not_to match(/You have added to the Gemfile/) expect(output).not_to match(/You have added to the Gemfile/)
expect(output).not_to match(/You have deleted from the Gemfile/) expect(output).not_to match(/You have deleted from the Gemfile/)
expect(output).not_to match(/install in deployment mode after changing/) expect(output).not_to match(/install in frozen mode after changing/)
end end
it "should match a lockfile without needing to re-resolve" do it "should match a lockfile without needing to re-resolve" do