summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-13 20:44:44 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-13 21:11:30 -0500
commitf145aa11a5b47b438263aace8bd45dd2d752411c (patch)
tree4dc5eeac72197c9dc168a9ff99da9d4534e9b56f
parentd9bcd5df7d8253be3722d1edacab15578dc3ddcf (diff)
downloadbundler-seg-deadlocking-is-bad.tar.gz
Stop allowing -rbundler/setup to silently ignore added specs in deployment modeseg-deadlocking-is-bad
-rw-r--r--lib/bundler/definition.rb2
-rw-r--r--lib/bundler/runtime.rb2
-rw-r--r--spec/install/deploy_spec.rb12
3 files changed, 14 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d974fb8cc5..6d3ad4f63a 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -448,7 +448,7 @@ module Bundler
end
reason = change_reason
- msg << "\n\n#{reason.split(", ").join("\n")}\n" unless reason.strip.empty?
+ msg << "\n\n#{reason.split(", ").map(&:capitalize).join("\n")}" unless reason.strip.empty?
msg << "\n\nYou have added to the Gemfile:\n" << added.join("\n") if added.any?
msg << "\n\nYou have deleted from the Gemfile:\n" << deleted.join("\n") if deleted.any?
msg << "\n\nYou have changed in the Gemfile:\n" << changed.join("\n") if changed.any?
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 6ccb0d89b5..5bdc9dfa63 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -11,6 +11,8 @@ module Bundler
end
def setup(*groups)
+ @definition.ensure_equivalent_gemfile_and_lockfile if Bundler.settings[:frozen]
+
groups.map!(&:to_sym)
# Has to happen first
diff --git a/spec/install/deploy_spec.rb b/spec/install/deploy_spec.rb
index 4a4f6e912f..bcbd57bc4f 100644
--- a/spec/install/deploy_spec.rb
+++ b/spec/install/deploy_spec.rb
@@ -258,7 +258,17 @@ RSpec.describe "install with --deployment or --frozen" do
gem "rack-obama"
G
- expect(the_bundle).to include_gems "rack 1.0.0"
+ expect(the_bundle).not_to include_gems "rack 1.0.0"
+ expect(err).to include strip_whitespace(<<-E).strip
+The dependencies in your gemfile changed
+
+You have added to the Gemfile:
+* rack (= 1.0.0)
+* rack-obama
+
+You have deleted from the Gemfile:
+* rack
+ E
end
end