Commit d9f450c7 authored by Fabio Pelosin's avatar Fabio Pelosin

Fix minor todos

parent 57fb7838
......@@ -33,9 +33,7 @@ module Pod
# @return [void]
#
def install!
file_accessors.each do |fa|
fa.path_list.read_file_system
end
refresh_file_accessors
add_source_files_references
add_resources_references
link_headers
......@@ -47,6 +45,19 @@ module Pod
# @!group Installation Steps
# Reads the file accessors contents from the file system.
#
# @note The contents of the file accessors are modified by the clean
# step of the #{PodSourceInstaller} and by the pre install hooks.
#
# @return [void]
#
def refresh_file_accessors
file_accessors.each do |fa|
fa.path_list.read_file_system
end
end
# Adds the source files of the Pods to the Pods project.
#
# @note The source files are grouped by Pod and in turn by subspec
......
......@@ -271,18 +271,13 @@ module Pod
def used_files
files = [
file_accessors.map(&:source_files),
file_accessors.map(&:resources).first.values, #TODO
file_accessors.map(&:resources).map(&:values).flatten,
file_accessors.map(&:preserve_paths),
file_accessors.map(&:prefix_header),
file_accessors.map(&:readme),
file_accessors.map(&:license),
]
files.compact!
files.flatten!
files.uniq!
files.map!{ |path| path.to_s }
files.reject! { |path| path == "" } #TODO
files
files.flatten.map!{ |path| path.to_s }.uniq
end
#-----------------------------------------------------------------------#
......
......@@ -11,6 +11,7 @@ $:.unshift((ROOT + 'spec').to_s)
require 'cocoapods'
require 'claide'
require 'awesome_print'
require 'spec_helper/bacon' # Prettifies the bacon output and adds support for `xit`.
require 'spec_helper/command' # Allows to run Pod commands and returns their output.
......@@ -88,7 +89,7 @@ def fixture_file_accessor(name, platform = :ios)
file = SpecHelper::Fixture.fixture(name)
spec = Pod::Specification.from_file(file)
path_list = Pod::Sandbox::PathList.new(file.dirname)
file_accessor = Pod::Sandbox::FileAccessor.new(path_list, spec.consumer(platform))
Pod::Sandbox::FileAccessor.new(path_list, spec.consumer(platform))
end
# TODO This should not be needed anymore
......
......@@ -15,6 +15,12 @@ module Pod
describe "Installation" do
it "adds the files references of the source files the Pods project" do
@file_accessor.path_list.read_file_system
@file_accessor.path_list.expects(:read_file_system)
@installer.install!
end
it "adds the files references of the source files the Pods project" do
@installer.install!
group_ref = @installer.pods_project['Pods/BananaLib']
......
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