Commit d7ca4c95 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4098 from CocoaPods/seg-bundles-excluded-files

[FileAccessor] Take exclude_files into account for resource_bundles
parents f370280f 74847854
...@@ -18,6 +18,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -18,6 +18,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#4092](https://github.com/CocoaPods/CocoaPods/issues/4092) [#4092](https://github.com/CocoaPods/CocoaPods/issues/4092)
* Take into account a specification's `exclude_files` when constructing resource
bundles.
[Samuel Giddins](https://github.com/segiddins)
[#4065](https://github.com/CocoaPods/CocoaPods/issues/4065)
## 0.39.0.beta.3 (2015-08-28) ## 0.39.0.beta.3 (2015-08-28)
......
...@@ -241,7 +241,9 @@ module Pod ...@@ -241,7 +241,9 @@ module Pod
def resource_bundles def resource_bundles
result = {} result = {}
spec_consumer.resource_bundles.each do |name, file_patterns| spec_consumer.resource_bundles.each do |name, file_patterns|
paths = expanded_paths(file_patterns, :include_dirs => true) paths = expanded_paths(file_patterns,
:exclude_patterns => spec_consumer.exclude_files,
:include_dirs => true)
result[name] = paths result[name] = paths
end end
result result
......
...@@ -169,6 +169,16 @@ module Pod ...@@ -169,6 +169,16 @@ module Pod
@accessor.resource_bundle_files.should == resource_paths @accessor.resource_bundle_files.should == resource_paths
end end
it 'takes into account exclude_files when creating the resource bundles of the pod' do
@spec_consumer.stubs(:exclude_files).returns(['**/*.png'])
@spec_consumer.stubs(:resource_bundles).returns('BananaLib' => 'Resources/*')
resource_paths = [
@root + 'Resources/Images.xcassets',
@root + 'Resources/sub_dir',
]
@accessor.resource_bundles.should == { 'BananaLib' => resource_paths }
end
it 'returns the prefix header of the specification' do it 'returns the prefix header of the specification' do
@accessor.prefix_header.should == @root + 'Classes/BananaLib.pch' @accessor.prefix_header.should == @root + 'Classes/BananaLib.pch'
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment