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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
23 deletions
+27
-23
git.rb
lib/cocoapods/downloader/git.rb
+3
-3
http.rb
lib/cocoapods/downloader/http.rb
+3
-3
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
def
download
prepare_cache
puts
'->
'
.
green
<<
'
Cloning git repo'
if
config
.
verbose?
puts
'-> Cloning git repo'
if
config
.
verbose?
if
options
[
:tag
]
download_tag
elsif
options
[
:commit
]
...
...
@@ -26,7 +26,7 @@ module Pod
def
prepare_cache
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
.
mkpath
git
"clone '
#{
url
}
'
#{
cache_path
}
"
...
...
@@ -71,7 +71,7 @@ module Pod
end
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
git
"reset --hard HEAD"
git
"clean -d -x -f"
...
...
lib/cocoapods/downloader/http.rb
View file @
98d0fb0c
...
...
@@ -11,7 +11,7 @@ module Pod
executable
:curl
executable
:unzip
executable
:tar
attr_accessor
:filename
,
:download_path
def
download
@filename
=
filename_with_type
type
...
...
@@ -41,7 +41,7 @@ module Pod
nil
end
end
def
filename_with_type
(
type
=
:zip
)
case
type
when
:zip
...
...
@@ -54,7 +54,7 @@ module Pod
raise
UnsupportedFileTypeError
.
new
"Unsupported file type:
#{
type
}
"
end
end
def
download_file
(
full_filename
)
curl
"-L -o '
#{
full_filename
}
' '
#{
url
}
'"
end
...
...
lib/cocoapods/executable.rb
View file @
98d0fb0c
...
...
@@ -7,8 +7,14 @@ module Pod
raise
Informative
,
"Unable to locate the executable `
#{
name
}
'"
end
if
Config
.
instance
.
verbose?
puts
"-> [
#{
Dir
.
pwd
}
] $
#{
bin
}
#{
command
}
"
`
#{
bin
}
#{
command
}
1>&2`
print
" $
#{
name
}
#{
command
.
length
>
20
?
command
[
0
..
20
]
+
'...'
:
command
}
\r
"
$stdout
.
flush
output
=
`
#{
bin
}
#{
command
}
2>&1`
puts
"
#{
$?
.
exitstatus
.
zero?
?
'-'
:
'!'
.
red
}
#{
name
}
#{
command
}
"
output
=
output
.
gsub
(
/^ */
,
' '
)
puts
output
unless
output
.
strip
.
empty?
else
`
#{
bin
}
#{
command
}
2> /dev/null`
end
...
...
lib/cocoapods/installer.rb
View file @
98d0fb0c
...
...
@@ -48,18 +48,17 @@ module Pod
pods
.
each
do
|
pod
|
unless
config
.
silent?
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
)
end
should_install
=
!
pod
.
exists?
if
should_install
unless
pod
.
exists?
downloader
=
Downloader
.
for_pod
(
pod
)
downloader
.
download
# The docs need to be generated before cleaning
generate_docs
(
pod
)
pod
.
clean
if
config
.
clean
end
generate_docs
(
pod
)
pod
.
clean
if
config
.
clean
&&
should_install
end
end
...
...
@@ -67,12 +66,11 @@ module Pod
def
generate_docs
(
pod
)
doc_generator
=
Generator
::
Documentation
.
new
(
pod
)
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?
)
else
message
=
"
Using existing documentation"
puts
"->
Using existing documentation"
end
puts
"-> "
.
green
<<
message
<<
" for
#{
pod
.
name
}
(
#{
pod
.
top_specification
.
version
}
)"
if
config
.
verbose?
end
def
install!
...
...
@@ -93,11 +91,11 @@ module Pod
generate_lock_file!
(
specifications
)
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.
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
)
UserProjectIntegrator
.
new
(
@podfile
).
integrate!
if
config
.
integrate_targets?
...
...
lib/cocoapods/installer/target_installer.rb
View file @
98d0fb0c
...
...
@@ -92,15 +92,15 @@ module Pod
def
create_files
(
pods
,
sandbox
)
if
@podfile
.
generate_bridge_support?
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
)
copy_resources_script_for
(
pods
).
resources
<<
@target_definition
.
bridge_support_name
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
)
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
)
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
)
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