lib/tasks/reek.rake in p8-metric_fu-0.8.4.14 vs lib/tasks/reek.rake in p8-metric_fu-0.8.4.15
- old
+ new
@@ -1,14 +1,6 @@
namespace :metrics do
-
- REEK_DIR = File.join(MetricFu::BASE_DIRECTORY, 'reek')
- REEK_FILE = File.join(REEK_DIR, 'index.html')
-
- desc "A code smell report using Reek"
+ desc "A code smell report using Reek"
task :reek do
- mkdir_p(REEK_DIR) unless File.directory?(REEK_DIR)
- `echo '<pre>' > #{REEK_FILE}`
- `reek #{RAILS_ROOT}/test/**/*.rb #{RAILS_ROOT}/app/**/*.rb >> #{REEK_FILE}`
- `echo '</pre>' >> #{REEK_FILE}`
- system("open #{REEK_FILE}") if MetricFu.open_in_browser?
+ MetricFu.generate_reek_report
end
end
\ No newline at end of file