Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
1f793c53
Commit
1f793c53
authored
Sep 25, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RuboCop] Do not prefix reader method names with get_.
parent
f3803f4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
repo.rb
lib/cocoapods/command/repo.rb
+5
-6
No files found.
lib/cocoapods/command/repo.rb
View file @
1f793c53
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment