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
4cd3ef63
Commit
4cd3ef63
authored
May 29, 2018
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix source validation for local URLs and SSH repos
parent
161ac76b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+3
-1
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+24
-0
No files found.
lib/cocoapods/installer/pod_source_installer.rb
View file @
4cd3ef63
...
...
@@ -123,7 +123,9 @@ module Pod
source
=
if
!
root_spec
.
source
[
:http
].
nil?
URI
(
root_spec
.
source
[
:http
].
to_s
)
elsif
!
root_spec
.
source
[
:git
].
nil?
URI
(
root_spec
.
source
[
:git
].
to_s
)
git_source
=
root_spec
.
source
[
:git
].
to_s
return
unless
git_source
=~
/^
#{
URI
.
regexp
}
$/
URI
(
git_source
)
end
if
UNENCRYPTED_PROTOCOLS
.
include?
(
source
.
scheme
)
UI
.
warn
"'
#{
root_spec
.
name
}
' uses the unencrypted '
#{
source
.
scheme
}
' protocol to transfer the Pod. "
\
...
...
spec/unit/installer/pod_source_installer_spec.rb
View file @
4cd3ef63
...
...
@@ -62,6 +62,30 @@ module Pod
UI
.
warnings
.
should
.
include
'uses the unencrypted \'git\' protocol'
end
it
'does not warn for local repositories with spaces'
do
@spec
.
source
=
{
:git
=>
'/Users/kylef/Projects X'
,
:tag
=>
'1.0'
}
dummy_response
=
Pod
::
Downloader
::
Response
.
new
Downloader
.
stubs
(
:download
).
returns
(
dummy_response
)
@installer
.
install!
UI
.
warnings
.
length
.
should
.
equal
(
0
)
end
it
'does not warn for SSH repositories'
do
@spec
.
source
=
{
:git
=>
'git@bitbucket.org:kylef/test.git'
,
:tag
=>
'1.0'
}
dummy_response
=
Pod
::
Downloader
::
Response
.
new
Downloader
.
stubs
(
:download
).
returns
(
dummy_response
)
@installer
.
install!
UI
.
warnings
.
length
.
should
.
equal
(
0
)
end
it
'does not warn for SSH repositories on Github'
do
@spec
.
source
=
{
:git
=>
'git@github.com:kylef/test.git'
,
:tag
=>
'1.0'
}
dummy_response
=
Pod
::
Downloader
::
Response
.
new
Downloader
.
stubs
(
:download
).
returns
(
dummy_response
)
@installer
.
install!
UI
.
warnings
.
length
.
should
.
equal
(
0
)
end
#--------------------------------------#
describe
'Prepare command'
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