Sha256: 0310de82e39fc204d068863496903d04001cb39bedbd7330e52f1dad428f546d

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

Stored size: 1.11 KB

Contents

# While global constants are bad, many 3rd party tools depend on this one (e.g
# rspec-rails & cucumber-rails). So a deprecation warning is needed if we want
# to remove it.
STATS_DIRECTORIES = [
  %w(Controllers        app/controllers),
  %w(Helpers            app/helpers),
  %w(Jobs               app/jobs),
  %w(Models             app/models),
  %w(Mailers            app/mailers),
  %w(Channels           app/channels),
  %w(JavaScripts        app/assets/javascripts),
  %w(Libraries          lib/),
  %w(APIs               app/apis),
  %w(Controller\ tests  test/controllers),
  %w(Helper\ tests      test/helpers),
  %w(Model\ tests       test/models),
  %w(Mailer\ tests      test/mailers),
  %w(Job\ tests         test/jobs),
  %w(Integration\ tests test/integration),
  %w(System\ tests      test/system),
].collect do |name, dir|
  [ name, "#{File.dirname(Rake.application.rakefile_location)}/#{dir}" ]
end.select { |name, dir| File.directory?(dir) }

desc "Report code statistics (KLOCs, etc) from the application or engine"
task :stats do
  require "rails/code_statistics"
  CodeStatistics.new(*STATS_DIRECTORIES).to_s
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
railties-5.1.7 lib/rails/tasks/statistics.rake
railties-5.1.7.rc1 lib/rails/tasks/statistics.rake
railties-5.1.6.2 lib/rails/tasks/statistics.rake
railties-5.1.6.1 lib/rails/tasks/statistics.rake
railties-5.1.6 lib/rails/tasks/statistics.rake
railties-5.1.5 lib/rails/tasks/statistics.rake
railties-5.1.5.rc1 lib/rails/tasks/statistics.rake
railties-5.1.4 lib/rails/tasks/statistics.rake
railties-5.1.4.rc1 lib/rails/tasks/statistics.rake
railties-5.1.3 lib/rails/tasks/statistics.rake
railties-5.1.3.rc3 lib/rails/tasks/statistics.rake
railties-5.1.3.rc2 lib/rails/tasks/statistics.rake
railties-5.1.3.rc1 lib/rails/tasks/statistics.rake
railties-5.1.2 lib/rails/tasks/statistics.rake
railties-5.1.2.rc1 lib/rails/tasks/statistics.rake
railties-5.1.1 lib/rails/tasks/statistics.rake
railties-5.1.0 lib/rails/tasks/statistics.rake
railties-5.1.0.rc2 lib/rails/tasks/statistics.rake
railties-5.1.0.rc1 lib/rails/tasks/statistics.rake
railties-5.1.0.beta1 lib/rails/tasks/statistics.rake