Rakefile in p8-metric_fu-0.9.0 vs Rakefile in p8-metric_fu-0.9.0.1

- old
+ new

@@ -1,11 +1,28 @@ require 'rake' require 'rake/rdoctask' require 'spec/rake/spectask' -require File.join(File.dirname(__FILE__), 'lib', 'metric_fu') +require 'lib/metric_fu' desc "Run all specs in spec directory" Spec::Rake::SpecTask.new(:spec) do |t| t.spec_files = FileList['spec/**/*_spec.rb'] end -task :default => [:"metrics:all"] \ No newline at end of file +MetricFu::Configuration.run do |config| +end + +namespace :metrics do + desc "Generate all reports" + task :all do + MetricFu.metrics.each {|metric| MetricFu.report.add(metric) } + MetricFu.report.save_output(MetricFu.report.to_yaml, + MetricFu.base_directory, + 'report.yml') + MetricFu.report.save_templatized_report + if MetricFu.report.open_in_browser? + MetricFu.report.show_in_browser(MetricFu.output_directory) + end + end +end + +task :default => [:"metrics:all"]