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
0e297f05
Commit
0e297f05
authored
Apr 07, 2015
by
AliSoftware
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mr-xcassets-revised' into ali-xcassets-1546
parents
99424503
ec560f3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
8 deletions
+31
-8
file_accessor.rb
lib/cocoapods/sandbox/file_accessor.rb
+12
-6
banana-lib.tar.gz
spec/fixtures/banana-lib.tar.gz
+0
-0
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+13
-2
file_accessor_spec.rb
spec/unit/sandbox/file_accessor_spec.rb
+1
-0
path_list_spec.rb
spec/unit/sandbox/path_list_spec.rb
+5
-0
No files found.
lib/cocoapods/sandbox/file_accessor.rb
View file @
0e297f05
...
...
@@ -124,8 +124,7 @@ module Pod
header_files
-
private_headers
end
# @return [Hash{ Symbol => Array<Pathname> }] the resources of the
# specification grouped by destination.
# @return [Array<Pathname>] the resources of the specification.
#
def
resources
paths_for_attribute
(
:resources
,
true
)
...
...
@@ -168,7 +167,7 @@ module Pod
def
resource_bundles
result
=
{}
spec_consumer
.
resource_bundles
.
each
do
|
name
,
file_patterns
|
paths
=
expanded_paths
(
file_patterns
,
:include_dirs
=>
true
)
paths
=
expanded_paths
(
file_patterns
,
:include_dirs
=>
true
,
:exclude_patterns
=>
%w(**/*.xcassets)
)
result
[
name
]
=
paths
end
result
...
...
@@ -254,15 +253,22 @@ module Pod
# Matches the given patterns to the file present in the root of the path
# list.
#
# @param [Array<String>] patterns
# @param
[Array<String>] patterns
# The patterns to expand.
#
# @param [String] dir_pattern
# @param [Hash] options
# The options to use to expand the patterns to file paths.
#
# @option options [String] :dir_pattern
# The pattern to add to directories.
#
# @
param [Array<String>]
exclude_patterns
# @
option options [Array<String>] :
exclude_patterns
# The exclude patterns to pass to the PathList.
#
# @option options [Bool] :include_dirs
# Whether directories should be also included or just plain
# files.
#
# @raise [Informative] If the pod does not exists.
#
# @return [Array<Pathname>] A list of the paths.
...
...
spec/fixtures/banana-lib.tar.gz
View file @
0e297f05
No preview for this file type
spec/unit/installer/pod_source_installer_spec.rb
View file @
0e297f05
...
...
@@ -25,7 +25,7 @@ module Pod
config
.
sandbox
.
store_head_pod
(
'BananaLib'
)
@spec
.
source
=
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:tag
=>
'v1.0'
}
@installer
.
install!
@installer
.
specific_source
[
:commit
].
should
==
'
0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc
'
@installer
.
specific_source
[
:commit
].
should
==
'
9c7802033af588bed9dd5cb089bc8998a65bbd29
'
pod_folder
=
config
.
sandbox
.
pod_dir
(
'BananaLib'
)
pod_folder
.
should
.
exist
end
...
...
@@ -45,7 +45,7 @@ module Pod
sources
=
@installer
.
sandbox
.
checkout_sources
sources
.
should
==
{
'BananaLib'
=>
{
:git
=>
SpecHelper
.
fixture
(
'banana-lib'
),
:commit
=>
'
0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc
'
},
:commit
=>
'
9c7802033af588bed9dd5cb089bc8998a65bbd29
'
},
}
end
...
...
@@ -180,13 +180,19 @@ module Pod
paths
=
@installer
.
send
(
:used_files
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)
}
relative_paths
.
sort
.
should
==
[
'Pods/BananaLib/Bananalib.framework'
,
'Pods/BananaLib/Classes/Banana.h'
,
'Pods/BananaLib/Classes/Banana.m'
,
'Pods/BananaLib/Classes/BananaLib.pch'
,
'Pods/BananaLib/Classes/BananaPrivate.h'
,
'Pods/BananaLib/Classes/BananaTrace.d'
,
'Pods/BananaLib/LICENSE'
,
'Pods/BananaLib/README'
,
'Pods/BananaLib/Resources/Images.xcassets'
,
'Pods/BananaLib/Resources/logo-sidebar.png'
,
'Pods/BananaLib/Resources/sub_dir'
,
'Pods/BananaLib/libBananalib.a'
,
'Pods/BananaLib/preserve_me.txt'
,
]
end
...
...
@@ -204,13 +210,18 @@ module Pod
paths
=
@installer
.
send
(
:used_files
)
relative_paths
=
paths
.
map
{
|
p
|
p
.
gsub
(
"
#{
temporary_directory
}
/"
,
''
)
}
relative_paths
.
sort
.
should
==
[
'Pods/BananaLib/Bananalib.framework'
,
'Pods/BananaLib/Classes/Banana.h'
,
'Pods/BananaLib/Classes/Banana.m'
,
'Pods/BananaLib/Classes/BananaLib.pch'
,
'Pods/BananaLib/Classes/BananaPrivate.h'
,
'Pods/BananaLib/LICENSE'
,
'Pods/BananaLib/README'
,
'Pods/BananaLib/Resources/Images.xcassets'
,
'Pods/BananaLib/Resources/logo-sidebar.png'
,
'Pods/BananaLib/Resources/sub_dir'
,
'Pods/BananaLib/libBananalib.a'
,
'Pods/BananaLib/preserve_me.txt'
,
]
end
...
...
spec/unit/sandbox/file_accessor_spec.rb
View file @
0e297f05
...
...
@@ -100,6 +100,7 @@ module Pod
it
'returns the resources'
do
@accessor
.
resources
.
sort
.
should
==
[
@root
+
'Resources/Images.xcassets'
,
@root
+
'Resources/logo-sidebar.png'
,
@root
+
'Resources/sub_dir'
,
]
...
...
spec/unit/sandbox/path_list_spec.rb
View file @
0e297f05
...
...
@@ -21,6 +21,8 @@ module Pod
Classes/BananaPrivate.h
Classes/BananaTrace.d
README
Resources/Images.xcassets/Logo.imageset/Contents.json
Resources/Images.xcassets/Logo.imageset/logo.png
Resources/logo-sidebar.png
Resources/sub_dir/logo-sidebar.png
libBananalib.a
...
...
@@ -45,6 +47,8 @@ module Pod
Bananalib.framework/Versions/Current
Classes
Resources
Resources/Images.xcassets
Resources/Images.xcassets/Logo.imageset
Resources/sub_dir
sub-dir
sub-dir/sub-dir-2
...
...
@@ -127,6 +131,7 @@ module Pod
it
'can optionally include the directories in the results'
do
paths
=
@path_list
.
relative_glob
(
'Resources/*'
,
:include_dirs
=>
true
).
map
(
&
:to_s
)
paths
.
sort
.
should
==
%w(
Resources/Images.xcassets
Resources/logo-sidebar.png
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