Sha256: 24f391a74a6f6649a063ac9c59b177eee659cdf5c3ba7b9ecde53a1a45b7fe6b

Contents?: true

Size: 1.07 KB

Versions: 19

Compression:

Stored size: 1.07 KB

Contents

namespace :metrics do
  
  RAILROAD_DIR = File.join(MetricFu::BASE_DIRECTORY, 'railroad')
  RAILROAD_INDEX = File.join(RAILROAD_DIR, 'index.html')
  
  task :railroad => ['railroad:all'] do
  end
  
  namespace :railroad do
  
    desc "Create all railroad reports"
    task :all => [:models, :controllers, :aasm] do
      #system("open #{RAILROAD_INDEX}") if PLATFORM['darwin']
    end
  
    desc "Create a railroad models report"
    task :models do
      mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
      `railroad -M -a -m -l -v | neato -Tpng > #{File.join(RAILROAD_DIR,'models.png')}`
    end
  
    desc "Create a railroad controllers report"
    task :controllers do
      mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
      `railroad -C -l -v | neato -Tpng > #{File.join(RAILROAD_DIR,'controllers.png')}`
    end
  
    desc "Create a railroad acts_as_state_machine report"
    task :aasm do
      mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
      `railroad -A -l -v | neato -Tpng > #{File.join(RAILROAD_DIR,'aasm.png')}`
    end
    
  end

end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
factorylabs-metric_fu-0.8.0.4 lib/tasks/railroad.rake
jscruggs-metric_fu-0.8.9 lib/tasks/railroad.rake
p8-metric_fu-0.8.0.16 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.1 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.10 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.11 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.12 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.13 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.14 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.15 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.16 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.2 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.3 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.4 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.5 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.6 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.7 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.8 lib/tasks/railroad.rake
p8-metric_fu-0.8.4.9 lib/tasks/railroad.rake