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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
8 deletions
+27
-8
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
+15
-2
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
...
@@ -15,6 +15,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
Marius Rackwitz
](
https://github.com/mrackwitz
)
[
#2461
](
https://github.com/CocoaPods/CocoaPods/issues/2461
)
[
#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
## 0.34.4
...
...
lib/cocoapods/sources_manager.rb
View file @
28b95e88
...
@@ -433,16 +433,16 @@ module Pod
...
@@ -433,16 +433,16 @@ module Pod
end
end
case
url
.
to_s
.
downcase
case
url
.
to_s
.
downcase
when
%r{github.com
(:|/)
cocoapods/specs}
when
%r{github.com
[:/]+
cocoapods/specs}
base
=
'master'
base
=
'master'
when
%r{github.com(:|/)(.+)/(.+)}
when
%r{github.com[:/]+(.+)/(.+)}
base
=
Regexp
.
last_match
[
2
]
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
when
URI
.
regexp
url
=
URI
(
url
.
downcase
)
url
=
URI
(
url
.
downcase
)
base
=
base_from_host_and_path
[
url
.
host
,
url
.
path
]
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
else
base
=
url
.
to_s
.
downcase
base
=
url
.
to_s
.
downcase
end
end
...
...
spec/unit/sources_manager_spec.rb
View file @
28b95e88
...
@@ -114,6 +114,11 @@ module Pod
...
@@ -114,6 +114,11 @@ module Pod
Pathname
.
any_instance
.
stubs
(
:exist?
).
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
false
).
then
.
returns
(
true
)
returns
(
false
).
then
.
returns
(
true
)
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'master'
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
end
it
'uses the organization name for github.com URLs'
do
it
'uses the organization name for github.com URLs'
do
...
@@ -128,9 +133,17 @@ module Pod
...
@@ -128,9 +133,17 @@ module Pod
end
end
it
'supports scp-style URLs'
do
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'
url
=
'git@git-host.com/specs.git'
SourcesManager
.
send
(
:name_for_url
,
url
).
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'git-host-specs'
should
==
'git-host-specs'
url
=
'git@git-host.com:/specs.git'
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'git-host-specs'
end
end
it
'supports ssh URLs with an aliased hostname'
do
it
'supports ssh URLs with an aliased hostname'
do
...
@@ -138,13 +151,13 @@ module Pod
...
@@ -138,13 +151,13 @@ module Pod
SourcesManager
.
send
(
:name_for_url
,
url
).
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'companyalias-pod-specs'
should
==
'companyalias-pod-specs'
end
end
it
'supports file URLs'
do
it
'supports file URLs'
do
url
=
'file:///Users/kurrytran/pod-specs'
url
=
'file:///Users/kurrytran/pod-specs'
SourcesManager
.
send
(
:name_for_url
,
url
).
SourcesManager
.
send
(
:name_for_url
,
url
).
should
==
'users-kurrytran-pod-specs'
should
==
'users-kurrytran-pod-specs'
end
end
it
'uses the repo name if no parent directory'
do
it
'uses the repo name if no parent directory'
do
url
=
'file:///pod-specs'
url
=
'file:///pod-specs'
SourcesManager
.
send
(
:name_for_url
,
url
).
SourcesManager
.
send
(
:name_for_url
,
url
).
...
...
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