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
eefb1d21
Commit
eefb1d21
authored
Mar 29, 2015
by
Diego Torres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separated resources_by_config into it’s own method to ease testability
parent
6b0f9bb1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+15
-8
No files found.
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
eefb1d21
...
@@ -102,16 +102,11 @@ module Pod
...
@@ -102,16 +102,11 @@ module Pod
end
end
end
end
# Creates a script that copies the resources to the bundle of the client
# Uniqued Resources grouped by config
# target.
#
#
# @note The bridge support file needs to be created before the prefix
# @return [Hash{ Symbol => Array<Pathname> }]
# header, otherwise it will not be added to the resources script.
#
#
# @return [void]
def
resources_by_config
#
def
create_copy_resources_script
path
=
target
.
copy_resources_script_path
library_targets
=
target
.
pod_targets
.
reject
do
|
pod_target
|
library_targets
=
target
.
pod_targets
.
reject
do
|
pod_target
|
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
pod_target
.
should_build?
&&
pod_target
.
requires_frameworks?
end
end
...
@@ -123,6 +118,18 @@ module Pod
...
@@ -123,6 +118,18 @@ module Pod
resources_by_config
[
config
]
=
(
resource_paths
+
resource_bundles
).
uniq
resources_by_config
[
config
]
=
(
resource_paths
+
resource_bundles
).
uniq
resources_by_config
[
config
]
<<
bridge_support_file
if
bridge_support_file
resources_by_config
[
config
]
<<
bridge_support_file
if
bridge_support_file
end
end
resources_by_config
end
# Creates a script that copies the resources to the bundle of the client
# target.
#
# @note The bridge support file needs to be created before the prefix
# header, otherwise it will not be added to the resources script.
#
# @return [void]
#
def
create_copy_resources_script
generator
=
Generator
::
CopyResourcesScript
.
new
(
resources_by_config
,
target
.
platform
)
generator
=
Generator
::
CopyResourcesScript
.
new
(
resources_by_config
,
target
.
platform
)
generator
.
save_as
(
path
)
generator
.
save_as
(
path
)
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
...
...
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