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
Show 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
...
@@ -8,9 +8,17 @@ module Pod
class
LibraryData
class
LibraryData
def
dependencies
def
dependencies
[]
library
.
target_definition
.
dependencies
end
end
def
initialize
(
library
)
@library
=
library
end
private
attr_reader
:library
end
end
end
end
end
end
...
...
lib/cocoapods/installer.rb
View file @
a24f3975
...
@@ -313,41 +313,6 @@ module Pod
...
@@ -313,41 +313,6 @@ module Pod
@installed_specs
.
concat
(
specs_by_platform
.
values
.
flatten
)
@installed_specs
.
concat
(
specs_by_platform
.
values
.
flatten
)
end
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
# 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.
# Pod as the same file reference might be shared by multiple targets.
...
@@ -428,6 +393,46 @@ module Pod
...
@@ -428,6 +393,46 @@ module Pod
# @!group Hooks
# @!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
def
installer_data
Hooks
::
InstallerData
.
new
(
self
)
Hooks
::
InstallerData
.
new
(
self
)
end
end
...
@@ -456,7 +461,7 @@ module Pod
...
@@ -456,7 +461,7 @@ module Pod
end
end
def
library_data
(
library
)
def
library_data
(
library
)
Hooks
::
LibraryData
.
new
Hooks
::
LibraryData
.
new
(
library
)
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
...
...
lib/cocoapods/installer/file_references_installer.rb
View file @
a24f3975
...
@@ -33,6 +33,9 @@ module Pod
...
@@ -33,6 +33,9 @@ module Pod
# @return [void]
# @return [void]
#
#
def
install!
def
install!
file_accessors
.
each
do
|
fa
|
fa
.
path_list
.
read_file_system
end
add_source_files_references
add_source_files_references
add_resources_references
add_resources_references
link_headers
link_headers
...
...
spec/integration/install_spec_callbacks/after/Pods/Reachability/DependenciesList.txt
View file @
a24f3975
Reachability (from `Reachability.podspec')
Reachability (from `Reachability.podspec`)
\ No newline at end of file
\ 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
...
@@ -36,10 +36,10 @@ Generating Pods Project
- Reachability
- Reachability
- Adding source files to Pods project
- Adding source files to Pods project
- Adding resources to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing targets
- Installing target `Pods` iOS 6.0
- Installing target `Pods` iOS 6.0
- Adding Build files
- Adding Build files
- Linking headers
- Generating xcconfig file at `Pods/Pods.xcconfig`
- Generating xcconfig file at `Pods/Pods.xcconfig`
- Generating target header at `Pods/Pods-header.h`
- Generating target header at `Pods/Pods-header.h`
- Generating prefix header at `Pods/Pods-prefix.pch`
- 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)
...
@@ -199,6 +199,14 @@ def yaml_should_match(expected, produced)
diff
.
gsub!
(
"$produced"
,
"produced"
.
green
)
diff
.
gsub!
(
"$produced"
,
"produced"
.
green
)
diff
.
gsub!
(
"$expected"
,
"expected"
.
red
)
diff
.
gsub!
(
"$expected"
,
"expected"
.
red
)
desc
<<
(
"--- DIFF "
<<
"-"
*
70
)
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
<<
diff
desc
<<
(
"--- END "
<<
"-"
*
70
)
desc
<<
(
"--- END "
<<
"-"
*
70
)
expected_yaml
.
should
.
satisfy
(
desc
*
"
\n\n
"
)
do
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