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
28b95e88
Commit
28b95e88
authored
Oct 24, 2014
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SourcesManager] Do not try to clone spec-repos in `/`.
Fixes #2723.
parent
0f76555d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
6 deletions
+25
-6
CHANGELOG.md
CHANGELOG.md
+6
-0
sources_manager.rb
lib/cocoapods/sources_manager.rb
+6
-6
sources_manager_spec.rb
spec/unit/sources_manager_spec.rb
+13
-0
No files found.
CHANGELOG.md
View file @
28b95e88
...
...
@@ -15,6 +15,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
#2461
](
https://github.com/CocoaPods/CocoaPods/issues/2461
)
##### Bug Fixes
*
Do not try to clone spec-repos in
`/`
.
[
Eloy Durán
](
https://github.com/alloy
)
[
#2723
](
https://github.com/CocoaPods/CocoaPods/issues/2723
)
## 0.34.4
...
...
lib/cocoapods/sources_manager.rb
View file @
28b95e88
...
...
@@ -433,16 +433,16 @@ module Pod
end
case
url
.
to_s
.
downcase
when
%r{github.com
(:|/)
cocoapods/specs}
when
%r{github.com
[:/]+
cocoapods/specs}
base
=
'master'
when
%r{github.com(:|/)(.+)/(.+)}
base
=
Regexp
.
last_match
[
2
]
when
%r{github.com[:/]+(.+)/(.+)}
base
=
Regexp
.
last_match
[
1
]
when
%r{^
\S
+@(
\S
+)[:/]+(.+)$}
host
,
path
=
Regexp
.
last_match
.
captures
base
=
base_from_host_and_path
[
host
,
path
]
when
URI
.
regexp
url
=
URI
(
url
.
downcase
)
base
=
base_from_host_and_path
[
url
.
host
,
url
.
path
]
when
%r{^
\S
+@(
\S
+)[:/](.+)$}
host
,
path
=
Regexp
.
last_match
.
captures
base
=
base_from_host_and_path
[
host
,
path
]
else
base
=
url
.
to_s
.
downcase
end
...
...
spec/unit/sources_manager_spec.rb
View file @
28b95e88
...
...
@@ -114,6 +114,11 @@ module Pod
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
false
).
then
.
returns
(
true
)
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'master'
url
=
'git@github.com:/CocoaPods/Specs.git'
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
false
).
then
.
returns
(
true
)
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'master'
end
it
'uses the organization name for github.com URLs'
do
...
...
@@ -128,9 +133,17 @@ module Pod
end
it
'supports scp-style URLs'
do
url
=
'git@git-host.com:specs.git'
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'git-host-specs'
url
=
'git@git-host.com/specs.git'
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'git-host-specs'
url
=
'git@git-host.com:/specs.git'
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'git-host-specs'
end
it
'supports ssh URLs with an aliased hostname'
do
...
...
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