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
54a496dc
Commit
54a496dc
authored
May 16, 2014
by
Olivier Halligon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrating to new CLAide::Command#arguments syntax (see CocoaPods/CLAide#26)
parent
686af4af
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
56 additions
and
18 deletions
+56
-18
help.rb
lib/cocoapods/command/help.rb
+3
-1
init.rb
lib/cocoapods/command/init.rb
+3
-1
inter_process_communication.rb
lib/cocoapods/command/inter_process_communication.rb
+6
-2
lib.rb
lib/cocoapods/command/lib.rb
+4
-1
project.rb
lib/cocoapods/command/project.rb
+3
-1
push.rb
lib/cocoapods/command/push.rb
+4
-1
repo.rb
lib/cocoapods/command/repo.rb
+14
-4
search.rb
lib/cocoapods/command/search.rb
+3
-1
spec.rb
lib/cocoapods/command/spec.rb
+15
-5
help_spec.rb
spec/functional/command/help_spec.rb
+1
-1
No files found.
lib/cocoapods/command/help.rb
View file @
54a496dc
...
...
@@ -2,7 +2,9 @@ module Pod
class
Command
class
Help
<
Command
self
.
summary
=
'Show help for the given command.'
self
.
arguments
=
'[COMMAND]'
self
.
arguments
=
[
[
'COMMAND'
,
:optional
]
]
def
initialize
(
argv
)
@help_command
=
Pod
::
Command
.
parse
(
argv
)
...
...
lib/cocoapods/command/init.rb
View file @
54a496dc
...
...
@@ -17,7 +17,9 @@ module Pod
(test targets) files which should be stored in the
`~/.cocoapods/templates` folder.
DESC
self
.
arguments
=
'[XCODEPROJ]'
self
.
arguments
=
[
[
'XCODEPROJ'
,
:optional
]
]
def
initialize
(
argv
)
@podfile_path
=
Pathname
.
pwd
+
"Podfile"
...
...
lib/cocoapods/command/inter_process_communication.rb
View file @
54a496dc
...
...
@@ -15,7 +15,9 @@ module Pod
self
.
summary
=
'Converts a podspec to JSON.'
self
.
description
=
'Converts a podspec to JSON and prints it to STDOUT.'
self
.
arguments
=
'PATH'
self
.
arguments
=
[
[
'PATH'
,
:required
]
]
def
initialize
(
argv
)
@path
=
argv
.
shift_argument
...
...
@@ -40,7 +42,9 @@ module Pod
self
.
summary
=
'Converts a Podfile to YAML.'
self
.
description
=
'Converts a Podfile to YAML and prints it to STDOUT.'
self
.
arguments
=
'PATH'
self
.
arguments
=
[
[
'PATH'
,
:required
]
]
def
initialize
(
argv
)
@path
=
argv
.
shift_argument
...
...
lib/cocoapods/command/lib.rb
View file @
54a496dc
...
...
@@ -14,7 +14,10 @@ module Pod
If a `TEMPLATE_URL`, pointing to a git repo containing a compatible template, is specified, it will be used in place of the default one.
DESC
self
.
arguments
=
'NAME [TEMPLATE_URL]'
self
.
arguments
=
[
[
'NAME'
,
:required
],
[
'TEMPLATE_URL'
,
:optional
]
]
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
...
...
lib/cocoapods/command/project.rb
View file @
54a496dc
...
...
@@ -85,7 +85,9 @@ module Pod
be used to install changes to the Podfile.
DESC
self
.
arguments
=
'[POD_NAMES...]'
self
.
arguments
=
[
[
'POD_NAMES...'
,
:optional
]
]
def
initialize
(
argv
)
@pods
=
argv
.
arguments!
unless
argv
.
arguments
.
empty?
...
...
lib/cocoapods/command/push.rb
View file @
54a496dc
...
...
@@ -13,7 +13,10 @@ module Pod
directory, and finally it pushes REPO to its remote.
DESC
self
.
arguments
=
'REPO [NAME.podspec]'
self
.
arguments
=
[
[
'REPO'
,
:required
],
[
'NAME.podspec'
,
:optional
]
]
def
self
.
options
[
[
"--allow-warnings"
,
"Allows pushing even if there are warnings"
],
...
...
lib/cocoapods/command/repo.rb
View file @
54a496dc
...
...
@@ -17,7 +17,11 @@ module Pod
remote can later be referred to by `NAME`.
DESC
self
.
arguments
=
'NAME URL [BRANCH]'
self
.
arguments
=
[
[
'NAME'
,
:required
],
[
'URL'
,
:required
],
[
'BRANCH'
,
:optional
]
]
def
self
.
options
[
...
...
@@ -63,7 +67,9 @@ module Pod
this will update all spec-repos in `~/.cocoapods/repos`.
DESC
self
.
arguments
=
'[NAME]'
self
.
arguments
=
[
[
'NAME'
,
:optional
]
]
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
...
...
@@ -86,7 +92,9 @@ module Pod
will lint all the spec-repos known to CocoaPods.
DESC
self
.
arguments
=
'[ NAME | DIRECTORY ]'
self
.
arguments
=
[
[
'NAME | DIRECTORY'
,
:optional
]
]
def
self
.
options
[[
"--only-errors"
,
"Lint presents only the errors"
]].
concat
(
super
)
...
...
@@ -152,7 +160,9 @@ module Pod
Deletes the remote named `NAME` from the local spec-repos directory at `~/.cocoapods/repos/.`
DESC
self
.
arguments
=
'NAME'
self
.
arguments
=
[
[
'NAME'
,
:required
]
]
def
initialize
(
argv
)
@name
=
argv
.
shift_argument
...
...
lib/cocoapods/command/search.rb
View file @
54a496dc
...
...
@@ -9,7 +9,9 @@ module Pod
description of the pods.
DESC
self
.
arguments
=
'QUERY'
self
.
arguments
=
[
[
'QUERY'
,
:required
]
]
def
self
.
options
[
...
...
lib/cocoapods/command/spec.rb
View file @
54a496dc
...
...
@@ -18,7 +18,9 @@ module Pod
If a GitHub url is passed the spec is prepopulated.
DESC
self
.
arguments
=
'[ NAME | https://github.com/USER/REPO ]'
self
.
arguments
=
[
[
'NAME | https://github.com/USER/REPO'
,
:optional
]
]
def
initialize
(
argv
)
@name_or_url
,
@url
=
argv
.
shift_argument
,
argv
.
shift_argument
...
...
@@ -56,7 +58,9 @@ module Pod
the argument is omitted, it defaults to the current working dir.
DESC
self
.
arguments
=
'[ NAME.podspec | DIRECTORY | http://PATH/NAME.podspec, ... ]'
self
.
arguments
=
[
[
'NAME.podspec | DIRECTORY | http://PATH/NAME.podspec, ...'
,
:optional
]
]
def
self
.
options
[
[
"--quick"
,
"Lint skips checks that would require to download and build the spec"
],
...
...
@@ -148,7 +152,9 @@ module Pod
Prints the path of 'NAME.podspec'
DESC
self
.
arguments
=
'[ NAME ]'
self
.
arguments
=
[
[
'NAME'
,
:optional
]
]
def
self
.
options
[[
"--show-all"
,
"Print all versions of the given podspec"
]].
concat
(
super
)
...
...
@@ -180,7 +186,9 @@ module Pod
Prints 'NAME.podspec' to standard output.
DESC
self
.
arguments
=
'[ NAME ]'
self
.
arguments
=
[
[
'NAME'
,
:optional
]
]
def
self
.
options
[[
"--show-all"
,
"Pick from all versions of the given podspec"
]].
concat
(
super
)
...
...
@@ -220,7 +228,9 @@ module Pod
Opens 'NAME.podspec' to be edited.
DESC
self
.
arguments
=
'[ NAME ]'
self
.
arguments
=
[
[
'NAME'
,
:optional
]
]
def
self
.
options
[[
"--show-all"
,
"Pick which spec to edit from all available versions of the given podspec"
]].
concat
(
super
)
...
...
spec/functional/command/help_spec.rb
View file @
54a496dc
...
...
@@ -15,7 +15,7 @@ module Pod
end
it
"shows the right usage"
do
Pod
::
Command
::
Help
.
arguments
.
should
.
equal
'[COMMAND]'
Pod
::
Command
::
Help
.
arguments
.
should
.
equal
[[
'COMMAND'
,
:optional
]]
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