Sha256: 9a1e9c6c7d4098222dc8f30912a4560b0020cb871d93b7c94dd869167b508023

Contents?: true

Size: 463 Bytes

Versions: 2

Compression:

Stored size: 463 Bytes

Contents

namespace :metrics do
  
  FLAY_DIR = File.join(MetricFu::BASE_DIRECTORY, 'flay')
  FLAY_FILE = File.join(FLAY_DIR, 'index.html')
  
  desc "A code duplication report using flay"
  task :FLAY do
    mkdir_p(FLAY_DIR) unless File.directory?(FLAY_DIR)
    `echo '<pre>' > #{FLAY_FILE}`
    `flay #{RAILS_ROOT}/test/**/*.rb #{RAILS_ROOT}/app/**/*.rb >> #{FLAY_FILE}`
    `echo '</pre>' >> #{FLAY_FILE}`
    system("open #{FLAY_FILE}") if PLATFORM['darwin']
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jayzes-metric_fu-0.8.0.1 lib/tasks/flay.rake
jayzes-metric_fu-0.8.0 lib/tasks/flay.rake