Commit 1f793c53 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[RuboCop] Do not prefix reader method names with get_.

parent f3803f4c
...@@ -233,11 +233,10 @@ module Pod ...@@ -233,11 +233,10 @@ module Pod
def print_source_at_path(path) def print_source_at_path(path)
Dir.chdir(path) do Dir.chdir(path) do
if SourcesManager.git_repo?(path) if SourcesManager.git_repo?(path)
branch_name = get_branch_name remote_name = branch_remote_name(branch_name)
remote_name = get_branch_remote_name(branch_name)
if remote_name if remote_name
UI.puts "- Type: git (#{remote_name})" UI.puts "- Type: git (#{remote_name})"
url = get_url_of_git_repo(remote_name) url = url_of_git_repo(remote_name)
UI.puts "- URL: #{url}" UI.puts "- URL: #{url}"
else else
UI.puts "- Type: git (no remote information available)" UI.puts "- Type: git (no remote information available)"
...@@ -292,7 +291,7 @@ module Pod ...@@ -292,7 +291,7 @@ module Pod
# #
# @return [String] The name of the current branch. # @return [String] The name of the current branch.
# #
def get_branch_name def branch_name
`git name-rev --name-only HEAD`.strip `git name-rev --name-only HEAD`.strip
end end
...@@ -303,7 +302,7 @@ module Pod ...@@ -303,7 +302,7 @@ module Pod
# #
# @return [String] The given branch's remote name. # @return [String] The given branch's remote name.
# #
def get_branch_remote_name(branch_name) def branch_remote_name(branch_name)
`git config branch.#{branch_name}.remote`.strip `git config branch.#{branch_name}.remote`.strip
end end
...@@ -315,7 +314,7 @@ module Pod ...@@ -315,7 +314,7 @@ module Pod
# #
# @return [String] The URL of the given remote. # @return [String] The URL of the given remote.
# #
def get_url_of_git_repo(remote_name) def url_of_git_repo(remote_name)
`git config remote.#{remote_name}.url`.strip `git config remote.#{remote_name}.url`.strip
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment