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
462372ba
Commit
462372ba
authored
May 26, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5265 from fulldecent/patch-1
Guarding from crash if pod lib create has a + character in the name
parents
60b5f736
da9fffea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
CHANGELOG.md
CHANGELOG.md
+4
-0
create.rb
lib/cocoapods/command/lib/create.rb
+1
-0
create_spec.rb
spec/functional/command/lib/create_spec.rb
+4
-0
No files found.
CHANGELOG.md
View file @
462372ba
...
@@ -38,6 +38,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -38,6 +38,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Marc Boquet
](
https://github.com/marcboquet
)
[
Marc Boquet
](
https://github.com/marcboquet
)
[
#5294
](
https://github.com/CocoaPods/CocoaPods/issues/5294
)
[
#5294
](
https://github.com/CocoaPods/CocoaPods/issues/5294
)
*
Guarding from crash if pod lib create has a + character in the name.
[
William Entriken
](
https://github.com/fulldecent
)
[
CocoaPods/pod-template#69
](
https://github.com/CocoaPods/pod-template/issues/69
)
## 1.0.0 (2016-05-10)
## 1.0.0 (2016-05-10)
...
...
lib/cocoapods/command/lib/create.rb
View file @
462372ba
...
@@ -33,6 +33,7 @@ module Pod
...
@@ -33,6 +33,7 @@ module Pod
super
super
help!
'A name for the Pod is required.'
unless
@name
help!
'A name for the Pod is required.'
unless
@name
help!
'The Pod name cannot contain spaces.'
if
@name
=~
/\s/
help!
'The Pod name cannot contain spaces.'
if
@name
=~
/\s/
help!
'The Pod name cannot contain plusses.'
if
@name
=~
/\+/
help!
"The Pod name cannot begin with a '.'"
if
@name
[
0
,
1
]
==
'.'
help!
"The Pod name cannot begin with a '.'"
if
@name
[
0
,
1
]
==
'.'
end
end
...
...
spec/functional/command/lib/create_spec.rb
View file @
462372ba
...
@@ -14,6 +14,10 @@ module Pod
...
@@ -14,6 +14,10 @@ module Pod
lambda
{
run_command
(
'lib'
,
'create'
,
'Pod Name With Spaces'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'lib'
,
'create'
,
'Pod Name With Spaces'
)
}.
should
.
raise
CLAide
::
Help
end
end
it
'complains if pod name contains plusses'
do
lambda
{
run_command
(
'lib'
,
'create'
,
'Pod+Name+With+Plusses'
)
}.
should
.
raise
CLAide
::
Help
end
it
'complains if pod name begins with a period'
do
it
'complains if pod name begins with a period'
do
lambda
{
run_command
(
'lib'
,
'create'
,
'.HiddenPod'
)
}.
should
.
raise
CLAide
::
Help
lambda
{
run_command
(
'lib'
,
'create'
,
'.HiddenPod'
)
}.
should
.
raise
CLAide
::
Help
end
end
...
...
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