Created
December 8, 2011 21:08
-
-
Save coreyhaines/1448598 to your computer and use it in GitHub Desktop.
Sample of my old custom stats file that adds spec_no_rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['LOAD_RAILS'] == '1' | |
task :stats => "ma:add_no_rails_dirs_to_stats" | |
namespace :ma do | |
desc "Report code statistics (KLOCs, etc) from the application" | |
task :add_no_rails_dirs_to_stats do | |
require 'rails/code_statistics' | |
::STATS_DIRECTORIES << %w(NoRails\ Lib\ specs spec_no_rails/lib) if File.exist?('spec_no_rails/lib') | |
::CodeStatistics::TEST_TYPES << "NoRails Lib specs" if File.exist?('spec_no_rails/lib') | |
::STATS_DIRECTORIES << %w(NoRails\ Model\ specs spec_no_rails/model) if File.exist?('spec_no_rails/model') | |
::CodeStatistics::TEST_TYPES << "NoRails Model specs" if File.exist?('spec_no_rails/model') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is back when I was putting my code in lib/app_name. I put it in app/app_name now, so you can alter this, if you like.