spec/integration_2.rb
def run_post_execution_actions(folder)
  Dir.glob("#{TMP_DIR + folder}/**/*.xcodeproj") do |project_path|
    xcodeproj = Xcodeproj::Project.new(project_path)
    require 'yaml'
    pretty_print = xcodeproj.pretty_print
    sections = []
    sorted_keys = ['File References', 'Targets', 'Build Configurations']
    sorted_keys.each do |key|
      yaml =  { key => pretty_print[key]}.to_yaml
      sections << yaml
    end
    file_contents = (sections * "\n\n").gsub!("---",'')
    File.open("#{project_path}.yaml", 'w') do |file|
      file.write(file_contents)
    end
  end
end
# Creates a YAML representation of the Xcodeproj files which should be used as
# a reference.
#
Creates a YAML representation of the Xcodeproj files which should be used as
a reference.
Creates a YAML representation of the Xcodeproj files which should be used as a reference .
def run_post_execution_actions(folder)
  Dir.glob("#{TMP_DIR + folder}/**/*.xcodeproj") do |project_path|
    xcodeproj = Xcodeproj::Project.new(project_path)
    require 'yaml'
    pretty_print = xcodeproj.pretty_print
    sections = []
    sorted_keys = ['File References', 'Targets', 'Build Configurations']
    sorted_keys.each do |key|
      yaml =  { key => pretty_print[key]}.to_yaml
      sections << yaml
    end
    file_contents = (sections * "\n\n").gsub!("---",'')
    File.open("#{project_path}.yaml", 'w') do |file|
      file.write(file_contents)
    end
  end
end
def run_post_execution_actions ( folder ) Dir . glob ( "#{TMP_DIR + folder}/**/*.xcodeproj" ) do | project_path | xcodeproj = Xcodeproj :: Project . new ( project_path ) require 'yaml' pretty_print = xcodeproj . pretty_print sections = [ ] sorted_keys = [ 'File References' , 'Targets' , 'Build Configurations' ] sorted_keys . each do | key | yaml = { key => pretty_print [ key ] } . to_yaml sections << yaml end file_contents = ( sections * "\n\n" ) . gsub! ( "---" , '' ) File . open ( "#{project_path}.yaml" , 'w' ) do | file | file . write ( file_contents ) end end end
Creates a YAML representation of the Xcodeproj files which should be used as
a reference.
Creates a YAML representation of the Xcodeproj files which should be used as a reference .
folder