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
a24f3975
Commit
a24f3975
authored
Feb 16, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Go green!
parent
b929d99b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
40 deletions
+64
-40
library_data.rb
lib/cocoapods/hooks/library_data.rb
+9
-1
installer.rb
lib/cocoapods/installer.rb
+41
-36
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+3
-0
DependenciesList.txt
...ec_callbacks/after/Pods/Reachability/DependenciesList.txt
+2
-2
execution_output.txt
...gration/install_spec_callbacks/after/execution_output.txt
+1
-1
integration_2.rb
spec/integration_2.rb
+8
-0
No files found.
lib/cocoapods/hooks/library_data.rb
View file @
a24f3975
...
...
@@ -8,9 +8,17 @@ module Pod
class
LibraryData
def
dependencies
[]
library
.
target_definition
.
dependencies
end
def
initialize
(
library
)
@library
=
library
end
private
attr_reader
:library
end
end
end
...
...
lib/cocoapods/installer.rb
View file @
a24f3975
...
...
@@ -313,41 +313,6 @@ module Pod
@installed_specs
.
concat
(
specs_by_platform
.
values
.
flatten
)
end
# Runs the pre install hooks of the installed specs and of the Podfile.
#
# @return [void]
#
def
run_pre_install_hooks
UI
.
message
"- Running pre install hooks"
do
installed_specs
.
each
do
|
spec
|
executed
=
spec
.
pre_install!
(
pod_data
(
spec
),
library_data
(
nil
))
UI
.
message
"-
#{
spec
.
name
}
"
if
executed
end
executed
=
@podfile
.
pre_install!
(
installer_data
)
UI
.
message
"- Podfile"
if
executed
end
end
# Runs the post install hooks of the installed specs and of the Podfile.
#
# @note Post install hooks run _before_ saving of project, so that they
# can alter it before it is written to the disk.
#
# @return [void]
#
def
run_post_install_hooks
UI
.
message
"- Running post install hooks"
do
installed_specs
.
each
do
|
spec
|
target_installer_data
=
target_installers_data
.
first
#TODO
executed
=
spec
.
post_install!
(
target_installer_data
)
UI
.
message
"-
#{
spec
.
name
}
"
if
executed
end
executed
=
@podfile
.
post_install!
(
installer_data
)
UI
.
message
"- Podfile"
if
executed
end
end
# Installs the file references in the Pods project. This is done once per
# Pod as the same file reference might be shared by multiple targets.
...
...
@@ -428,6 +393,46 @@ module Pod
# @!group Hooks
# Runs the pre install hooks of the installed specs and of the Podfile.
#
# @return [void]
#
def
run_pre_install_hooks
UI
.
message
"- Running pre install hooks"
do
installed_specs
.
each
do
|
spec
|
executed
=
spec
.
pre_install!
(
pod_data
(
spec
),
library_data
(
libraries
.
first
))
#todo
UI
.
message
"-
#{
spec
.
name
}
"
if
executed
end
executed
=
@podfile
.
pre_install!
(
installer_data
)
UI
.
message
"- Podfile"
if
executed
end
end
# Runs the post install hooks of the installed specs and of the Podfile.
#
# @note Post install hooks run _before_ saving of project, so that they
# can alter it before it is written to the disk.
#
# @return [void]
#
def
run_post_install_hooks
UI
.
message
"- Running post install hooks"
do
installed_specs
.
each
do
|
spec
|
target_installer_data
=
target_installers_data
.
first
#TODO
executed
=
spec
.
post_install!
(
target_installer_data
)
UI
.
message
"-
#{
spec
.
name
}
"
if
executed
end
executed
=
@podfile
.
post_install!
(
installer_data
)
UI
.
message
"- Podfile"
if
executed
end
end
public
# @!group Hooks Data
def
installer_data
Hooks
::
InstallerData
.
new
(
self
)
end
...
...
@@ -456,7 +461,7 @@ module Pod
end
def
library_data
(
library
)
Hooks
::
LibraryData
.
new
Hooks
::
LibraryData
.
new
(
library
)
end
#-------------------------------------------------------------------------#
...
...
lib/cocoapods/installer/file_references_installer.rb
View file @
a24f3975
...
...
@@ -33,6 +33,9 @@ module Pod
# @return [void]
#
def
install!
file_accessors
.
each
do
|
fa
|
fa
.
path_list
.
read_file_system
end
add_source_files_references
add_resources_references
link_headers
...
...
spec/integration/install_spec_callbacks/after/Pods/Reachability/DependenciesList.txt
View file @
a24f3975
Reachability (from `Reachability.podspec')
\ No newline at end of file
Reachability (from `Reachability.podspec`)
\ No newline at end of file
spec/integration/install_spec_callbacks/after/execution_output.txt
View file @
a24f3975
...
...
@@ -36,10 +36,10 @@ Generating Pods Project
- Reachability
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `Pods` iOS 6.0
- Adding Build files
- Linking headers
- Generating xcconfig file at `Pods/Pods.xcconfig`
- Generating target header at `Pods/Pods-header.h`
- Generating prefix header at `Pods/Pods-prefix.pch`
...
...
spec/integration_2.rb
View file @
a24f3975
...
...
@@ -199,6 +199,14 @@ def yaml_should_match(expected, produced)
diff
.
gsub!
(
"$produced"
,
"produced"
.
green
)
diff
.
gsub!
(
"$expected"
,
"expected"
.
red
)
desc
<<
(
"--- DIFF "
<<
"-"
*
70
)
Diffy
::
Diff
.
new
(
expected
.
to_s
,
produced
.
to_s
,
:source
=>
'files'
,
:context
=>
3
).
each
do
|
line
|
case
line
when
/^\+/
then
desc
<<
line
.
gsub
(
"
\n
"
,
''
).
green
when
/^-/
then
desc
<<
line
.
gsub
(
"
\n
"
,
''
).
red
else
desc
<<
line
.
gsub
(
"
\n
"
,
''
)
end
end
desc
<<
(
"--- DIFF "
<<
"-"
*
70
)
desc
<<
diff
desc
<<
(
"--- END "
<<
"-"
*
70
)
expected_yaml
.
should
.
satisfy
(
desc
*
"
\n\n
"
)
do
...
...
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