Class: BuildConfiguration
- Inherits:
-
Object
- Object
- BuildConfiguration
- Defined in:
- lib/model/build_configuration.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#project ⇒ Object
Returns the value of attribute project.
-
#project_load ⇒ Object
Returns the value of attribute project_load.
-
#release_configuration ⇒ Object
Returns the value of attribute release_configuration.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#sdk ⇒ Object
Returns the value of attribute sdk.
-
#test_destination ⇒ Object
Returns the value of attribute test_destination.
-
#use_xcpretty ⇒ Object
Returns the value of attribute use_xcpretty.
-
#xcpretty_flags ⇒ Object
Returns the value of attribute xcpretty_flags.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BuildConfiguration
constructor
A new instance of BuildConfiguration.
- #parse_setup(setup) ⇒ Object
Constructor Details
#initialize ⇒ BuildConfiguration
Returns a new instance of BuildConfiguration.
24 25 26 27 |
# File 'lib/model/build_configuration.rb', line 24 def initialize() @use_xcpretty = true @xcpretty_flags = "-c" end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
19 20 21 |
# File 'lib/model/build_configuration.rb', line 19 def configuration @configuration end |
#project ⇒ Object
Returns the value of attribute project.
19 20 21 |
# File 'lib/model/build_configuration.rb', line 19 def project @project end |
#project_load ⇒ Object
Returns the value of attribute project_load.
19 20 21 |
# File 'lib/model/build_configuration.rb', line 19 def project_load @project_load end |
#release_configuration ⇒ Object
Returns the value of attribute release_configuration.
20 21 22 |
# File 'lib/model/build_configuration.rb', line 20 def release_configuration @release_configuration end |
#scheme ⇒ Object
Returns the value of attribute scheme.
19 20 21 |
# File 'lib/model/build_configuration.rb', line 19 def scheme @scheme end |
#sdk ⇒ Object
Returns the value of attribute sdk.
19 20 21 |
# File 'lib/model/build_configuration.rb', line 19 def sdk @sdk end |
#test_destination ⇒ Object
Returns the value of attribute test_destination.
21 22 23 |
# File 'lib/model/build_configuration.rb', line 21 def test_destination @test_destination end |
#use_xcpretty ⇒ Object
Returns the value of attribute use_xcpretty.
22 23 24 |
# File 'lib/model/build_configuration.rb', line 22 def use_xcpretty @use_xcpretty end |
#xcpretty_flags ⇒ Object
Returns the value of attribute xcpretty_flags.
22 23 24 |
# File 'lib/model/build_configuration.rb', line 22 def xcpretty_flags @xcpretty_flags end |
Class Method Details
.load(setup_name) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 |
# 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 |
Instance Method Details
#parse_setup(setup) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# 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 |