diff options
author | The Bundler Bot <bot@bundler.io> | 2017-11-30 14:52:23 +0000 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-12-12 14:44:28 -0600 |
commit | 8c08626303a164100345f1b4e015bbf845344300 (patch) | |
tree | d719deb4730b42f3eec31faa4e940d9ec4ae2f6f | |
parent | 3b714980de26ea6ef61931c8b16af18330c91eb7 (diff) | |
download | bundler-8c08626303a164100345f1b4e015bbf845344300.tar.gz |
Auto merge of #6194 - voxik:fix-version-replacement-in-lockfile, r=segiddins
Be more precise when replacing Bundler version in lock file.
Lets say the current Bundler version is 1.16.0. If the test suite is, by a chance, executed in directory which contains such version string, this path is stored in Gemfile.lock file. Later, the test tries to replace
the version of Bundler in the lock file, but instead, it replaces the version in path. Be more careful what should be actually replaced.
This is related to #6185 although it does not resolve the original concern.
(cherry picked from commit 6cef06d19fa04e2cee5ff5faba82e98c08f08d13)
-rw-r--r-- | spec/commands/update_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb index a2842f0998..33679dd649 100644 --- a/spec/commands/update_spec.rb +++ b/spec/commands/update_spec.rb @@ -657,7 +657,7 @@ RSpec.describe "bundle update --bundler" do source "file:#{gem_repo4}" gem "rack" G - lockfile lockfile.sub(Bundler::VERSION, "1.0.0") + lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, '\11.0.0\2') FileUtils.rm_r gem_repo4 |