Commit 4036b663 authored by Fabio Pelosin's avatar Fabio Pelosin

[LocalPod] Specs and fix all_specs_public_header_files.

Introduced Chameleon fixture.
parent 337ef587
...@@ -13,6 +13,7 @@ examples/Pods ...@@ -13,6 +13,7 @@ examples/Pods
examples/**/Pods examples/**/Pods
examples/RelativePathProject/RelativePathProject/RelativePathProject.xcodeproj examples/RelativePathProject/RelativePathProject/RelativePathProject.xcodeproj
spec/fixtures/banana-lib spec/fixtures/banana-lib
spec/fixtures/chameleon
spec/fixtures/integration/Headers/ spec/fixtures/integration/Headers/
/concatenated.* /concatenated.*
spec/fixtures/mercurial-repo/.hg/*cache spec/fixtures/mercurial-repo/.hg/*cache
......
...@@ -145,7 +145,7 @@ namespace :gem do ...@@ -145,7 +145,7 @@ namespace :gem do
# Update the last version in CocoaPods-version.yml # Update the last version in CocoaPods-version.yml
specs_branch = '0.6' specs_branch = '0.6'
Dir.chdir ('../Specs') do Dir.chdir('../Specs') do
puts Dir.pwd puts Dir.pwd
sh "git checkout #{specs_branch}" sh "git checkout #{specs_branch}"
sh "git pull" sh "git pull"
......
...@@ -304,7 +304,12 @@ module Pod ...@@ -304,7 +304,12 @@ module Pod
raise Informative, "The pod is cleaned and cannot compute the all the "\ raise Informative, "The pod is cleaned and cannot compute the all the "\
"header files as they might be deleted." "header files as they might be deleted."
end end
header_files
all_specs = [ top_specification ] + top_specification.subspecs
options = {:glob => '*.{h}'}
files = paths_by_spec(:source_files, options, all_specs).values.flatten!
headers = files.select { |f| f.extname == '.h' }
headers
end end
# @!group Target integration # @!group Target integration
...@@ -396,11 +401,12 @@ module Pod ...@@ -396,11 +401,12 @@ module Pod
# @param [Symbol] accessor The accessor to use to obtain the paths patterns. # @param [Symbol] accessor The accessor to use to obtain the paths patterns.
# @param [Hash] options (see #expanded_paths) # @param [Hash] options (see #expanded_paths)
# #
def paths_by_spec(accessor, options = {}) def paths_by_spec(accessor, options = {}, specs = nil)
specs ||= specifications
paths_by_spec = {} paths_by_spec = {}
processed_paths = [] processed_paths = []
specs = specifications.sort_by { |s| s.name.length } specs = specs.sort_by { |s| s.name.length }
specs.each do |spec| specs.each do |spec|
paths = expanded_paths(spec.send(accessor), options) paths = expanded_paths(spec.send(accessor), options)
unless paths.empty? unless paths.empty?
......
This diff is collapsed.
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