lib/tasks/railroad.rake in factorylabs-metric_fu-0.8.0.4 vs lib/tasks/railroad.rake in factorylabs-metric_fu-0.8.0.5
- old
+ new
@@ -1,9 +1,9 @@
namespace :metrics do
RAILROAD_DIR = File.join(MetricFu::BASE_DIRECTORY, 'railroad')
- RAILROAD_INDEX = File.join(RAILROAD_DIR, 'index.html')
+ RAILROAD_FILE = File.join(RAILROAD_DIR, 'index.html')
task :railroad => ['railroad:all'] do
end
namespace :railroad do
@@ -13,23 +13,26 @@
#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')}`
+ #mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
+ `railroad -M -a -m -l -v | neato -Tpng > #{File.join(MetricFu::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(RAILROAD_DIR,'controllers.png')}`
+ #mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
+ `railroad -C -l -v | neato -Tpng > #{File.join(MetricFu::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(RAILROAD_DIR,'aasm.png')}`
+ #mkdir_p(RAILROAD_DIR) unless File.directory?(RAILROAD_DIR)
+ `railroad -A -l -v | neato -Tpng > #{File.join(MetricFu::BASE_DIRECTORY,'aasm-diagram.png')}`
+ #`echo "<a href=\"railroad/aasm.png\">State machine diagram</a><br />" >> #{RAILROAD_FILE}`
end
end
end
\ No newline at end of file