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
e44f1013
Commit
e44f1013
authored
May 31, 2015
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3627 from CocoaPods/seg-lib-create-args
[Create] Allow passing additional args to the configure script
parents
e0e3b73f
d47a2f26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
15 deletions
+27
-15
CHANGELOG.md
CHANGELOG.md
+12
-7
Gemfile.lock
Gemfile.lock
+1
-1
lib.rb
lib/cocoapods/command/lib.rb
+10
-3
lib_spec.rb
spec/functional/command/lib_spec.rb
+4
-4
No files found.
CHANGELOG.md
View file @
e44f1013
...
...
@@ -13,6 +13,18 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#3542
](
https://github.com/CocoaPods/CocoaPods/issues/3542
)
*
Supports running pre-install hooks in plugins. This happens before the resolver
does its work, and offers easy access to the sandbox, podfile and lockfile via a
`PreInstallHooksContext`
object. This also renames the post-install hooks from
`HooksContext`
to
`PostInstallHooksContext`
.
[
Orta Therox
](
https://github.com/orta
)
[
#3540
](
https://github.com/CocoaPods/cocoapods/issues/3409
)
*
Allow passing additional arguments to
`pod lib create`
, which then get passed
as-is to the
`configure`
scripts.
[
Samuel Giddins
](
https://github.com/segiddins
)
[
#2160
](
https://github.com/CocoaPods/CocoaPods/issues/2160
)
##### Bug Fixes
*
Public headers of vendored frameworks are now automatically linked in
...
...
@@ -39,13 +51,6 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[
Samuel Giddins
](
https://github.com/segiddins
)
[
cocoapods-try#31
](
https://github.com/CocoaPods/cocoapods-try/issues/31
)
*
Supports running pre-install hooks in plugins. This happens before the resolver
does its work, and offers easy access to the sandbox, podfile and lockfile via a
`PreInstallHooksContext`
object. This also renames the post-install hooks from
`HooksContext`
to
`PostInstallHooksContext`
.
[
Orta Therox
](
https://github.com/orta
)
[
cocoapods#3540
](
https://github.com/CocoaPods/cocoapods/issues/3409
)
##### Bug Fixes
*
`pod repo push`
will now find and push JSON podspecs.
...
...
Gemfile.lock
View file @
e44f1013
GIT
remote: https://github.com/CocoaPods/CLAide.git
revision:
f75b6d84d898a0a61f87bd48bab87d794a91ee86
revision:
37aeefd6b4475f1920a41ea0e02386cf6d76d235
branch: master
specs:
claide (0.8.1)
...
...
lib/cocoapods/command/lib.rb
View file @
e44f1013
...
...
@@ -18,13 +18,20 @@ module Pod
self
.
arguments
=
[
CLAide
::
Argument
.
new
(
'NAME'
,
true
),
CLAide
::
Argument
.
new
(
'TEMPLATE_URL'
,
false
),
]
def
self
.
options
[
[
'--template-url=URL'
,
'The URL of the git repo containing a '
\
'compatible template'
],
].
concat
(
super
)
end
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
@template_url
=
argv
.
shift_argument
@template_url
=
argv
.
option
(
'template-url'
,
TEMPLATE_REPO
)
super
@additional_args
=
argv
.
remainder!
end
def
validate!
...
...
@@ -72,7 +79,7 @@ module Pod
UI
.
section
(
"Configuring
#{
@name
}
template."
)
do
Dir
.
chdir
(
@name
)
do
if
File
.
exist?
(
'configure'
)
system
(
"./configure
#{
@name
}
"
)
system
(
'./configure'
,
@name
,
*
@additional_args
)
else
UI
.
warn
'Template does not have a configure file.'
end
...
...
spec/functional/command/lib_spec.rb
View file @
e44f1013
...
...
@@ -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