Sha256: a8dcb1cee870257334dc148fb08922ed7a658b7a7150bf2ac327210f9e5334ef
Contents?: true
Size: 1.47 KB
Versions: 4
Compression:
Stored size: 1.47 KB
Contents
namespace :metrics do RAILROAD_DIR = File.join(MetricFu.configuration.base_directory, 'railroad') RAILROAD_FILE = 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(MetricFu.configuration.base_directory,'model-diagram.png')}` #`echo "<a href=\"railroad/models.png\">Model diagram</a><br />" >> #{RAILROAD_FILE}` 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(MetricFu.configuration.base_directory,'controller-diagram.png')}` #`echo "<a href=\"railroad/controllers.png\">Controller diagram</a><br />" >> #{RAILROAD_FILE}` 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(MetricFu.configuration.base_directory,'aasm-diagram.png')}` #`echo "<a href=\"railroad/aasm.png\">State machine diagram</a><br />" >> #{RAILROAD_FILE}` end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
p8-metric_fu-0.9.0.4 | lib/tasks/railroad.rake |
p8-metric_fu-0.9.0.5 | lib/tasks/railroad.rake |
p8-metric_fu-0.9.0.6 | lib/tasks/railroad.rake |
p8-metric_fu-0.9.0.7 | lib/tasks/railroad.rake |