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

Commit

Permalink
Rename target_tag_version to target_tag
Browse files Browse the repository at this point in the history
Since it's always a tag, not a version number.
  • Loading branch information
deivid-rodriguez committed Dec 1, 2019
1 parent 0f17cdb commit 2d44bc0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/support/rubygems_version_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def switch_local_copy_if_needed

Dir.chdir(local_copy_path) do
sys_exec!("git remote update")
sys_exec!("git checkout #{target_tag_version} --quiet")
sys_exec!("git checkout #{target_tag} --quiet")
end

ENV["RGV"] = local_copy_path.to_s
Expand All @@ -57,11 +57,11 @@ def rubygems_unrequire_needed?
end

def local_copy_switch_needed?
!env_version_is_path? && target_tag_version != local_copy_tag
!env_version_is_path? && target_tag != local_copy_tag
end

def target_tag_version
@target_tag_version ||= resolve_target_tag_version
def target_tag
@target_tag ||= resolve_target_tag
end

def local_copy_tag
Expand Down Expand Up @@ -95,7 +95,7 @@ def expanded_env_version
@expanded_env_version ||= Pathname.new(@env_version).expand_path(root)
end

def resolve_target_tag_version
def resolve_target_tag
return "v#{@env_version}" if @env_version.match(/^\d/)

@env_version
Expand Down

0 comments on commit 2d44bc0

Please sign in to comment.