summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-09-25 01:00:58 +0000
committerBundlerbot <bot@bundler.io>2019-09-25 01:00:58 +0000
commita59887171c53f3e88e18c6e714247af0d94447f2 (patch)
tree0f9e623df0ce26d417417fb2acefe7b6fc3d4f15
parent9b9e0156e2200c3e046a4964689d5c13053a1f73 (diff)
parentcddb891b359b055e45e11a6c773027bdaaea34fd (diff)
downloadbundler-a59887171c53f3e88e18c6e714247af0d94447f2.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>
-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"