summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-09-25 01:00:58 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-07 16:41:29 +0100
commitc75a1cda94bdf8ffd18c51a0a23dc3cdcaa1718c (patch)
tree784381593cc9529579e3434cbcb93adaa65a3462
parent7463da8a3d2d6f6bbadd7cb44845374eb8b88b94 (diff)
downloadbundler-c75a1cda94bdf8ffd18c51a0a23dc3cdcaa1718c.tar.gz
Merge #7364
7364: Follow up to `ENV["RGV"]` handling refactor r=hsbt a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that #7296 broke rubygems CI. ### What was your diagnosis of the problem? My diagnosis was that the handling of `ENV["RGV"]` when it contains the path of a rubygems checkout instead of a rubygems version (like it happens in the rubygems repo) was incorrect. ### What is your fix for the problem, implemented in this PR? My fix is to correct the behaviour. I was able to reproduce the CI failures in https://github.com/rubygems/rubygems/pull/2924, and verify they are be fixed by this PR by patching the vendored bundler locally. Fixes #7363. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit a59887171c53f3e88e18c6e714247af0d94447f2)
-rw-r--r--spec/support/rubygems_version_manager.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/support/rubygems_version_manager.rb b/spec/support/rubygems_version_manager.rb
index 4be90f7679..b89d704e65 100644
--- a/spec/support/rubygems_version_manager.rb
+++ b/spec/support/rubygems_version_manager.rb
@@ -2,9 +2,11 @@
require "pathname"
require_relative "helpers"
+require_relative "path"
class RubygemsVersionManager
include Spec::Helpers
+ include Spec::Path
def initialize(env_version)
@env_version = env_version
@@ -98,7 +100,7 @@ private
end
def expanded_env_version
- @expanded_env_version ||= Pathname.new(@env_version).expand_path
+ @expanded_env_version ||= Pathname.new(@env_version).expand_path(root)
end
def resolve_target_tag_version
@@ -110,6 +112,8 @@ private
end
def resolve_target_gem_version
+ return local_copy_version if env_version_is_path?
+
return @env_version[1..-1] if @env_version.match(/^v/)
return master_gem_version if @env_version == "master"