GeneralTask
# File lib/redmine_plugin_support/stats_task.rb, line 19 def define # TODO: Need to get rspec stats to work namespace :spec do task :statsetup do require 'code_statistics' STATS_DIRECTORIES << %(Model\ specs spec/models) if File.exist?("#{RedmineHelper.plugin_root}/spec/models") STATS_DIRECTORIES << %(View\ specs spec/views) if File.exist?("#{RedmineHelper.plugin_root}/spec/views") STATS_DIRECTORIES << %(Controller\ specs spec/controllers) if File.exist?("#{RedmineHelper.plugin_root}/spec/controllers") STATS_DIRECTORIES << %(Helper\ specs spec/helpers) if File.exist?("#{RedmineHelper.plugin_root}/spec/helpers") STATS_DIRECTORIES << %(Library\ specs spec/lib) if File.exist?("#{RedmineHelper.plugin_root}/spec/lib") STATS_DIRECTORIES << %(Routing\ specs spec/routing) if File.exist?("#{RedmineHelper.plugin_root}/spec/routing") STATS_DIRECTORIES << %(Integration\ specs spec/integration) if File.exist?("#{RedmineHelper.plugin_root}/spec/integration") ::CodeStatistics::TEST_TYPES << "Model specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/models") ::CodeStatistics::TEST_TYPES << "View specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/views") ::CodeStatistics::TEST_TYPES << "Controller specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/controllers") ::CodeStatistics::TEST_TYPES << "Helper specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/helpers") ::CodeStatistics::TEST_TYPES << "Library specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/lib") ::CodeStatistics::TEST_TYPES << "Routing specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/routing") ::CodeStatistics::TEST_TYPES << "Integration specs" if File.exist?("#{RedmineHelper.plugin_root}/spec/integration") end end desc "Report code statistics (KLOCs, etc) from the application" task :stats do require 'code_statistics' CodeStatistics.new(*stats_directories).to_s end self end
Generated with the Darkfish Rdoc Generator 2.