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
0bbd1060
Commit
0bbd1060
authored
Apr 08, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[pod repo list] Fixn issue showing the URL for git"
This should be in a PR. This reverts commit
05d4076f
.
parent
7c93931b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
CHANGELOG.md
CHANGELOG.md
+0
-3
repo.rb
lib/cocoapods/command/repo.rb
+12
-0
list.rb
lib/cocoapods/command/repo/list.rb
+10
-8
No files found.
CHANGELOG.md
View file @
0bbd1060
...
@@ -12,9 +12,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -12,9 +12,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Boris Bügling
](
https://github.com/neonichu
)
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3310
](
https://github.com/CocoaPods/CocoaPods/issues/3310
)
[
#3310
](
https://github.com/CocoaPods/CocoaPods/issues/3310
)
*
Fixes an issue showing the URL to remote resources in
`pod repo list`
.
[
Kyle Fuller
](
https://github.com/kylef
)
## 0.36.3
## 0.36.3
...
...
lib/cocoapods/command/repo.rb
View file @
0bbd1060
...
@@ -43,6 +43,18 @@ module Pod
...
@@ -43,6 +43,18 @@ module Pod
def
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
# Returns the url of the given remote name
# (i.e. git@github.com:CocoaPods/Specs.git).
#
# @param [#to_s] remote_name
# The branch remote name to look for the url.
#
# @return [String] The URL of the given remote.
#
def
url_of_git_repo
(
remote_name
)
`git config remote.
#{
remote_name
}
.url`
.
strip
end
end
end
end
end
end
end
lib/cocoapods/command/repo/list.rb
View file @
0bbd1060
...
@@ -38,25 +38,27 @@ module Pod
...
@@ -38,25 +38,27 @@ module Pod
# Pretty-prints the source at the given path.
# Pretty-prints the source at the given path.
#
#
# @param [S
ource] source
# @param [S
tring,Pathname] path
# The
source repository
to be printed.
# The
path of the source
to be printed.
#
#
# @return [void]
# @return [void]
#
#
def
print_source
(
source
)
def
print_source_at_path
(
path
)
if
SourcesManager
.
git_repo?
(
source
.
repo
)
Dir
.
chdir
(
path
)
do
if
SourcesManager
.
git_repo?
(
path
)
remote_name
=
branch_remote_name
(
branch_name
)
remote_name
=
branch_remote_name
(
branch_name
)
if
remote_name
if
remote_name
UI
.
puts
"- Type: git (
#{
remote_name
}
)"
UI
.
puts
"- Type: git (
#{
remote_name
}
)"
UI
.
puts
"- URL:
#{
source
.
url
}
"
url
=
url_of_git_repo
(
remote_name
)
UI
.
puts
"- URL:
#{
url
}
"
else
else
UI
.
puts
'- Type: git (no remote information available)'
UI
.
puts
'- Type: git (no remote information available)'
end
end
else
else
UI
.
puts
'- Type: local copy'
UI
.
puts
'- Type: local copy'
end
end
UI
.
puts
"- Path:
#{
path
}
"
UI
.
puts
"- Path:
#{
source
.
repo
}
"
end
end
end
# Pretty-prints the given sources.
# Pretty-prints the given sources.
...
@@ -69,7 +71,7 @@ module Pod
...
@@ -69,7 +71,7 @@ module Pod
def
print_sources
(
sources
)
def
print_sources
(
sources
)
sources
.
each
do
|
source
|
sources
.
each
do
|
source
|
UI
.
title
source
.
name
do
UI
.
title
source
.
name
do
print_source
(
source
)
print_source
_at_path
source
.
repo
end
end
end
end
UI
.
puts
"
\n
"
UI
.
puts
"
\n
"
...
...
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