lib/tasks/railroad.rake in p8-metric_fu-0.9.0.3 vs lib/tasks/railroad.rake in p8-metric_fu-0.9.0.4

- old
+ new

@@ -1,8 +1,8 @@ namespace :metrics do - RAILROAD_DIR = File.join(MetricFu::BASE_DIRECTORY, 'railroad') + RAILROAD_DIR = File.join(MetricFu.configuration.base_directory, 'railroad') RAILROAD_FILE = File.join(RAILROAD_DIR, 'index.html') task :railroad => ['railroad:all'] do end @@ -14,24 +14,24 @@ 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::BASE_DIRECTORY,'model-diagram.png')}` + `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::BASE_DIRECTORY,'controller-diagram.png')}` + `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::BASE_DIRECTORY,'aasm-diagram.png')}` + `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 \ No newline at end of file