lib/slather/project.rb in slather-1.7.1 vs lib/slather/project.rb in slather-1.8
- old
+ new
@@ -17,17 +17,18 @@
end
module Slather
class Project < Xcodeproj::Project
- attr_accessor :build_directory, :ignore_list, :ci_service, :coverage_service, :ci_access_token, :source_directory, :output_directory
+ attr_accessor :build_directory, :ignore_list, :ci_service, :coverage_service, :coverage_access_token, :source_directory, :output_directory, :xcodeproj, :show_html
alias_method :setup_for_coverage, :slather_setup_for_coverage
def self.open(xcodeproj)
proj = super
proj.configure_from_yml
+ proj.xcodeproj = xcodeproj
proj
end
def derived_data_dir
File.expand_path('~') + "/Library/Developer/Xcode/DerivedData/"
@@ -68,11 +69,11 @@
def configure_from_yml
configure_build_directory_from_yml
configure_ignore_list_from_yml
configure_ci_service_from_yml
- configure_ci_access_token_from_yml
+ configure_coverage_access_token_from_yml
configure_coverage_service_from_yml
configure_source_directory_from_yml
configure_output_directory_from_yml
end
@@ -102,28 +103,30 @@
def configure_coverage_service_from_yml
self.coverage_service ||= (self.class.yml["coverage_service"] || :terminal)
end
- def configure_ci_access_token_from_yml
- self.ci_access_token ||= (self.class.yml["ci_access_token"] || "")
+ def configure_coverage_access_token_from_yml
+ self.coverage_access_token ||= (ENV["COVERAGE_ACCESS_TOKEN"] || self.class.yml["coverage_access_token"] || "")
end
def coverage_service=(service)
service = service && service.to_sym
if service == :coveralls
extend(Slather::CoverageService::Coveralls)
+ elsif service == :hardcover
+ extend(Slather::CoverageService::Hardcover)
elsif service == :terminal
extend(Slather::CoverageService::SimpleOutput)
elsif service == :gutter_json
extend(Slather::CoverageService::GutterJsonOutput)
elsif service == :cobertura_xml
extend(Slather::CoverageService::CoberturaXmlOutput)
+ elsif service == :html
+ extend(Slather::CoverageService::HtmlOutput)
else
- raise ArgumentError, "`#{coverage_service}` is not a valid coverage service. Try `terminal`, `coveralls`, `gutter_json` or `cobertura_xml`"
+ raise ArgumentError, "`#{coverage_service}` is not a valid coverage service. Try `terminal`, `coveralls`, `gutter_json`, `cobertura_xml` or `html`"
end
@coverage_service = service
end
-
end
end
-