Class: Slather::Project
- Inherits:
-
Xcodeproj::Project
- Object
- Xcodeproj::Project
- Slather::Project
- Defined in:
- lib/slather/project.rb
Instance Attribute Summary collapse
-
#build_directory ⇒ Object
Returns the value of attribute build_directory.
-
#ci_service ⇒ Object
Returns the value of attribute ci_service.
-
#coverage_service ⇒ Object
Returns the value of attribute coverage_service.
-
#ignore_list ⇒ Object
Returns the value of attribute ignore_list.
Class Method Summary collapse
Instance Method Summary collapse
- #configure_build_directory_from_yml ⇒ Object
- #configure_ci_service_from_yml ⇒ Object
- #configure_coverage_service_from_yml ⇒ Object
- #configure_from_yml ⇒ Object
- #configure_ignore_list_from_yml ⇒ Object
- #setup_for_coverage ⇒ Object
Instance Attribute Details
#build_directory ⇒ Object
Returns the value of attribute build_directory.
9 10 11 |
# File 'lib/slather/project.rb', line 9 def build_directory @build_directory end |
#ci_service ⇒ Object
Returns the value of attribute ci_service.
9 10 11 |
# File 'lib/slather/project.rb', line 9 def ci_service @ci_service end |
#coverage_service ⇒ Object
Returns the value of attribute coverage_service.
9 10 11 |
# File 'lib/slather/project.rb', line 9 def coverage_service @coverage_service end |
#ignore_list ⇒ Object
Returns the value of attribute ignore_list.
9 10 11 |
# File 'lib/slather/project.rb', line 9 def ignore_list @ignore_list end |
Class Method Details
.open(xcodeproj) ⇒ Object
11 12 13 14 15 |
# File 'lib/slather/project.rb', line 11 def self.open(xcodeproj) proj = super proj.configure_from_yml proj end |
.yml ⇒ Object
45 46 47 |
# File 'lib/slather/project.rb', line 45 def self.yml @yml ||= File.exist?(yml_filename) ? YAML.load_file(yml_filename) : {} end |
.yml_filename ⇒ Object
41 42 43 |
# File 'lib/slather/project.rb', line 41 def self.yml_filename '.slather.yml' end |
Instance Method Details
#configure_build_directory_from_yml ⇒ Object
56 57 58 |
# File 'lib/slather/project.rb', line 56 def configure_build_directory_from_yml self.build_directory = self.class.yml["build_directory"] if self.class.yml["build_directory"] && !@build_directory end |
#configure_ci_service_from_yml ⇒ Object
64 65 66 |
# File 'lib/slather/project.rb', line 64 def configure_ci_service_from_yml self.ci_service ||= (self.class.yml["ci_service"] || :travis_ci) end |
#configure_coverage_service_from_yml ⇒ Object
72 73 74 |
# File 'lib/slather/project.rb', line 72 def configure_coverage_service_from_yml self.coverage_service ||= (self.class.yml["coverage_service"] || :terminal) end |
#configure_from_yml ⇒ Object
49 50 51 52 53 54 |
# File 'lib/slather/project.rb', line 49 def configure_from_yml configure_build_directory_from_yml configure_ignore_list_from_yml configure_ci_service_from_yml configure_coverage_service_from_yml end |
#configure_ignore_list_from_yml ⇒ Object
60 61 62 |
# File 'lib/slather/project.rb', line 60 def configure_ignore_list_from_yml self.ignore_list ||= [(self.class.yml["ignore"] || [])].flatten end |
#setup_for_coverage ⇒ Object
88 89 90 91 92 93 |
# File 'lib/slather/project.rb', line 88 def setup_for_coverage build_configurations.each do |build_configuration| build_configuration.build_settings["GCC_INSTRUMENT_PROGRAM_FLOW_ARCS"] = "YES" build_configuration.build_settings["GCC_GENERATE_TEST_COVERAGE_FILES"] = "YES" end end |