Commit f4a4f8b5 authored by Samuel Giddins's avatar Samuel Giddins

[HeadersStore] Store search paths by platform name

parent f6a90181
......@@ -35,7 +35,7 @@ module Pod
# root with the `${PODS_ROOT}` variable.
#
def search_paths(platform)
platform_search_paths = @search_paths.select { |entry| entry[:platform] == platform }
platform_search_paths = @search_paths.select { |entry| entry[:platform] == platform.name }
headers_dir = root.relative_path_from(sandbox.root).dirname
["${PODS_ROOT}/#{headers_dir}/#{@relative_path}"] + platform_search_paths.uniq.map { |entry| "${PODS_ROOT}/#{headers_dir}/#{entry[:path]}" }
......@@ -117,7 +117,7 @@ module Pod
# @return [void]
#
def add_search_path(path, platform)
@search_paths << { :platform => platform, :path => (Pathname.new(@relative_path) + path) }
@search_paths << { :platform => platform.name, :path => (Pathname.new(@relative_path) + path) }
end
#-----------------------------------------------------------------------#
......
......@@ -47,9 +47,9 @@ module Pod
end
it 'only exposes header search paths for the given platform' do
@header_dir.add_search_path('iOS Search Path', :ios)
@header_dir.add_search_path('OS X Search Path', :osx)
@header_dir.search_paths(:ios).sort.should == [
@header_dir.add_search_path('iOS Search Path', Platform.ios)
@header_dir.add_search_path('OS X Search Path', Platform.osx)
@header_dir.search_paths(Platform.ios).sort.should == [
'${PODS_ROOT}/Headers/Public',
'${PODS_ROOT}/Headers/Public/iOS Search Path',
]
......
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