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
98d0fb0c
Commit
98d0fb0c
authored
May 15, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fine tuning console output.
parent
cac18c84
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
20 deletions
+24
-20
git.rb
lib/cocoapods/downloader/git.rb
+3
-3
http.rb
lib/cocoapods/downloader/http.rb
+0
-0
executable.rb
lib/cocoapods/executable.rb
+8
-2
installer.rb
lib/cocoapods/installer.rb
+9
-11
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+4
-4
No files found.
lib/cocoapods/downloader/git.rb
View file @
98d0fb0c
...
@@ -13,7 +13,7 @@ module Pod
...
@@ -13,7 +13,7 @@ module Pod
def
download
def
download
prepare_cache
prepare_cache
puts
'->
'
.
green
<<
'
Cloning git repo'
if
config
.
verbose?
puts
'-> Cloning git repo'
if
config
.
verbose?
if
options
[
:tag
]
if
options
[
:tag
]
download_tag
download_tag
elsif
options
[
:commit
]
elsif
options
[
:commit
]
...
@@ -26,7 +26,7 @@ module Pod
...
@@ -26,7 +26,7 @@ module Pod
def
prepare_cache
def
prepare_cache
unless
cache_exist?
unless
cache_exist?
puts
'->'
.
green
<<
"
Creating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
puts
"->
Creating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
rmtree
if
cache_path
.
exist?
cache_path
.
mkpath
cache_path
.
mkpath
git
"clone '
#{
url
}
'
#{
cache_path
}
"
git
"clone '
#{
url
}
'
#{
cache_path
}
"
...
@@ -71,7 +71,7 @@ module Pod
...
@@ -71,7 +71,7 @@ module Pod
end
end
def
update_cache
def
update_cache
puts
'->'
.
green
<<
"
Updating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
puts
"->
Updating cache git repo (
#{
cache_path
}
)"
if
config
.
verbose?
Dir
.
chdir
(
cache_path
)
do
Dir
.
chdir
(
cache_path
)
do
git
"reset --hard HEAD"
git
"reset --hard HEAD"
git
"clean -d -x -f"
git
"clean -d -x -f"
...
...
lib/cocoapods/downloader/http.rb
View file @
98d0fb0c
lib/cocoapods/executable.rb
View file @
98d0fb0c
...
@@ -7,8 +7,14 @@ module Pod
...
@@ -7,8 +7,14 @@ module Pod
raise
Informative
,
"Unable to locate the executable `
#{
name
}
'"
raise
Informative
,
"Unable to locate the executable `
#{
name
}
'"
end
end
if
Config
.
instance
.
verbose?
if
Config
.
instance
.
verbose?
puts
"-> [
#{
Dir
.
pwd
}
] $
#{
bin
}
#{
command
}
"
print
" $
#{
name
}
#{
command
.
length
>
20
?
command
[
0
..
20
]
+
'...'
:
command
}
\r
"
`
#{
bin
}
#{
command
}
1>&2`
$stdout
.
flush
output
=
`
#{
bin
}
#{
command
}
2>&1`
puts
"
#{
$?
.
exitstatus
.
zero?
?
'-'
:
'!'
.
red
}
#{
name
}
#{
command
}
"
output
=
output
.
gsub
(
/^ */
,
' '
)
puts
output
unless
output
.
strip
.
empty?
else
else
`
#{
bin
}
#{
command
}
2> /dev/null`
`
#{
bin
}
#{
command
}
2> /dev/null`
end
end
...
...
lib/cocoapods/installer.rb
View file @
98d0fb0c
...
@@ -48,18 +48,17 @@ module Pod
...
@@ -48,18 +48,17 @@ module Pod
pods
.
each
do
|
pod
|
pods
.
each
do
|
pod
|
unless
config
.
silent?
unless
config
.
silent?
marker
=
config
.
verbose
?
"
\n
-> "
.
green
:
''
marker
=
config
.
verbose
?
"
\n
-> "
.
green
:
''
name
=
pod
.
top_specification
.
preferred_dependency
?
"
#{
pod
.
top_specification
.
name
}
/
#{
pod
.
top_specification
.
preferred_dependency
}
(
#{
pod
.
top_specification
.
version
}
)"
:
pod
.
name
name
=
pod
.
top_specification
.
preferred_dependency
?
"
#{
pod
.
top_specification
.
name
}
/
#{
pod
.
top_specification
.
preferred_dependency
}
(
#{
pod
.
top_specification
.
version
}
)"
:
pod
.
to_s
puts
marker
<<
(
pod
.
exists?
?
"Using
#{
name
}
"
:
"Installing
#{
name
}
"
.
green
)
puts
marker
<<
(
pod
.
exists?
?
"Using
#{
name
}
"
:
"Installing
#{
name
}
"
.
green
)
end
end
should_install
=
!
pod
.
exists?
unless
pod
.
exists?
if
should_install
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
.
download
downloader
.
download
end
# The docs need to be generated before cleaning
generate_docs
(
pod
)
generate_docs
(
pod
)
pod
.
clean
if
config
.
clean
&&
should_install
pod
.
clean
if
config
.
clean
end
end
end
end
end
...
@@ -67,12 +66,11 @@ module Pod
...
@@ -67,12 +66,11 @@ module Pod
def
generate_docs
(
pod
)
def
generate_docs
(
pod
)
doc_generator
=
Generator
::
Documentation
.
new
(
pod
)
doc_generator
=
Generator
::
Documentation
.
new
(
pod
)
if
(
config
.
generate_docs?
&&
!
doc_generator
.
already_installed?
)
||
config
.
force_doc?
if
(
config
.
generate_docs?
&&
!
doc_generator
.
already_installed?
)
||
config
.
force_doc?
message
=
"Installing documentation"
puts
"-> Installing documentation"
if
config
.
verbose?
doc_generator
.
generate
(
config
.
doc_install?
)
doc_generator
.
generate
(
config
.
doc_install?
)
else
else
message
=
"
Using existing documentation"
puts
"->
Using existing documentation"
end
end
puts
"-> "
.
green
<<
message
<<
" for
#{
pod
.
name
}
(
#{
pod
.
top_specification
.
version
}
)"
if
config
.
verbose?
end
end
def
install!
def
install!
...
@@ -93,11 +91,11 @@ module Pod
...
@@ -93,11 +91,11 @@ module Pod
generate_lock_file!
(
specifications
)
generate_lock_file!
(
specifications
)
generate_dummy_source
generate_dummy_source
puts
"
*
Running post install hooks"
if
config
.
verbose?
puts
"
-
Running post install hooks"
if
config
.
verbose?
# Post install hooks run _before_ saving of project, so that they can alter it before saving.
# Post install hooks run _before_ saving of project, so that they can alter it before saving.
run_post_install_hooks
run_post_install_hooks
puts
"
*
Writing Xcode project file to `
#{
@sandbox
.
project_path
}
'
\n\n
"
if
config
.
verbose?
puts
"
-
Writing Xcode project file to `
#{
@sandbox
.
project_path
}
'
\n\n
"
if
config
.
verbose?
project
.
save_as
(
@sandbox
.
project_path
)
project
.
save_as
(
@sandbox
.
project_path
)
UserProjectIntegrator
.
new
(
@podfile
).
integrate!
if
config
.
integrate_targets?
UserProjectIntegrator
.
new
(
@podfile
).
integrate!
if
config
.
integrate_targets?
...
...
lib/cocoapods/installer/target_installer.rb
View file @
98d0fb0c
...
@@ -92,15 +92,15 @@ module Pod
...
@@ -92,15 +92,15 @@ module Pod
def
create_files
(
pods
,
sandbox
)
def
create_files
(
pods
,
sandbox
)
if
@podfile
.
generate_bridge_support?
if
@podfile
.
generate_bridge_support?
bridge_support_metadata_path
=
sandbox
.
root
+
@target_definition
.
bridge_support_name
bridge_support_metadata_path
=
sandbox
.
root
+
@target_definition
.
bridge_support_name
puts
"
*
Generating BridgeSupport metadata file at `
#{
bridge_support_metadata_path
}
'"
if
config
.
verbose?
puts
"
-
Generating BridgeSupport metadata file at `
#{
bridge_support_metadata_path
}
'"
if
config
.
verbose?
bridge_support_generator_for
(
pods
,
sandbox
).
save_as
(
bridge_support_metadata_path
)
bridge_support_generator_for
(
pods
,
sandbox
).
save_as
(
bridge_support_metadata_path
)
copy_resources_script_for
(
pods
).
resources
<<
@target_definition
.
bridge_support_name
copy_resources_script_for
(
pods
).
resources
<<
@target_definition
.
bridge_support_name
end
end
puts
"
*
Generating xcconfig file at `
#{
sandbox
.
root
+
@target_definition
.
xcconfig_name
}
'"
if
config
.
verbose?
puts
"
-
Generating xcconfig file at `
#{
sandbox
.
root
+
@target_definition
.
xcconfig_name
}
'"
if
config
.
verbose?
xcconfig
.
save_as
(
sandbox
.
root
+
@target_definition
.
xcconfig_name
)
xcconfig
.
save_as
(
sandbox
.
root
+
@target_definition
.
xcconfig_name
)
puts
"
*
Generating prefix header at `
#{
sandbox
.
root
+
@target_definition
.
prefix_header_name
}
'"
if
config
.
verbose?
puts
"
-
Generating prefix header at `
#{
sandbox
.
root
+
@target_definition
.
prefix_header_name
}
'"
if
config
.
verbose?
save_prefix_header_as
(
sandbox
.
root
+
@target_definition
.
prefix_header_name
,
pods
)
save_prefix_header_as
(
sandbox
.
root
+
@target_definition
.
prefix_header_name
,
pods
)
puts
"
*
Generating copy resources script at `
#{
sandbox
.
root
+
@target_definition
.
copy_resources_script_name
}
'"
if
config
.
verbose?
puts
"
-
Generating copy resources script at `
#{
sandbox
.
root
+
@target_definition
.
copy_resources_script_name
}
'"
if
config
.
verbose?
copy_resources_script_for
(
pods
).
save_as
(
sandbox
.
root
+
@target_definition
.
copy_resources_script_name
)
copy_resources_script_for
(
pods
).
save_as
(
sandbox
.
root
+
@target_definition
.
copy_resources_script_name
)
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