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
8584bffa
Commit
8584bffa
authored
May 31, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Create] Use #remainder! to clear all remaining args
parent
767c1507
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
lib.rb
lib/cocoapods/command/lib.rb
+1
-1
lib_spec.rb
spec/functional/command/lib_spec.rb
+4
-4
No files found.
lib/cocoapods/command/lib.rb
View file @
8584bffa
...
...
@@ -30,8 +30,8 @@ module Pod
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
@template_url
=
argv
.
option
(
'template-url'
,
TEMPLATE_REPO
)
@additional_args
=
argv
.
remainder
super
@additional_args
=
argv
.
remainder!
end
def
validate!
...
...
spec/functional/command/lib_spec.rb
View file @
8584bffa
...
...
@@ -25,13 +25,13 @@ module Pod
run_command
(
'lib'
,
'create'
,
'TestPod'
)
end
it
'configures the template after cloning it passing the name of the Pod as the argument'
do
it
'configures the template after cloning it passing the name of the Pod a
nd any other args a
s the argument'
do
@sut
.
any_instance
.
stubs
(
:clone_template
)
dir
=
SpecHelper
.
temporary_directory
+
'TestPod'
dir
.
mkpath
File
.
stubs
(
:exist?
).
with
(
'configure'
).
returns
(
true
)
@sut
.
any_instance
.
expects
(
:system
).
with
(
'./configure
TestPod
'
).
once
run_command
(
'lib'
,
'create'
,
'TestPod'
)
@sut
.
any_instance
.
expects
(
:system
).
with
(
'./configure
'
,
'TestPod'
,
'foo
'
).
once
run_command
(
'lib'
,
'create'
,
'TestPod'
,
'foo'
,
'--verbose'
)
end
it
'should show link to new pod guide after creation'
do
...
...
@@ -48,7 +48,7 @@ module Pod
it
'should use the given template URL'
do
template_url
=
'https://github.com/custom/template.git'
@sut
.
any_instance
.
expects
(
:git!
).
with
([
'clone'
,
template_url
,
'TestPod'
]).
once
run_command
(
'lib'
,
'create'
,
'TestPod'
,
template_url
)
run_command
(
'lib'
,
'create'
,
'TestPod'
,
"--template-url=
#{
template_url
}
"
)
end
it
'should use the default URL if no template URL is given'
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