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
2a6f800f
Commit
2a6f800f
authored
Apr 10, 2013
by
Marin Usalj
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #957 from CocoaPods/help
Added help command. Usage `pod help [COMMAND]`
parents
9b070759
2c2da6a2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
1 deletion
+52
-1
CHANGELOG.md
CHANGELOG.md
+3
-0
command.rb
lib/cocoapods/command.rb
+1
-0
help.rb
lib/cocoapods/command/help.rb
+23
-0
master
spec/fixtures/spec-repos/master
+1
-1
help_spec.rb
spec/functional/command/help_spec.rb
+22
-0
command_spec.rb
spec/unit/command_spec.rb
+1
-0
resolver_spec.rb
spec/unit/resolver_spec.rb
+1
-0
No files found.
CHANGELOG.md
View file @
2a6f800f
...
...
@@ -12,6 +12,9 @@
*
CocoaPods now defines the deployment target of the Pods project computed as
the minimum deployment target of the Pods libraries.
[
#556
](
https://github.com/CocoaPods/CocoaPods/issues/556
)
*
Added
`pod help`
command. You can still use the old format
with --help flag.
[
#957
](
https://github.com/CocoaPods/CocoaPods/pull/957
)
###### Bug fixes
...
...
lib/cocoapods/command.rb
View file @
2a6f800f
...
...
@@ -16,6 +16,7 @@ module Pod
require
'cocoapods/command/search'
require
'cocoapods/command/setup'
require
'cocoapods/command/spec'
require
'cocoapods/command/help'
require
'cocoapods/command/inter_process_communication'
self
.
abstract_command
=
true
...
...
lib/cocoapods/command/help.rb
0 → 100644
View file @
2a6f800f
module
Pod
class
Command
class
Help
<
Command
self
.
summary
=
'Show help for the given command.'
self
.
arguments
=
'[COMMAND]'
def
initialize
(
argv
)
@help_command
=
Pod
::
Command
.
parse
(
argv
)
unless
argv
.
empty?
super
end
def
run
help_command
.
help!
end
private
def
help_command
@help_command
||
self
end
end
end
end
master
@
ee564d9d
Subproject commit e
54bfaa54110629cbb7495a5cdbb237b1fffe8f8
Subproject commit e
e564d9da8878957e7b77cac987d9601eb04eca5
spec/functional/command/help_spec.rb
0 → 100644
View file @
2a6f800f
require
File
.
expand_path
(
'../../../spec_helper'
,
__FILE__
)
module
Pod
describe
"Command::Help"
do
extend
SpecHelper
::
Command
it
"invokes the right command with --help flag"
do
command
=
command
(
'help'
,
'push'
)
command
.
send
(
:help_command
).
should
.
be
.
instance_of
Pod
::
Command
::
Push
lambda
{
command
.
run
}.
should
.
raise
CLAide
::
Help
end
it
"raises help! if no other command is passed"
do
lambda
{
command
(
'help'
).
run
}.
should
.
raise
CLAide
::
Help
end
it
"shows the right usage"
do
Pod
::
Command
::
Help
.
arguments
.
should
.
equal
'[COMMAND]'
end
end
end
spec/unit/command_spec.rb
View file @
2a6f800f
...
...
@@ -3,6 +3,7 @@ require File.expand_path('../../spec_helper', __FILE__)
module
Pod
describe
Command
do
it
"returns the proper command class"
do
Command
.
parse
(
%w{ help }
).
should
.
be
.
instance_of
Command
::
Help
Command
.
parse
(
%w{ install }
).
should
.
be
.
instance_of
Command
::
Install
Command
.
parse
(
%w{ list }
).
should
.
be
.
instance_of
Command
::
List
Command
.
parse
(
%w{ outdated }
).
should
.
be
.
instance_of
Command
::
Outdated
...
...
spec/unit/resolver_spec.rb
View file @
2a6f800f
...
...
@@ -121,6 +121,7 @@ module Pod
RestKit
RestKit/JSON
RestKit/Network
RestKit/ObjectMapping/Core
RestKit/ObjectMapping/CoreData
RestKit/ObjectMapping/JSON
RestKit/UI
...
...
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