Rakefile in churn-0.0.12 vs Rakefile in churn-0.0.13
- old
+ new
@@ -9,23 +9,55 @@
gem.summary = %Q{Providing additional churn metrics over the original metric_fu churn}
gem.description = %Q{High method and class churn has been shown to have increased bug and error rates. This gem helps you know what is changing a lot so you can do additional testing, code review, or refactoring to try to tame the volatile code. }
gem.email = "dan@devver.net"
gem.homepage = "http://github.com/danmayer/churn"
gem.authors = ["Dan Mayer"]
- gem.add_development_dependency "thoughtbot-shoulda"
+ gem.add_development_dependency "shoulda"
gem.add_development_dependency "test-construct"
gem.add_development_dependency "mocha", '~> 0.9.5'
gem.add_dependency "main"
gem.add_dependency "json_pure"
- gem.add_dependency "chronic", '~> 0.2.3'
+ gem.add_dependency "chronic", '>= 0.2.3'
gem.add_dependency "sexp_processor", '~> 3.0.3'
gem.add_dependency "ruby_parser", '~> 2.0.4'
gem.add_dependency 'hirb'
gem.executables = ['churn']
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+end
+
+begin
+ #for additional metrics, mostly Rcov which caliper doesn't do
+ require 'metric_fu'
+
+ MetricFu::Configuration.run do |config|
+ config.metrics = [:churn, :saikuro, :roodi, :flog, :flay, :reek, :roodi, :rcov, :hotspots]
+ config.graphs = [:roodi, :flog, :flay, :reek, :roodi, :rcov]
+
+ config.flay = { :dirs_to_flay => ['lib'] }
+ config.flog = { :dirs_to_flog => ['lib'] }
+ config.reek = { :dirs_to_reek => ['lib'] }
+ config.roodi = { :dirs_to_roodi => ['lib'] }
+ config.saikuro = { :output_directory => 'tmp/tmp_saikuro',
+ :input_directory => ['lib'],
+ :cyclo => "",
+ :filter_cyclo => "0",
+ :warn_cyclo => "5",
+ :error_cyclo => "7",
+ :formater => "text"} #this needs to be set to "text"
+ config.churn = { :start_date => "3 months ago", :minimum_churn_count => 10}
+ config.rcov = { :test_files => ['test/unit/**/*_test.rb'],
+ :rcov_opts => ["--sort coverage",
+ "--no-html",
+ "--text-coverage",
+ "--no-color",
+ "--profile",
+ "--exclude /gems/,spec"]}
+ end
+rescue Exception
+ puts "metric_fu not working install it"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'