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
1a774d12
Commit
1a774d12
authored
Feb 25, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Core] Drop support for resources destination
parent
bf9402c2
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
13 deletions
+11
-13
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+2
-4
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+1
-1
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+1
-1
file_accessor.rb
lib/cocoapods/sandbox/file_accessor.rb
+5
-5
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+1
-1
file_accessor_spec.rb
spec/unit/sandbox/file_accessor_spec.rb
+1
-1
No files found.
lib/cocoapods/installer/file_references_installer.rb
View file @
1a774d12
...
...
@@ -91,12 +91,10 @@ module Pod
def
add_resources_references
UI
.
message
"- Adding resources to Pods project"
do
file_accessors
.
each
do
|
file_accessor
|
file_accessor
.
resources
.
each
do
|
destination
,
resources
|
next
if
resources
.
empty?
files
=
file_accessor
.
resources
.
values
.
flatten
file_accessor
.
resources
.
each
do
|
resources
|
files
=
file_accessor
.
resources
spec_name
=
file_accessor
.
spec
.
name
parent_group
=
pods_project
.
resources
pods_project
.
add_file_references
(
files
,
spec_name
,
parent_group
)
end
end
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
1a774d12
...
...
@@ -272,7 +272,7 @@ module Pod
files
=
[
file_accessors
.
map
(
&
:source_files
),
file_accessors
.
map
(
&
:resources
)
.
map
(
&
:values
).
flatten
,
file_accessors
.
map
(
&
:resources
),
file_accessors
.
map
(
&
:preserve_paths
),
file_accessors
.
map
(
&
:prefix_header
),
file_accessors
.
map
(
&
:readme
),
...
...
lib/cocoapods/installer/target_installer.rb
View file @
1a774d12
...
...
@@ -222,7 +222,7 @@ module Pod
def
create_copy_resources_script
path
=
library
.
copy_resources_script_path
UI
.
message
"- Generating copy resources script at
#{
UI
.
path
(
path
)
}
"
do
resources
=
library
.
file_accessors
.
map
{
|
accessor
|
accessor
.
resources
.
values
.
flatten
.
map
{
|
res
|
project
.
relativize
(
res
)}
}.
flatten
resources
=
library
.
file_accessors
.
map
{
|
accessor
|
accessor
.
resources
.
flatten
.
map
{
|
res
|
project
.
relativize
(
res
)}
}.
flatten
resources
<<
bridge_support_file
if
bridge_support_file
generator
=
Generator
::
CopyResourcesScript
.
new
(
resources
)
generator
.
save_as
(
path
)
...
...
lib/cocoapods/sandbox/file_accessor.rb
View file @
1a774d12
...
...
@@ -83,11 +83,11 @@ module Pod
# specification grouped by destination.
#
def
resources
result
=
{}
spec_consumer
.
resources
.
each
do
|
destination
,
patterns
|
result
[
destination
]
=
expanded_paths
(
patterns
,
{
:include_dirs
=>
true
})
end
result
options
=
{
:exclude_patterns
=>
spec_consumer
.
exclude_files
,
:include_dirs
=>
true
,
}
expanded_paths
(
spec_consumer
.
resources
,
options
)
end
# @return [Array<Pathname>] the files of the specification to preserve.
...
...
spec/unit/installer/pod_source_installer_spec.rb
View file @
1a774d12
...
...
@@ -215,7 +215,7 @@ module Pod
it
"compacts the used files as nil would be converted to the empty string"
do
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:source_files
)
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:resources
).
returns
(
{}
)
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:resources
).
returns
(
nil
)
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:preserve_paths
)
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:prefix_header
)
Sandbox
::
FileAccessor
.
any_instance
.
stubs
(
:readme
)
...
...
spec/unit/sandbox/file_accessor_spec.rb
View file @
1a774d12
...
...
@@ -70,7 +70,7 @@ module Pod
end
it
"returns the resources"
do
@accessor
.
resources
[
:resources
]
.
sort
.
should
==
[
@accessor
.
resources
.
sort
.
should
==
[
@root
+
"Resources/logo-sidebar.png"
,
@root
+
"Resources/sub_dir"
,
]
...
...
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