summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-03-04 15:34:17 +0000
committerBundlerbot <bot@bundler.io>2019-03-04 15:34:17 +0000
commitbca8a4bada7bbedab36bb04d6bdce19630d1b873 (patch)
tree835eef0a7d46e2cbef21a1955ad2e075463c339d
parent900f5f1e6285de591e89664cffe5818e0b5d88d0 (diff)
parent4d7a1c8fc0874b7ba0db74b49e54947a0178d102 (diff)
downloadbundler-bca8a4bada7bbedab36bb04d6bdce19630d1b873.tar.gz
Merge #7012
7012: Adapt helper path regex to also work with Windows paths r=deivid-rodriguez a=janpio ### What was the end-user problem that led to this PR? Some tests were failing on Windows with strange paths not existing. ### What was your diagnosis of the problem? Turns out a regex in the helper for paths didn't fire on Windows paths as they start with something like `C:/`. ### What is your fix for the problem, implemented in this PR? So I adapted the regex to also match Windows paths. ### Why did you choose this fix out of the possible options? ... which seemed like the right thing to do here. --- Fixes 21 test failures on Windows. closes #6892 Co-authored-by: Jan Piotrowski <piotrowski+git@gmail.com> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
-rw-r--r--spec/support/helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb
index 4eb98645a5..45ab452853 100644
--- a/spec/support/helpers.rb
+++ b/spec/support/helpers.rb
@@ -318,7 +318,7 @@ module Spec
Dir.chdir(root) { gem_command! :build, gemspec.to_s }
end
bundler_path = root + "bundler-#{Bundler::VERSION}.gem"
- elsif g.to_s =~ %r{\A/.*\.gem\z}
+ elsif g.to_s =~ %r{\A(?:[A-Z]:)?/.*\.gem\z}
g
else
"#{gem_repo}/gems/#{g}.gem"