From 728f8700e129103ffb6093b0dec3e5ebfe0c860b Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sun, 21 Apr 2013 02:55:09 +0200 Subject: [PATCH] Fix some zombie issues and prevent devtools mutant rake task --- Rakefile | 8 ++++++++ config/flay.yml | 2 +- lib/mutant/cli.rb | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index e7bccda5..d77f2237 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,13 @@ require 'devtools' Devtools.init_rake_tasks +Rake::TaskManager.class_eval do + def remove_task(task_name) + @tasks.delete(task_name.to_s) + end +end + + namespace :metrics do desc 'Run mutant' task :mutant => :coverage do @@ -12,5 +19,6 @@ namespace :metrics do $stderr.puts 'Zombie task is not successful' $stderr.puts 'Not fatal at this point of development, will be fixed before release of 0.3.0' end + Kernel.exit(0) # FIXME: Prevent devtools mutant task end end diff --git a/config/flay.yml b/config/flay.yml index e87a26ab..cb501642 100644 --- a/config/flay.yml +++ b/config/flay.yml @@ -1,3 +1,3 @@ --- threshold: 16 -total_score: 602 +total_score: 597 diff --git a/lib/mutant/cli.rb b/lib/mutant/cli.rb index 5f44fd68..3c3b112f 100644 --- a/lib/mutant/cli.rb +++ b/lib/mutant/cli.rb @@ -113,7 +113,7 @@ module Mutant # @api private # def reporter - Mutant::Reporter::CLI.new($stdout) + Reporter::CLI.new($stdout) end memoize :reporter @@ -131,7 +131,7 @@ module Mutant raise Error, 'No matchers given' end - Mutant::Matcher::Chain.build(@matchers) + Matcher::Chain.build(@matchers) end memoize :matcher