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
d9f450c7
Commit
d9f450c7
authored
Feb 19, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor todos
parent
57fb7838
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+14
-3
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+2
-7
spec_helper.rb
spec/spec_helper.rb
+2
-1
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+6
-0
No files found.
lib/cocoapods/installer/file_references_installer.rb
View file @
d9f450c7
...
@@ -33,9 +33,7 @@ module Pod
...
@@ -33,9 +33,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
install!
def
install!
file_accessors
.
each
do
|
fa
|
refresh_file_accessors
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
...
@@ -47,6 +45,19 @@ module Pod
...
@@ -47,6 +45,19 @@ module Pod
# @!group Installation Steps
# @!group Installation Steps
# Reads the file accessors contents from the file system.
#
# @note The contents of the file accessors are modified by the clean
# step of the #{PodSourceInstaller} and by the pre install hooks.
#
# @return [void]
#
def
refresh_file_accessors
file_accessors
.
each
do
|
fa
|
fa
.
path_list
.
read_file_system
end
end
# Adds the source files of the Pods to the Pods project.
# Adds the source files of the Pods to the Pods project.
#
#
# @note The source files are grouped by Pod and in turn by subspec
# @note The source files are grouped by Pod and in turn by subspec
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
d9f450c7
...
@@ -271,18 +271,13 @@ module Pod
...
@@ -271,18 +271,13 @@ module Pod
def
used_files
def
used_files
files
=
[
files
=
[
file_accessors
.
map
(
&
:source_files
),
file_accessors
.
map
(
&
:source_files
),
file_accessors
.
map
(
&
:resources
).
first
.
values
,
#TODO
file_accessors
.
map
(
&
:resources
).
map
(
&
:values
).
flatten
,
file_accessors
.
map
(
&
:preserve_paths
),
file_accessors
.
map
(
&
:preserve_paths
),
file_accessors
.
map
(
&
:prefix_header
),
file_accessors
.
map
(
&
:prefix_header
),
file_accessors
.
map
(
&
:readme
),
file_accessors
.
map
(
&
:readme
),
file_accessors
.
map
(
&
:license
),
file_accessors
.
map
(
&
:license
),
]
]
files
.
compact!
files
.
flatten
.
map!
{
|
path
|
path
.
to_s
}.
uniq
files
.
flatten!
files
.
uniq!
files
.
map!
{
|
path
|
path
.
to_s
}
files
.
reject!
{
|
path
|
path
==
""
}
#TODO
files
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
spec/spec_helper.rb
View file @
d9f450c7
...
@@ -11,6 +11,7 @@ $:.unshift((ROOT + 'spec').to_s)
...
@@ -11,6 +11,7 @@ $:.unshift((ROOT + 'spec').to_s)
require
'cocoapods'
require
'cocoapods'
require
'claide'
require
'claide'
require
'awesome_print'
require
'spec_helper/bacon'
# Prettifies the bacon output and adds support for `xit`.
require
'spec_helper/bacon'
# Prettifies the bacon output and adds support for `xit`.
require
'spec_helper/command'
# Allows to run Pod commands and returns their output.
require
'spec_helper/command'
# Allows to run Pod commands and returns their output.
...
@@ -88,7 +89,7 @@ def fixture_file_accessor(name, platform = :ios)
...
@@ -88,7 +89,7 @@ def fixture_file_accessor(name, platform = :ios)
file
=
SpecHelper
::
Fixture
.
fixture
(
name
)
file
=
SpecHelper
::
Fixture
.
fixture
(
name
)
spec
=
Pod
::
Specification
.
from_file
(
file
)
spec
=
Pod
::
Specification
.
from_file
(
file
)
path_list
=
Pod
::
Sandbox
::
PathList
.
new
(
file
.
dirname
)
path_list
=
Pod
::
Sandbox
::
PathList
.
new
(
file
.
dirname
)
file_accessor
=
Pod
::
Sandbox
::
FileAccessor
.
new
(
path_list
,
spec
.
consumer
(
platform
))
Pod
::
Sandbox
::
FileAccessor
.
new
(
path_list
,
spec
.
consumer
(
platform
))
end
end
# TODO This should not be needed anymore
# TODO This should not be needed anymore
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
d9f450c7
...
@@ -15,6 +15,12 @@ module Pod
...
@@ -15,6 +15,12 @@ module Pod
describe
"Installation"
do
describe
"Installation"
do
it
"adds the files references of the source files the Pods project"
do
@file_accessor
.
path_list
.
read_file_system
@file_accessor
.
path_list
.
expects
(
:read_file_system
)
@installer
.
install!
end
it
"adds the files references of the source files the Pods project"
do
it
"adds the files references of the source files the Pods project"
do
@installer
.
install!
@installer
.
install!
group_ref
=
@installer
.
pods_project
[
'Pods/BananaLib'
]
group_ref
=
@installer
.
pods_project
[
'Pods/BananaLib'
]
...
...
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