class BuildConfiguration
Attributes
configuration[RW]
project[RW]
project_load[RW]
release_configuration[RW]
scheme[RW]
sdk[RW]
test_destination[RW]
use_xcpretty[RW]
xcpretty_flags[RW]
Public Class Methods
load(setup_name)
click to toggle source
# File lib/model/build_configuration.rb, line 68 def load(setup_name) build_config = BuildConfiguration.new yaml = YAML.load_file(BUILD_CONFIGURATION_YAML_PATH) if yaml.has_key?(YAML_SETUPS_KEY) setups = yaml[YAML_SETUPS_KEY] parse_named_setup setups, build_config, YAML_DEFAULT_SETUP_NAME if setup_name != YAML_DEFAULT_SETUP_NAME parse_named_setup setups, build_config, setup_name end end return build_config end
new()
click to toggle source
# File lib/model/build_configuration.rb, line 24 def initialize() @use_xcpretty = true @xcpretty_flags = "-c" end
Private Class Methods
parse_named_setup(setups, build_config, setup_name)
click to toggle source
# File lib/model/build_configuration.rb, line 82 def parse_named_setup(setups, build_config, setup_name) filtered_setups = setups.select { |s| s[YAML_SETUP_NAME_KEY] == setup_name} setup = filtered_setups.first if setup build_config.parse_setup(setup) end end
Public Instance Methods
parse_setup(setup)
click to toggle source
# File lib/model/build_configuration.rb, line 29 def parse_setup(setup) if setup.has_key?(YAML_SETUP_WORKSPACE_KEY) @project = setup[YAML_SETUP_WORKSPACE_KEY] @project_load = "-workspace" end if setup.has_key?(YAML_SETUP_PROJECT_KEY) @project = setup[YAML_SETUP_PROJECT_KEY] @project_load = "-project" end if setup.has_key?(YAML_SETUP_SCHEME_KEY) @scheme = setup[YAML_SETUP_SCHEME_KEY] end if setup.has_key?(YAML_SETUP_SDK_KEY) @sdk = setup[YAML_SETUP_SDK_KEY] end if setup.has_key?(YAML_SETUP_CONF_KEY) @configuration = setup[YAML_SETUP_CONF_KEY] end if setup.has_key?(YAML_SETUP_XCPRETTY_KEY) @use_xcpretty = setup[YAML_SETUP_XCPRETTY_KEY] end if setup.has_key?(YAML_SETUP_XCPRETTY_FLAGS_KEY) @xcpretty_flags = setup[YAML_SETUP_XCPRETTY_FLAGS_KEY] end if setup.has_key?(YAML_SETUP_RELEASE_CONFIGURATION_KEY) if self.release_configuration.nil? @release_configuration = ReleaseConfiguration.new end @release_configuration.parse_setup(setup[YAML_SETUP_RELEASE_CONFIGURATION_KEY]) end if setup.has_key?(YAML_SETUP_DESTINATION_KEY) if self.test_destination.nil? @test_destination = TestDestination.new end @test_destination.parse_setup(setup[YAML_SETUP_DESTINATION_KEY]) end end