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
d0344d84
Commit
d0344d84
authored
Dec 07, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Command] Fix issue that lead to ignoring the --verbose option.
parent
69daa1dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
command.rb
lib/cocoapods/command.rb
+6
-3
setup.rb
lib/cocoapods/command/setup.rb
+8
-3
setup_spec.rb
spec/functional/command/setup_spec.rb
+1
-1
No files found.
lib/cocoapods/command.rb
View file @
d0344d84
...
@@ -24,7 +24,7 @@ module Pod
...
@@ -24,7 +24,7 @@ module Pod
def
self
.
parse
(
argv
)
def
self
.
parse
(
argv
)
command
=
super
command
=
super
unless
command
.
is_a?
(
Setup
)
||
ENV
[
'SKIP_SETUP'
]
unless
command
.
is_a?
(
Setup
)
||
ENV
[
'SKIP_SETUP'
]
Setup
.
new
(
CLAide
::
ARGV
.
new
([])).
run_if_needed
Setup
.
run_if_needed
end
end
command
command
end
end
...
@@ -48,10 +48,13 @@ module Pod
...
@@ -48,10 +48,13 @@ module Pod
end
end
end
end
# @todo If a command is run inside another one some settings which where
# true might return false.
#
def
initialize
(
argv
)
def
initialize
(
argv
)
config
.
silent
=
argv
.
flag?
(
'silent'
)
config
.
silent
||
=
argv
.
flag?
(
'silent'
)
super
super
config
.
verbose
=
self
.
verbose?
config
.
verbose
||
=
self
.
verbose?
# TODO we should probably not even load colored unless needed
# TODO we should probably not even load colored unless needed
String
.
send
(
:define_method
,
:colorize
)
{
|
string
,
_
|
string
}
unless
self
.
colorize_output?
String
.
send
(
:define_method
,
:colorize
)
{
|
string
,
_
|
string
}
unless
self
.
colorize_output?
end
end
...
...
lib/cocoapods/command/setup.rb
View file @
d0344d84
...
@@ -24,8 +24,12 @@ module Pod
...
@@ -24,8 +24,12 @@ module Pod
super
super
end
end
def
self
.
dir
Config
.
instance
.
repos_dir
+
'master'
end
def
dir
def
dir
config
.
repos_dir
+
'master'
self
.
class
.
dir
end
end
def
read_only_url
def
read_only_url
...
@@ -82,8 +86,9 @@ module Pod
...
@@ -82,8 +86,9 @@ module Pod
end
end
end
end
def
run_if_needed
def
self
.
run_if_needed
run
unless
dir
.
exist?
&&
Repo
.
compatible?
(
'master'
)
self
.
new
(
CLAide
::
ARGV
.
new
([])).
run
unless
dir
.
exist?
&&
Repo
.
compatible?
(
'master'
)
end
end
def
run
def
run
...
...
spec/functional/command/setup_spec.rb
View file @
d0344d84
...
@@ -49,7 +49,7 @@ describe Pod::Command::Setup do
...
@@ -49,7 +49,7 @@ describe Pod::Command::Setup do
output
=
run_command
(
'setup'
)
output
=
run_command
(
'setup'
)
output
.
should
.
include
"Setup completed"
output
.
should
.
include
"Setup completed"
Pod
::
UI
.
output
=
''
Pod
::
UI
.
output
=
''
command
(
'setup'
)
.
run_if_needed
Pod
::
Command
::
Setup
.
run_if_needed
Pod
::
UI
.
output
.
should
==
''
Pod
::
UI
.
output
.
should
==
''
end
end
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