Sha256: d2f7cd27c6e915f1e7b8f62792b5b83703b5fdf14751aea4993db26662190e00
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
#!/usr/bin/env ruby require 'clamp' require 'yaml' require File.join(File.dirname(__FILE__), '..', 'lib', 'slather') Clamp do self.default_subcommand = "coverage" subcommand "coverage", "Computes coverage for the supplised project" do option "--project, -p", "PROJECT", "Path to the xcodeproj", :attribute_name => :xcodeproj_path option ["--coveralls", "-c"], :flag, "Post coverage results to coveralls" option ["--simple-output", "-s"], :flag, "Post coverage results to coveralls" option ["--build-directory", "-b"], "BUILD_DIRECTORY", "The directory where gcno files will be written to. Defaults to derived data." option ["--ignore", "-i"], "IGNORE", "ignore files conforming to a path", :multivalued => true def execute puts "Slathering..." xcodeproj_path_to_open = xcodeproj_path || Slather::Project.yml_file["xcodeproj"] project = Slather::Project.open(xcodeproj_path_to_open) if coveralls? project.extend(Slather::CoverageService::Coveralls) elsif simple_output? project.extend(Slather::CoverageService::SimpleOutput) end project.ignore_list = ignore_list if !ignore_list.empty? project.build_directory = build_directory if build_directory project.post puts "Done slathering!" end end subcommand "setup", "Configures an xcodeproj for test coverage generation" do parameter "[xcodeproj]", "Path to the xcodeproj", :attribute_name => :xcodeproj_path def execute project = Slather::Project.open(xcodeproj_path) project.setup_for_coverage project.save end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slather-0.0.233 | bin/slather |