summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-08-17 01:59:50 +0900
committerHomu <homu@barosl.com>2016-08-17 01:59:50 +0900
commit4fe91931d587075c2de507a1f87bcdab9b30373a (patch)
tree16df9c5e2eedf8091ed8f4b83da2d2bffbb9ed59
parent138b8c12c4006ec609726cf0e9902f82a5a34a87 (diff)
parenta570842680d06f66b2e491e8be58a7532814ed07 (diff)
downloadbundler-4fe91931d587075c2de507a1f87bcdab9b30373a.tar.gz
Auto merge of #4850 - jrochkind:better_version_mismatch_warning, r=segiddins
include version numbers involved with warn_for_outdated_bundler_version Can make it easier to understand what's going on.
-rw-r--r--lib/bundler/lockfile_parser.rb4
-rw-r--r--spec/commands/check_spec.rb2
-rw-r--r--spec/lock/lockfile_spec.rb4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/bundler/lockfile_parser.rb b/lib/bundler/lockfile_parser.rb
index 90da4ac608..063a1887fa 100644
--- a/lib/bundler/lockfile_parser.rb
+++ b/lib/bundler/lockfile_parser.rb
@@ -109,8 +109,8 @@ module Bundler
raise LockfileError, "You must use Bundler #{bundler_version.segments.first} or greater with this lockfile."
when 0
if current_version < bundler_version
- Bundler.ui.warn "Warning: the running version of Bundler is older " \
- "than the version that created the lockfile. We suggest you " \
+ Bundler.ui.warn "Warning: the running version of Bundler (#{current_version}) is older " \
+ "than the version that created the lockfile (#{bundler_version}). We suggest you " \
"upgrade to the latest version of Bundler by running `gem " \
"install bundler#{prerelease_text}`.\n"
end
diff --git a/spec/commands/check_spec.rb b/spec/commands/check_spec.rb
index a1634566a3..42d6459760 100644
--- a/spec/commands/check_spec.rb
+++ b/spec/commands/check_spec.rb
@@ -331,7 +331,7 @@ describe "bundle check" do
it "does not change the lock but warns" do
lockfile lock_with(Bundler::VERSION.succ)
bundle :check
- expect(out).to include("Bundler is older than the version that created the lockfile")
+ expect(out).to include("the running version of Bundler (#{Bundler::VERSION}) is older than the version that created the lockfile (#{Bundler::VERSION.succ})")
expect(err).to lack_errors
lockfile_should_be lock_with(Bundler::VERSION.succ)
end
diff --git a/spec/lock/lockfile_spec.rb b/spec/lock/lockfile_spec.rb
index 09a7411e3b..e6810b405f 100644
--- a/spec/lock/lockfile_spec.rb
+++ b/spec/lock/lockfile_spec.rb
@@ -176,8 +176,8 @@ describe "the lockfile format" do
G
end
- warning_message = "Warning: the running version of Bundler is " \
- "older than the version that created the lockfile"
+ warning_message = "the running version of Bundler (9999999.0.0) is older " \
+ "than the version that created the lockfile (9999999.1.0)"
expect(out.scan(warning_message).size).to eq(1)
lockfile_should_be <<-G