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
bdebd670
Commit
bdebd670
authored
Mar 23, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#177] Fix for GitHub repos missing final .git in the source
parent
735d6bbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
search.rb
lib/cocoapods/command/search.rb
+1
-2
No files found.
lib/cocoapods/command/search.rb
View file @
bdebd670
...
@@ -39,10 +39,9 @@ module Pod
...
@@ -39,10 +39,9 @@ module Pod
url
=
source
[
:git
]
||
source
[
:hg
]
||
source
[
:svn
]
||
source
[
:local
]
url
=
source
[
:git
]
||
source
[
:hg
]
||
source
[
:svn
]
||
source
[
:local
]
puts
" - Source:
#{
url
}
"
if
url
puts
" - Source:
#{
url
}
"
if
url
if
url
=~
/github.com/
if
url
=~
/github.com/
original_url
,
username
,
reponame
=
*
(
url
.
match
(
/[:\/](\w+)\/(\w+)
.git
/
).
to_a
)
original_url
,
username
,
reponame
=
*
(
url
.
match
(
/[:\/](\w+)\/(\w+)
(.git)?
/
).
to_a
)
if
original_url
if
original_url
repo_info
=
`curl -s -m 2 http://github.com/api/v2/json/repos/show/
#{
username
}
/
#{
reponame
}
`
repo_info
=
`curl -s -m 2 http://github.com/api/v2/json/repos/show/
#{
username
}
/
#{
reponame
}
`
puts
repo_info
watchers
=
repo_info
.
match
(
/\"watchers\"\W*:\W*([0-9]+)/
).
to_a
[
1
]
watchers
=
repo_info
.
match
(
/\"watchers\"\W*:\W*([0-9]+)/
).
to_a
[
1
]
forks
=
repo_info
.
match
(
/\"forks\"\W*:\W*([0-9]+)/
).
to_a
[
1
]
forks
=
repo_info
.
match
(
/\"forks\"\W*:\W*([0-9]+)/
).
to_a
[
1
]
puts
" - Watchers: "
+
watchers
if
watchers
puts
" - Watchers: "
+
watchers
if
watchers
...
...
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