lib/slather/project.rb in slather-0.0.233 vs lib/slather/project.rb in slather-0.0.234

- old
+ new

@@ -4,11 +4,11 @@ require 'yaml' module Slather class Project < Xcodeproj::Project - attr_accessor :build_directory, :ignore_list + attr_accessor :build_directory, :ignore_list, :ci_service def self.open(xcodeproj) proj = super proj.configure_from_yml proj @@ -27,11 +27,11 @@ def coverage_files coverage_files = Dir["#{build_directory}/**/*.gcno"].map do |file| coverage_file = coverage_file_class.new(file) coverage_file.project = self # If there's no source file for this gcno, it probably belongs to another project. - if coverage_file.source_file_pathname && !(coverage_file.source_file_pathname_relative_to_project_root.to_s =~ /^(#{ignore_list.join("|")})$/) + if coverage_file.source_file_pathname && !coverage_file.ignored? coverage_file else nil end end.compact @@ -56,9 +56,10 @@ end def configure_from_yml self.build_directory = self.class.yml_file["build_directory"] if self.class.yml_file["build_directory"] self.ignore_list = self.class.yml_file["ignore"] || [] + self.ci_service = (self.class.yml_file["ci_service"] || :travis_ci).to_sym coverage_service = self.class.yml_file["coverage_service"] if coverage_service == "coveralls" extend(Slather::CoverageService::Coveralls) elsif coverage_service == "terminal" \ No newline at end of file