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
054fe5c8
Commit
054fe5c8
authored
Oct 24, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to the latest version of CLAide.
parent
178ceade
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
54 additions
and
88 deletions
+54
-88
Gemfile
Gemfile
+1
-1
Gemfile.lock
Gemfile.lock
+5
-5
cocoapods.rb
lib/cocoapods.rb
+2
-3
command.rb
lib/cocoapods/command.rb
+31
-64
list.rb
lib/cocoapods/command/list.rb
+3
-2
outdated.rb
lib/cocoapods/command/outdated.rb
+1
-1
project.rb
lib/cocoapods/command/project.rb
+2
-2
push.rb
lib/cocoapods/command/push.rb
+2
-2
repo.rb
lib/cocoapods/command/repo.rb
+2
-2
search.rb
lib/cocoapods/command/search.rb
+2
-2
setup.rb
lib/cocoapods/command/setup.rb
+1
-1
spec.rb
lib/cocoapods/command/spec.rb
+2
-3
No files found.
Gemfile
View file @
054fe5c8
...
...
@@ -3,7 +3,7 @@ source "http://rubygems.org"
gemspec
# TODO
gem
"
cl
i_
aide
"
,
:git
=>
"git://github.com/alloy/CLAide.git"
gem
"
claide
"
,
:git
=>
"git://github.com/alloy/CLAide.git"
group
:development
do
gem
"
xcodeproj
"
,
:git
=>
"git://github.com/CocoaPods/Xcodeproj.git"
...
...
Gemfile.lock
View file @
054fe5c8
GIT
remote: git://github.com/CocoaPods/Xcodeproj.git
revision:
cc71c669a05934886c56169bbe209014a7a1af8e
revision:
eaab002f308e2641232630b1b5d4ab3c2f10a10a
specs:
xcodeproj (0.4.0.rc
1
)
xcodeproj (0.4.0.rc
3
)
activesupport (~> 3.2.6)
colored (~> 1.2)
GIT
remote: git://github.com/alloy/CLAide.git
revision:
914c38cabeae22c946e96952b32708edf5e5030a
revision:
fdcc73837ff0c67b440fa9a20dc6366c78f06f09
specs:
cl
i_
aide (0.0.1)
claide (0.0.1)
GIT
remote: https://github.com/alloy/kicker.git
...
...
@@ -93,7 +93,7 @@ PLATFORMS
DEPENDENCIES
awesome_print
bacon
cl
i_
aide!
claide!
cocoapods!
github-markup
kicker!
...
...
lib/cocoapods.rb
View file @
054fe5c8
...
...
@@ -12,16 +12,15 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
end
require
'cocoapods/version'
require
'cli_aide'
module
Pod
class
PlainInformative
<
CLIAide
::
Command
::
Informative
class
PlainInformative
<
StandardError
end
class
Informative
<
PlainInformative
def
message
# TODO: remove formatting from raise calls and remove conditional
super
!~
/\[!\]/
?
"[!]
#{
super
}
\n
"
.
red
:
super
super
!~
/\[!\]/
?
"[!]
#{
super
}
"
.
red
:
super
end
end
...
...
lib/cocoapods/command.rb
View file @
054fe5c8
require
'colored'
require
'claide'
require
'active_support/core_ext/string/inflections'
require
'active_support/core_ext/string/strip.rb'
# TODO why does this not automatically occur even though colored is required first?
CLAide
::
Command
.
colorize_output
=
true
module
Pod
class
Command
<
CLIAide
::
Command
class
PlainInformative
include
CLAide
::
Command
::
InformativeError
end
class
Command
<
CLAide
::
Command
autoload
:ErrorReport
,
'cocoapods/command/error_report'
autoload
:Linter
,
'cocoapods/command/linter'
...
...
@@ -12,76 +20,35 @@ module Pod
def
self
.
options
[
[
'--silent'
,
'Print nothing'
],
[
'--no-color'
,
'Print output without color'
],
[
'--version'
,
'Prints the version of CocoaPods'
],
[
'--silent'
,
'Show nothing'
],
[
'--version'
,
'Show the version of CocoaPods'
],
].
concat
(
super
)
end
#def self.run(argv)
#super
#p Config.instance.verbose?
#end
#def self.run(*argv)
#sub_command = parse(*argv)
#unless sub_command.is_a?(Setup) || ENV['SKIP_SETUP']
#Setup.new(ARGV.new).run_if_needed
#end
#sub_command.run
#UI.puts
#rescue Interrupt
#puts "[!] Cancelled".red
#Config.instance.verbose? ? raise : exit(1)
#rescue Exception => e
#if e.is_a?(PlainInformative) || ENV['COCOA_PODS_ENV'] == 'development' # also catches Informative
#puts e.message
#puts *e.backtrace if Config.instance.verbose? || ENV['COCOA_PODS_ENV'] == 'development'
#else
#puts ErrorReport.report(e)
#end
#exit 1
#end
#def self.parse(*argv)
#argv = ARGV.new(argv)
#if argv.option('--version')
#puts VERSION
#exit!(0)
#end
#show_help = argv.option('--help')
#Config.instance.silent = argv.option('--silent')
#Config.instance.verbose = argv.option('--verbose')
#String.send(:define_method, :colorize) { |string , _| string } if argv.option( '--no-color' )
#command_class = case command_argument = argv.shift_argument
#when 'install' then Install
#when 'list' then List
#when 'outdated' then Outdated
#when 'push' then Push
#when 'repo' then Repo
#when 'search' then Search
#when 'setup' then Setup
#when 'spec' then Spec
#when 'update' then Update
#end
def
self
.
parse
(
argv
)
command
=
super
unless
command
.
is_a?
(
Setup
)
||
ENV
[
'SKIP_SETUP'
]
Setup
.
new
(
CLAide
::
ARGV
.
new
([])).
run_if_needed
end
command
end
#if command_class.nil?
#raise Help.new(self, argv, command_argument)
#elsif show_help
#raise Help.new(command_class, argv)
#else
#command_class.new(argv)
#end
#end
def
self
.
report_error
(
error
)
if
error
.
is_a?
(
Interrupt
)
puts
"[!] Cancelled"
.
red
Config
.
instance
.
verbose?
?
raise
:
exit
(
1
)
else
puts
ErrorReport
.
report
(
error
)
exit
1
end
end
def
initialize
(
argv
)
config
.
silent
=
argv
.
flag?
(
'silent'
)
super
config
.
verbose
=
verbose?
config
.
verbose
=
self
.
verbose?
# TODO we should probably not even load colored unless needed
String
.
send
(
:define_method
,
:colorize
)
{
|
string
,
_
|
string
}
unless
self
.
colorize_output?
end
include
Config
::
Mixin
...
...
lib/cocoapods/command/list.rb
View file @
054fe5c8
module
Pod
class
Command
class
List
<
Command
self
.
summary
=
'Lists all available pods.'
self
.
summary
=
'List pods'
self
.
description
=
'Lists all available pods.'
def
self
.
options
[[
...
...
@@ -36,7 +37,7 @@ module Pod
end
class
New
<
List
self
.
summary
=
'Lists
the pods introduced in the master repository since the last check.
'
self
.
summary
=
'Lists
pods introduced in the master spec-repo since the last check
'
def
run
update_if_necessary!
...
...
lib/cocoapods/command/outdated.rb
View file @
054fe5c8
module
Pod
class
Command
class
Outdated
<
Command
self
.
summary
=
'Show outdated project dependencies
.
'
self
.
summary
=
'Show outdated project dependencies'
self
.
description
=
<<-
DESC
Shows the outdated pods in the current Podfile.lock, but only those from
...
...
lib/cocoapods/command/project.rb
View file @
054fe5c8
...
...
@@ -29,7 +29,7 @@ module Pod
class
Install
<
Command
include
Project
self
.
summary
=
'Install
s dependencies of a project.
'
self
.
summary
=
'Install
project dependencies
'
self
.
description
=
<<-
DESC
Downloads all dependencies defined in `Podfile' and creates an Xcode
...
...
@@ -57,7 +57,7 @@ module Pod
class
Update
<
Command
include
Project
self
.
summary
=
'Update outdated project dependencies
.
'
self
.
summary
=
'Update outdated project dependencies'
def
run
verify_podfile_exists!
...
...
lib/cocoapods/command/push.rb
View file @
054fe5c8
...
...
@@ -4,7 +4,7 @@ require 'active_support/core_ext/string/inflections'
module
Pod
class
Command
class
Push
<
Command
self
.
summary
=
'Push new specifications to a spec-repo
.
'
self
.
summary
=
'Push new specifications to a spec-repo'
self
.
description
=
<<-
DESC
Validates NAME.podspec or `*.podspec' in the current working dir, creates
...
...
@@ -31,7 +31,7 @@ module Pod
super
end
def
validate
_argv
!
def
validate!
super
help!
"A spec-repo name is required."
unless
@repo
end
...
...
lib/cocoapods/command/repo.rb
View file @
054fe5c8
...
...
@@ -6,7 +6,7 @@ module Pod
self
.
abstract_command
=
true
# TODO should not show a usage banner!
self
.
summary
=
'Manage
d spec repos.
'
self
.
summary
=
'Manage
spec-repositories
'
class
Add
<
Repo
self
.
summary
=
'Add a spec repo.'
...
...
@@ -23,7 +23,7 @@ module Pod
super
end
def
validate
_argv
!
def
validate!
super
unless
@name
&&
@url
help!
"Adding a repo needs a `NAME' and a `URL."
...
...
lib/cocoapods/command/search.rb
View file @
054fe5c8
module
Pod
class
Command
class
Search
<
Command
self
.
summary
=
'Search
available pods.
'
self
.
summary
=
'Search
pods
'
self
.
description
=
<<-
DESC
Searches for pods, ignoring case, whose name matches `QUERY'. If the
...
...
@@ -25,7 +25,7 @@ module Pod
super
end
def
validate
_argv
!
def
validate!
super
help!
"A search query is required."
unless
@query
end
...
...
lib/cocoapods/command/setup.rb
View file @
054fe5c8
module
Pod
class
Command
class
Setup
<
Command
self
.
summary
=
'Setup the CocoaPods environment
.
'
self
.
summary
=
'Setup the CocoaPods environment'
self
.
description
=
<<-
DESC
Creates a directory at `~/.cocoapods' which will hold your spec-repos.
...
...
lib/cocoapods/command/spec.rb
View file @
054fe5c8
...
...
@@ -5,8 +5,7 @@ require 'active_support/core_ext/string/inflections'
module
Pod
class
Command
class
Spec
<
Command
# TODO should not show a usage banner!
self
.
summary
=
'Managing PodSpec files'
self
.
summary
=
'Manage pod specs'
class
Create
<
Spec
self
.
summary
=
'Create spec file stub.'
...
...
@@ -23,7 +22,7 @@ module Pod
super
end
def
validate
_argv
!
def
validate!
super
help!
"A pod name or repo URL is required."
unless
@name_or_url
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