Class: Slather::Project
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#slather_setup_for_coverage
Instance Attribute Details
#build_directory ⇒ Object
Returns the value of attribute build_directory.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def build_directory
@build_directory
end
|
#ci_service ⇒ Object
Returns the value of attribute ci_service.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def ci_service
@ci_service
end
|
#coverage_access_token ⇒ Object
Returns the value of attribute coverage_access_token.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def coverage_access_token
@coverage_access_token
end
|
#coverage_service ⇒ Object
Returns the value of attribute coverage_service.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def coverage_service
@coverage_service
end
|
#ignore_list ⇒ Object
Returns the value of attribute ignore_list.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def ignore_list
@ignore_list
end
|
#output_directory ⇒ Object
Returns the value of attribute output_directory.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def output_directory
@output_directory
end
|
#show_html ⇒ Object
Returns the value of attribute show_html.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def show_html
@show_html
end
|
#source_directory ⇒ Object
Returns the value of attribute source_directory.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def source_directory
@source_directory
end
|
#xcodeproj ⇒ Object
Returns the value of attribute xcodeproj.
22
23
24
|
# File 'lib/slather/project.rb', line 22
def xcodeproj
@xcodeproj
end
|
Class Method Details
.open(xcodeproj) ⇒ Object
26
27
28
29
30
31
|
# File 'lib/slather/project.rb', line 26
def self.open(xcodeproj)
proj = super
proj.configure_from_yml
proj.xcodeproj = xcodeproj
proj
end
|
.yml ⇒ Object
66
67
68
|
# File 'lib/slather/project.rb', line 66
def self.yml
@yml ||= File.exist?(yml_filename) ? YAML.load_file(yml_filename) : {}
end
|
.yml_filename ⇒ Object
62
63
64
|
# File 'lib/slather/project.rb', line 62
def self.yml_filename
'.slather.yml'
end
|
Instance Method Details
80
81
82
|
# File 'lib/slather/project.rb', line 80
def configure_build_directory_from_yml
self.build_directory = self.class.yml["build_directory"] if self.class.yml["build_directory"] && !@build_directory
end
|
96
97
98
|
# File 'lib/slather/project.rb', line 96
def configure_ci_service_from_yml
self.ci_service ||= (self.class.yml["ci_service"] || :travis_ci)
end
|
108
109
110
|
# File 'lib/slather/project.rb', line 108
def configure_coverage_access_token_from_yml
self.coverage_access_token ||= (ENV["COVERAGE_ACCESS_TOKEN"] || self.class.yml["coverage_access_token"] || "")
end
|
104
105
106
|
# File 'lib/slather/project.rb', line 104
def configure_coverage_service_from_yml
self.coverage_service ||= (self.class.yml["coverage_service"] || :terminal)
end
|
70
71
72
73
74
75
76
77
78
|
# File 'lib/slather/project.rb', line 70
def configure_from_yml
configure_build_directory_from_yml
configure_ignore_list_from_yml
configure_ci_service_from_yml
configure_coverage_access_token_from_yml
configure_coverage_service_from_yml
configure_source_directory_from_yml
configure_output_directory_from_yml
end
|
92
93
94
|
# File 'lib/slather/project.rb', line 92
def configure_ignore_list_from_yml
self.ignore_list ||= [(self.class.yml["ignore"] || [])].flatten
end
|
88
89
90
|
# File 'lib/slather/project.rb', line 88
def configure_output_directory_from_yml
self.output_directory ||= self.class.yml["output_directory"] if self.class.yml["output_directory"]
end
|
84
85
86
|
# File 'lib/slather/project.rb', line 84
def configure_source_directory_from_yml
self.source_directory ||= self.class.yml["source_directory"] if self.class.yml["source_directory"]
end
|