Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge #7364
Browse files Browse the repository at this point in the history
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 rubygems/rubygems#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>
  • Loading branch information
bundlerbot and deivid-rodriguez committed Sep 25, 2019
2 parents 9b9e015 + cddb891 commit a598871
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/support/rubygems_version_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -98,7 +100,7 @@ def env_version_is_path?
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
Expand All @@ -110,6 +112,8 @@ def resolve_target_tag_version
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"
Expand Down

0 comments on commit a598871

Please sign in to comment.