aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/framework.rake5
-rw-r--r--railties/lib/rails/tasks/gems.rake78
-rw-r--r--railties/lib/rails/tasks/statistics.rake5
3 files changed, 2 insertions, 86 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake
index 3d7e4b5453..1611d1d94d 100644
--- a/railties/lib/rails/tasks/framework.rake
+++ b/railties/lib/rails/tasks/framework.rake
@@ -100,11 +100,6 @@ namespace :rails do
generator.invoke(method)
end
- desc "Update config/boot.rb from your current rails install"
- task :configs do
- invoke_from_app_generator :create_boot_file
- end
-
desc "Update Prototype javascripts from your current rails install"
task :javascripts do
invoke_from_app_generator :create_prototype_files
diff --git a/railties/lib/rails/tasks/gems.rake b/railties/lib/rails/tasks/gems.rake
deleted file mode 100644
index 1903efd5f6..0000000000
--- a/railties/lib/rails/tasks/gems.rake
+++ /dev/null
@@ -1,78 +0,0 @@
-desc "List the gems that this rails application depends on"
-task :gems => 'gems:base' do
- Rails.configuration.gems.each do |gem|
- print_gem_status(gem)
- end
- puts
- puts "I = Installed"
- puts "F = Frozen"
- puts "R = Framework (loaded before rails starts)"
-end
-
-namespace :gems do
- task :base do
- $gems_rake_task = true
- require 'rubygems'
- require 'rubygems/gem_runner'
- Rake::Task[:environment].invoke
- end
-
- desc "Build any native extensions for unpacked gems"
- task :build do
- $gems_build_rake_task = true
- frozen_gems.each { |gem| gem.build }
- end
-
- namespace :build do
- desc "Force the build of all gems"
- task :force do
- $gems_build_rake_task = true
- frozen_gems.each { |gem| gem.build(:force => true) }
- end
- end
-
- desc "Installs all required gems."
- task :install => :base do
- current_gems.each { |gem| gem.install }
- end
-
- desc "Unpacks all required gems into vendor/gems."
- task :unpack => :install do
- current_gems.each { |gem| gem.unpack }
- end
-
- namespace :unpack do
- desc "Unpacks all required gems and their dependencies into vendor/gems."
- task :dependencies => :install do
- current_gems.each { |gem| gem.unpack(:recursive => true) }
- end
- end
-
- desc "Regenerate gem specifications in correct format."
- task :refresh_specs do
- frozen_gems(false).each { |gem| gem.refresh }
- end
-end
-
-def current_gems
- gems = Rails.configuration.gems
- gems = gems.select { |gem| gem.name == ENV['GEM'] } unless ENV['GEM'].blank?
- gems
-end
-
-def frozen_gems(load_specs=true)
- Dir[File.join(Rails.root, 'vendor', 'gems', '*-*')].map do |gem_dir|
- Rails::GemDependency.from_directory_name(gem_dir, load_specs)
- end
-end
-
-def print_gem_status(gem, indent=1)
- code = case
- when gem.framework_gem? then 'R'
- when gem.frozen? then 'F'
- when gem.installed? then 'I'
- else ' '
- end
- puts " "*(indent-1)+" - [#{code}] #{gem.name} #{gem.requirement.to_s}"
- gem.dependencies.each { |g| print_gem_status(g, indent+1) }
-end
diff --git a/railties/lib/rails/tasks/statistics.rake b/railties/lib/rails/tasks/statistics.rake
index 2dcc7bdf9d..40f8c1034a 100644
--- a/railties/lib/rails/tasks/statistics.rake
+++ b/railties/lib/rails/tasks/statistics.rake
@@ -1,14 +1,13 @@
STATS_DIRECTORIES = [
%w(Controllers app/controllers),
- %w(Helpers app/helpers),
+ %w(Helpers app/helpers),
%w(Models app/models),
%w(Libraries lib/),
%w(APIs app/apis),
%w(Integration\ tests test/integration),
%w(Functional\ tests test/functional),
%w(Unit\ tests test/unit)
-
-].collect { |name, dir| [ name, "#{RAILS_ROOT}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
+].collect { |name, dir| [ name, "#{Rails.root}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
desc "Report code statistics (KLOCs, etc) from the application"
task :stats do