class FruityBuilder::IOS::XCodeBuild

Attributes

path[RW]

Public Class Methods

get_build_configurations(project_path) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 39
def self.get_build_configurations(project_path)
  retrieve_project_section(get_project_info(project_path), 'Build Configurations:')
end
get_project_info(project_path) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 47
def self.get_project_info(project_path)
  info = execute("xcodebuild -project #{project_path} -list")
  raise XCodeBuildCommandError.new(info.stderr) if info.exit != 0
  info.stdout.split("\n").map { |a| a.strip }
end
get_schemes(project_path) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 35
def self.get_schemes(project_path)
  retrieve_project_section(get_project_info(project_path), 'Schemes:')
end
get_targets(project_path) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 43
def self.get_targets(project_path)
  retrieve_project_section(get_project_info(project_path), 'Targets:')
end
new(path) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 9
def initialize(path)
  @path = path
end
retrieve_project_section(project_info, section) click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 25
def self.retrieve_project_section(project_info, section)
  index = project_info.index(section)
  section_values = []
  for i in index+1..project_info.count - 1
    break if project_info[i].empty?
    section_values << project_info[i]
  end
  section_values
end

Public Instance Methods

get_build_configurations() click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 21
def get_build_configurations
  self.class.get_build_configurations(path)
end
get_schemes() click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 13
def get_schemes
  self.class.get_schemes(path)
end
get_targets() click to toggle source
# File lib/fruity_builder/xcodebuild.rb, line 17
def get_targets
  self.class.get_targets(path)
end