lib/xcake/context/xcodeproj_context.rb in xcake-0.6.19 vs lib/xcake/context/xcodeproj_context.rb in xcake-0.6.20

- old
+ new

@@ -1,10 +1,9 @@ -require "xcodeproj" +require 'xcodeproj' module Xcake class XcodeprojContext - include Context attr_accessor :project def create_object_for(dsl_object) @@ -16,34 +15,38 @@ when Configuration create_object_for_configuration(dsl_object) when Node create_object_for_node(dsl_object) else - abort "DSL Object not recognized!" + abort 'DSL Object not recognized!' end end def create_object_for_project(project) - puts "Creating Project..." + puts 'Creating Project...' # TODO: Make setup of project testable @project = Xcode::Project.new("./#{project.name}.xcodeproj", true) @project.setup_for_xcake @project end def create_object_for_target(target) - puts "Creating Target..." + puts 'Creating Target...' @project.new_target(target) end def create_object_for_configuration(configuration) - puts "Creating Configuration..." + puts 'Creating Configuration...' @project.new_configuration(configuration) end def create_object_for_node(node) - puts "Creating Group..." + puts 'Creating Group...' @project.new_group(node) + end + + def file_reference_for_path(path) + @project.reference_for_path(path) || @project.new_file_reference(path) end end end