Skip to content

Commit 07a2576

Browse files
Use "frozen" rather than "deployment" in error message
I think it communicates better what's going on.
1 parent b86caaa commit 07a2576

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

bundler/lib/bundler/definition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def to_lock
365365

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

371371
unless explicit_flag

bundler/spec/commands/cache_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
G
302302
subject
303303
expect(exitstatus).to eq(16)
304-
expect(err).to include("deployment mode")
304+
expect(err).to include("frozen mode")
305305
expect(err).to include("You have added to the Gemfile")
306306
expect(err).to include("* rack-obama")
307307
bundle "env"

bundler/spec/commands/inject_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
gem "rack-obama"
110110
G
111111
bundle "inject 'rack' '> 0'", :raise_on_error => false
112-
expect(err).to match(/trying to install in deployment mode after changing/)
112+
expect(err).to match(/trying to install in frozen mode after changing/)
113113

114114
expect(bundled_app_lock.read).not_to match(/rack-obama/)
115115
end

bundler/spec/commands/update_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,27 +658,27 @@
658658
bundle "update", :all => true, :raise_on_error => false
659659

660660
expect(last_command).to be_failure
661-
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/)
661+
expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/)
662662
expect(err).to match(/freeze by running `bundle config set frozen false`./)
663663
end
664664

665665
it "should fail loudly when frozen is set globally" do
666666
bundle "config set --global frozen 1"
667667
bundle "update", :all => true, :raise_on_error => false
668-
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/).
668+
expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/).
669669
and match(/freeze by running `bundle config set frozen false`./)
670670
end
671671

672672
it "should fail loudly when deployment is set globally" do
673673
bundle "config set --global deployment true"
674674
bundle "update", :all => true, :raise_on_error => false
675-
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/).
675+
expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/).
676676
and match(/freeze by running `bundle config set frozen false`./)
677677
end
678678

679679
it "should not suggest any command to unfreeze bundler if frozen is set through ENV" do
680680
bundle "update", :all => true, :raise_on_error => false, :env => { "BUNDLE_FROZEN" => "true" }
681-
expect(err).to match(/You are trying to install in deployment mode after changing your Gemfile/)
681+
expect(err).to match(/You are trying to install in frozen mode after changing your Gemfile/)
682682
expect(err).not_to match(/by running/)
683683
end
684684
end

bundler/spec/install/deploy_spec.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
G
6767

6868
bundle "install --deployment", :raise_on_error => false
69-
expect(err).to include("deployment mode")
69+
expect(err).to include("frozen mode")
7070
expect(err).to include("You have added to the Gemfile")
7171
expect(err).to include("* rack-obama")
7272
expect(err).not_to include("You have deleted from the Gemfile")
@@ -272,7 +272,7 @@
272272

273273
bundle "config set --local deployment true"
274274
bundle :install, :raise_on_error => false
275-
expect(err).to include("deployment mode")
275+
expect(err).to include("frozen mode")
276276
expect(err).to include("You have added to the Gemfile")
277277
expect(err).to include("* rack-obama")
278278
expect(err).not_to include("You have deleted from the Gemfile")
@@ -337,7 +337,7 @@
337337

338338
ENV["BUNDLE_FROZEN"] = "1"
339339
bundle "install", :raise_on_error => false
340-
expect(err).to include("deployment mode")
340+
expect(err).to include("frozen mode")
341341
expect(err).to include("You have added to the Gemfile")
342342
expect(err).to include("* rack-obama")
343343
expect(err).not_to include("You have deleted from the Gemfile")
@@ -353,7 +353,7 @@
353353

354354
ENV["BUNDLE_DEPLOYMENT"] = "true"
355355
bundle "install", :raise_on_error => false
356-
expect(err).to include("deployment mode")
356+
expect(err).to include("frozen mode")
357357
expect(err).to include("You have added to the Gemfile")
358358
expect(err).to include("* rack-obama")
359359
expect(err).not_to include("You have deleted from the Gemfile")
@@ -383,7 +383,7 @@
383383
ENV["BUNDLE_FROZEN"] = "false"
384384
ENV["BUNDLE_DEPLOYMENT"] = "false"
385385
bundle "install"
386-
expect(out).not_to include("deployment mode")
386+
expect(out).not_to include("frozen mode")
387387
expect(out).not_to include("You have added to the Gemfile")
388388
expect(out).not_to include("* rack-obama")
389389
end
@@ -396,7 +396,7 @@
396396

397397
bundle "config set --local deployment true"
398398
bundle :install, :raise_on_error => false
399-
expect(err).to include("deployment mode")
399+
expect(err).to include("frozen mode")
400400
expect(err).to include("You have added to the Gemfile:\n* activesupport\n\n")
401401
expect(err).to include("You have deleted from the Gemfile:\n* rack")
402402
expect(err).not_to include("You have changed in the Gemfile")
@@ -410,7 +410,7 @@
410410

411411
bundle "config set --local deployment true"
412412
bundle :install, :raise_on_error => false
413-
expect(err).to include("deployment mode")
413+
expect(err).to include("frozen mode")
414414
expect(err).not_to include("You have added to the Gemfile")
415415
expect(err).to include("You have changed in the Gemfile:\n* rack from `no specified source` to `git://hubz.com`")
416416
end
@@ -430,7 +430,7 @@
430430

431431
bundle "config set --local deployment true"
432432
bundle :install, :raise_on_error => false
433-
expect(err).to include("deployment mode")
433+
expect(err).to include("frozen mode")
434434
expect(err).not_to include("You have deleted from the Gemfile")
435435
expect(err).not_to include("You have added to the Gemfile")
436436
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 @@
454454

455455
bundle "config set --local deployment true"
456456
bundle :install, :raise_on_error => false
457-
expect(err).to include("deployment mode")
457+
expect(err).to include("frozen mode")
458458
expect(err).to include("You have changed in the Gemfile:\n* rack from `#{lib_path("rack")}` to `no specified source`")
459459
expect(err).not_to include("You have added to the Gemfile")
460460
expect(err).not_to include("You have deleted from the Gemfile")
@@ -506,7 +506,7 @@
506506
simulate_new_machine
507507
bundle "config set --local deployment true"
508508
bundle "install --verbose"
509-
expect(out).not_to include("You are trying to install in deployment mode after changing your Gemfile")
509+
expect(out).not_to include("You are trying to install in frozen mode after changing your Gemfile")
510510
expect(out).not_to include("You have added to the Gemfile")
511511
expect(out).not_to include("You have deleted from the Gemfile")
512512
expect(out).to include("vendor/cache/foo")

bundler/spec/install/gemfile/gemspec_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
output = bundle("install", :dir => tmp.join("foo"))
151151
expect(output).not_to match(/You have added to the Gemfile/)
152152
expect(output).not_to match(/You have deleted from the Gemfile/)
153-
expect(output).not_to match(/install in deployment mode after changing/)
153+
expect(output).not_to match(/install in frozen mode after changing/)
154154
end
155155

156156
it "should match a lockfile without needing to re-resolve" do

0 commit comments

Comments
 (0)