aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-06-21 10:06:02 +0200
committerJosé Valim <jose.valim@gmail.com>2009-06-23 16:53:47 +0200
commitf03890e151d7a8b9cc413ea9955efc95ff4fbfe6 (patch)
tree0f363237205041f44923e1baa02688e227d57f17
parent04eb5b6e3428a2db773303b339bc776767635aee (diff)
downloadrails-f03890e151d7a8b9cc413ea9955efc95ff4fbfe6.tar.gz
rails-f03890e151d7a8b9cc413ea9955efc95ff4fbfe6.tar.bz2
rails-f03890e151d7a8b9cc413ea9955efc95ff4fbfe6.zip
Use Rails generators files organization.
-rwxr-xr-xrailties/bin/rails2
-rw-r--r--railties/lib/generator/base.rb17
-rw-r--r--railties/lib/generator/generators/app/USAGE (renamed from railties/lib/generator/templates/app/USAGE)0
-rw-r--r--railties/lib/generator/generators/app/app_generator.rb (renamed from railties/lib/generator/generators/app.rb)3
-rw-r--r--railties/lib/generator/generators/app/templates/README (renamed from railties/lib/generator/templates/app/README)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/Rakefile (renamed from railties/lib/generator/templates/app/Rakefile)0
-rw-r--r--railties/lib/generator/generators/app/templates/app/controllers/application_controller.rb (renamed from railties/lib/generator/templates/app/app/controllers/application_controller.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/app/helpers/application_helper.rb (renamed from railties/lib/generator/templates/app/app/helpers/application_helper.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/app/models/.empty_directory (renamed from railties/lib/generator/templates/app/app/models/.empty_directory)0
-rw-r--r--railties/lib/generator/generators/app/templates/app/views/layouts/.empty_directory (renamed from railties/lib/generator/templates/app/app/views/layouts/.empty_directory)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/boot.rb (renamed from railties/lib/generator/templates/app/config/boot.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/frontbase.yml (renamed from railties/lib/generator/templates/app/config/databases/frontbase.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/ibm_db.yml (renamed from railties/lib/generator/templates/app/config/databases/ibm_db.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/mysql.yml (renamed from railties/lib/generator/templates/app/config/databases/mysql.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/oracle.yml (renamed from railties/lib/generator/templates/app/config/databases/oracle.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/postgresql.yml (renamed from railties/lib/generator/templates/app/config/databases/postgresql.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/sqlite2.yml (renamed from railties/lib/generator/templates/app/config/databases/sqlite2.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/databases/sqlite3.yml (renamed from railties/lib/generator/templates/app/config/databases/sqlite3.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/environment.rb (renamed from railties/lib/generator/templates/app/config/environment.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/environments/development.rb (renamed from railties/lib/generator/templates/app/config/environments/development.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/environments/production.rb (renamed from railties/lib/generator/templates/app/config/environments/production.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/environments/test.rb (renamed from railties/lib/generator/templates/app/config/environments/test.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/initializers/backtrace_silencers.rb (renamed from railties/lib/generator/templates/app/config/initializers/backtrace_silencers.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/initializers/inflections.rb (renamed from railties/lib/generator/templates/app/config/initializers/inflections.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/initializers/mime_types.rb (renamed from railties/lib/generator/templates/app/config/initializers/mime_types.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/initializers/new_rails_defaults.rb (renamed from railties/lib/generator/templates/app/config/initializers/new_rails_defaults.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/initializers/session_store.rb.tt (renamed from railties/lib/generator/templates/app/config/initializers/session_store.rb.tt)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/locales/en.yml (renamed from railties/lib/generator/templates/app/config/locales/en.yml)0
-rw-r--r--railties/lib/generator/generators/app/templates/config/routes.rb (renamed from railties/lib/generator/templates/app/config/routes.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/db/seeds.rb (renamed from railties/lib/generator/templates/app/db/seeds.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/dispatchers/config.ru (renamed from railties/lib/generator/templates/app/dispatchers/config.ru)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/dispatchers/dispatch.fcgi (renamed from railties/lib/generator/templates/app/dispatchers/dispatch.fcgi)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/dispatchers/dispatch.rb (renamed from railties/lib/generator/templates/app/dispatchers/dispatch.rb)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/dispatchers/gateway.cgi (renamed from railties/lib/generator/templates/app/dispatchers/gateway.cgi)0
-rw-r--r--railties/lib/generator/generators/app/templates/doc/README_FOR_APP (renamed from railties/lib/generator/templates/app/doc/README_FOR_APP)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/404.html (renamed from railties/lib/generator/templates/app/public/404.html)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/422.html (renamed from railties/lib/generator/templates/app/public/422.html)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/500.html (renamed from railties/lib/generator/templates/app/public/500.html)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/favicon.ico (renamed from railties/lib/generator/templates/app/public/favicon.ico)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/images/rails.png (renamed from railties/lib/generator/templates/app/public/images/rails.png)bin6646 -> 6646 bytes
-rw-r--r--railties/lib/generator/generators/app/templates/public/index.html (renamed from railties/lib/generator/templates/app/public/index.html)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/javascripts/application.js (renamed from railties/lib/generator/templates/app/public/javascripts/application.js)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/javascripts/controls.js (renamed from railties/lib/generator/templates/app/public/javascripts/controls.js)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/javascripts/dragdrop.js (renamed from railties/lib/generator/templates/app/public/javascripts/dragdrop.js)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/javascripts/effects.js (renamed from railties/lib/generator/templates/app/public/javascripts/effects.js)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/javascripts/prototype.js (renamed from railties/lib/generator/templates/app/public/javascripts/prototype.js)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/robots.txt (renamed from railties/lib/generator/templates/app/public/robots.txt)0
-rw-r--r--railties/lib/generator/generators/app/templates/public/stylesheets/.empty_directory (renamed from railties/lib/generator/templates/app/public/stylesheets/.empty_directory)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/about.tt (renamed from railties/lib/generator/templates/app/script/about.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/console.tt (renamed from railties/lib/generator/templates/app/script/console.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/dbconsole.tt (renamed from railties/lib/generator/templates/app/script/dbconsole.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/destroy.tt (renamed from railties/lib/generator/templates/app/script/destroy.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/generate.tt (renamed from railties/lib/generator/templates/app/script/generate.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/performance/benchmarker.tt (renamed from railties/lib/generator/templates/app/script/performance/benchmarker.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/performance/profiler.tt (renamed from railties/lib/generator/templates/app/script/performance/profiler.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/plugin.tt (renamed from railties/lib/generator/templates/app/script/plugin.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/runner.tt (renamed from railties/lib/generator/templates/app/script/runner.tt)0
-rwxr-xr-xrailties/lib/generator/generators/app/templates/script/server.tt (renamed from railties/lib/generator/templates/app/script/server.tt)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/fixtures/.empty_directory (renamed from railties/lib/generator/templates/app/test/fixtures/.empty_directory)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/functional/.empty_directory (renamed from railties/lib/generator/templates/app/test/functional/.empty_directory)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/integration/.empty_directory (renamed from railties/lib/generator/templates/app/test/integration/.empty_directory)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/performance/performance_test.rb (renamed from railties/lib/generator/templates/app/test/performance/performance_test.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/test_helper.rb (renamed from railties/lib/generator/templates/app/test/test_helper.rb)0
-rw-r--r--railties/lib/generator/generators/app/templates/test/unit/.empty_directory (renamed from railties/lib/generator/templates/app/test/unit/.empty_directory)0
-rw-r--r--railties/test/generator/generator_test_helper.rb4
65 files changed, 14 insertions, 12 deletions
diff --git a/railties/bin/rails b/railties/bin/rails
index 7d79faff4a..e13118500a 100755
--- a/railties/bin/rails
+++ b/railties/bin/rails
@@ -9,5 +9,5 @@ end
ARGV << "--help" if ARGV.empty?
-require File.dirname(__FILE__) + '/../lib/generator/generators/app'
+require File.dirname(__FILE__) + '/../lib/generator/generators/app/app_generator'
Rails::Generators::App.start
diff --git a/railties/lib/generator/base.rb b/railties/lib/generator/base.rb
index 2e0923a33d..8751cb08fb 100644
--- a/railties/lib/generator/base.rb
+++ b/railties/lib/generator/base.rb
@@ -1,10 +1,16 @@
-require File.dirname(__FILE__) + '/actions'
+# Load ActiveSupport mini
+activesupport_path = "#{File.dirname(__FILE__)}/../../../activesupport/lib"
+$:.unshift(activesupport_path) if File.directory?(activesupport_path)
+require 'active_support/all'
# TODO Use vendored Thor
require 'rubygems'
gem 'josevalim-thor'
require 'thor'
+require File.dirname(__FILE__) + '/../rails/version' unless defined?(Rails::VERSION)
+require File.dirname(__FILE__) + '/actions'
+
module Rails
module Generators
class Error < Thor::Error
@@ -18,11 +24,8 @@ module Rails
#
def self.source_root
@source_root ||= begin
- klass_name = self.name
- klass_name.gsub!(/^Rails::Generators::/, '')
- klass_name.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
- klass_name.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
- File.expand_path(File.join(File.dirname(__FILE__), 'templates', klass_name.downcase))
+ klass_name = self.name.gsub(/^Rails::Generators::/, '')
+ File.expand_path(File.join(File.dirname(__FILE__), 'generators', klass_name.underscore, 'templates'))
end
end
@@ -31,7 +34,7 @@ module Rails
# Use Rails default banner.
#
def self.banner
- "#{$0} #{self.arguments.map{ |a| a.usage }.join(' ')} [options]"
+ "#{$0} #{self.arguments.map(&:usage).join(' ')} [options]"
end
# Small macro to ruby as an option to the generator with proper default
diff --git a/railties/lib/generator/templates/app/USAGE b/railties/lib/generator/generators/app/USAGE
index 36d6061a59..36d6061a59 100644
--- a/railties/lib/generator/templates/app/USAGE
+++ b/railties/lib/generator/generators/app/USAGE
diff --git a/railties/lib/generator/generators/app.rb b/railties/lib/generator/generators/app/app_generator.rb
index c785e72d8e..6f5cb5f2c6 100644
--- a/railties/lib/generator/generators/app.rb
+++ b/railties/lib/generator/generators/app/app_generator.rb
@@ -1,5 +1,4 @@
-require File.dirname(__FILE__) + '/../../rails/version' unless defined?(Rails::VERSION)
-require File.dirname(__FILE__) + '/../base'
+require File.dirname(__FILE__) + '/../../base'
require 'digest/md5'
require 'active_support/secure_random'
diff --git a/railties/lib/generator/templates/app/README b/railties/lib/generator/generators/app/templates/README
index 37ec8ea211..37ec8ea211 100644
--- a/railties/lib/generator/templates/app/README
+++ b/railties/lib/generator/generators/app/templates/README
diff --git a/railties/lib/generator/templates/app/Rakefile b/railties/lib/generator/generators/app/templates/Rakefile
index 3bb0e8592a..3bb0e8592a 100755
--- a/railties/lib/generator/templates/app/Rakefile
+++ b/railties/lib/generator/generators/app/templates/Rakefile
diff --git a/railties/lib/generator/templates/app/app/controllers/application_controller.rb b/railties/lib/generator/generators/app/templates/app/controllers/application_controller.rb
index 6635a3f487..6635a3f487 100644
--- a/railties/lib/generator/templates/app/app/controllers/application_controller.rb
+++ b/railties/lib/generator/generators/app/templates/app/controllers/application_controller.rb
diff --git a/railties/lib/generator/templates/app/app/helpers/application_helper.rb b/railties/lib/generator/generators/app/templates/app/helpers/application_helper.rb
index 22a7940eb2..22a7940eb2 100644
--- a/railties/lib/generator/templates/app/app/helpers/application_helper.rb
+++ b/railties/lib/generator/generators/app/templates/app/helpers/application_helper.rb
diff --git a/railties/lib/generator/templates/app/app/models/.empty_directory b/railties/lib/generator/generators/app/templates/app/models/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/app/models/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/app/models/.empty_directory
diff --git a/railties/lib/generator/templates/app/app/views/layouts/.empty_directory b/railties/lib/generator/generators/app/templates/app/views/layouts/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/app/views/layouts/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/app/views/layouts/.empty_directory
diff --git a/railties/lib/generator/templates/app/config/boot.rb b/railties/lib/generator/generators/app/templates/config/boot.rb
index 0ad0f787f8..0ad0f787f8 100644
--- a/railties/lib/generator/templates/app/config/boot.rb
+++ b/railties/lib/generator/generators/app/templates/config/boot.rb
diff --git a/railties/lib/generator/templates/app/config/databases/frontbase.yml b/railties/lib/generator/generators/app/templates/config/databases/frontbase.yml
index c0c3588be1..c0c3588be1 100644
--- a/railties/lib/generator/templates/app/config/databases/frontbase.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/frontbase.yml
diff --git a/railties/lib/generator/templates/app/config/databases/ibm_db.yml b/railties/lib/generator/generators/app/templates/config/databases/ibm_db.yml
index a9716ddb44..a9716ddb44 100644
--- a/railties/lib/generator/templates/app/config/databases/ibm_db.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/ibm_db.yml
diff --git a/railties/lib/generator/templates/app/config/databases/mysql.yml b/railties/lib/generator/generators/app/templates/config/databases/mysql.yml
index 6bf2f7b1fd..6bf2f7b1fd 100644
--- a/railties/lib/generator/templates/app/config/databases/mysql.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/mysql.yml
diff --git a/railties/lib/generator/templates/app/config/databases/oracle.yml b/railties/lib/generator/generators/app/templates/config/databases/oracle.yml
index a1883f6256..a1883f6256 100644
--- a/railties/lib/generator/templates/app/config/databases/oracle.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/oracle.yml
diff --git a/railties/lib/generator/templates/app/config/databases/postgresql.yml b/railties/lib/generator/generators/app/templates/config/databases/postgresql.yml
index f600e054cf..f600e054cf 100644
--- a/railties/lib/generator/templates/app/config/databases/postgresql.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/postgresql.yml
diff --git a/railties/lib/generator/templates/app/config/databases/sqlite2.yml b/railties/lib/generator/generators/app/templates/config/databases/sqlite2.yml
index 46f01cb42c..46f01cb42c 100644
--- a/railties/lib/generator/templates/app/config/databases/sqlite2.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/sqlite2.yml
diff --git a/railties/lib/generator/templates/app/config/databases/sqlite3.yml b/railties/lib/generator/generators/app/templates/config/databases/sqlite3.yml
index 025d62a8d8..025d62a8d8 100644
--- a/railties/lib/generator/templates/app/config/databases/sqlite3.yml
+++ b/railties/lib/generator/generators/app/templates/config/databases/sqlite3.yml
diff --git a/railties/lib/generator/templates/app/config/environment.rb b/railties/lib/generator/generators/app/templates/config/environment.rb
index d1080cb529..d1080cb529 100644
--- a/railties/lib/generator/templates/app/config/environment.rb
+++ b/railties/lib/generator/generators/app/templates/config/environment.rb
diff --git a/railties/lib/generator/templates/app/config/environments/development.rb b/railties/lib/generator/generators/app/templates/config/environments/development.rb
index 85c9a6080e..85c9a6080e 100644
--- a/railties/lib/generator/templates/app/config/environments/development.rb
+++ b/railties/lib/generator/generators/app/templates/config/environments/development.rb
diff --git a/railties/lib/generator/templates/app/config/environments/production.rb b/railties/lib/generator/generators/app/templates/config/environments/production.rb
index 1fc9f6b923..1fc9f6b923 100644
--- a/railties/lib/generator/templates/app/config/environments/production.rb
+++ b/railties/lib/generator/generators/app/templates/config/environments/production.rb
diff --git a/railties/lib/generator/templates/app/config/environments/test.rb b/railties/lib/generator/generators/app/templates/config/environments/test.rb
index 496eb9572b..496eb9572b 100644
--- a/railties/lib/generator/templates/app/config/environments/test.rb
+++ b/railties/lib/generator/generators/app/templates/config/environments/test.rb
diff --git a/railties/lib/generator/templates/app/config/initializers/backtrace_silencers.rb b/railties/lib/generator/generators/app/templates/config/initializers/backtrace_silencers.rb
index 839d4cde19..839d4cde19 100644
--- a/railties/lib/generator/templates/app/config/initializers/backtrace_silencers.rb
+++ b/railties/lib/generator/generators/app/templates/config/initializers/backtrace_silencers.rb
diff --git a/railties/lib/generator/templates/app/config/initializers/inflections.rb b/railties/lib/generator/generators/app/templates/config/initializers/inflections.rb
index d531b8bb82..d531b8bb82 100644
--- a/railties/lib/generator/templates/app/config/initializers/inflections.rb
+++ b/railties/lib/generator/generators/app/templates/config/initializers/inflections.rb
diff --git a/railties/lib/generator/templates/app/config/initializers/mime_types.rb b/railties/lib/generator/generators/app/templates/config/initializers/mime_types.rb
index 72aca7e441..72aca7e441 100644
--- a/railties/lib/generator/templates/app/config/initializers/mime_types.rb
+++ b/railties/lib/generator/generators/app/templates/config/initializers/mime_types.rb
diff --git a/railties/lib/generator/templates/app/config/initializers/new_rails_defaults.rb b/railties/lib/generator/generators/app/templates/config/initializers/new_rails_defaults.rb
index 8ec3186c84..8ec3186c84 100644
--- a/railties/lib/generator/templates/app/config/initializers/new_rails_defaults.rb
+++ b/railties/lib/generator/generators/app/templates/config/initializers/new_rails_defaults.rb
diff --git a/railties/lib/generator/templates/app/config/initializers/session_store.rb.tt b/railties/lib/generator/generators/app/templates/config/initializers/session_store.rb.tt
index 4499ab84b6..4499ab84b6 100644
--- a/railties/lib/generator/templates/app/config/initializers/session_store.rb.tt
+++ b/railties/lib/generator/generators/app/templates/config/initializers/session_store.rb.tt
diff --git a/railties/lib/generator/templates/app/config/locales/en.yml b/railties/lib/generator/generators/app/templates/config/locales/en.yml
index f265c068d8..f265c068d8 100644
--- a/railties/lib/generator/templates/app/config/locales/en.yml
+++ b/railties/lib/generator/generators/app/templates/config/locales/en.yml
diff --git a/railties/lib/generator/templates/app/config/routes.rb b/railties/lib/generator/generators/app/templates/config/routes.rb
index ea14ce1bfc..ea14ce1bfc 100644
--- a/railties/lib/generator/templates/app/config/routes.rb
+++ b/railties/lib/generator/generators/app/templates/config/routes.rb
diff --git a/railties/lib/generator/templates/app/db/seeds.rb b/railties/lib/generator/generators/app/templates/db/seeds.rb
index 3174d0cb8a..3174d0cb8a 100644
--- a/railties/lib/generator/templates/app/db/seeds.rb
+++ b/railties/lib/generator/generators/app/templates/db/seeds.rb
diff --git a/railties/lib/generator/templates/app/dispatchers/config.ru b/railties/lib/generator/generators/app/templates/dispatchers/config.ru
index acbfe4e9ae..acbfe4e9ae 100644
--- a/railties/lib/generator/templates/app/dispatchers/config.ru
+++ b/railties/lib/generator/generators/app/templates/dispatchers/config.ru
diff --git a/railties/lib/generator/templates/app/dispatchers/dispatch.fcgi b/railties/lib/generator/generators/app/templates/dispatchers/dispatch.fcgi
index f5b3b71875..f5b3b71875 100755
--- a/railties/lib/generator/templates/app/dispatchers/dispatch.fcgi
+++ b/railties/lib/generator/generators/app/templates/dispatchers/dispatch.fcgi
diff --git a/railties/lib/generator/templates/app/dispatchers/dispatch.rb b/railties/lib/generator/generators/app/templates/dispatchers/dispatch.rb
index 48e888113a..48e888113a 100755
--- a/railties/lib/generator/templates/app/dispatchers/dispatch.rb
+++ b/railties/lib/generator/generators/app/templates/dispatchers/dispatch.rb
diff --git a/railties/lib/generator/templates/app/dispatchers/gateway.cgi b/railties/lib/generator/generators/app/templates/dispatchers/gateway.cgi
index bdc1055a22..bdc1055a22 100755
--- a/railties/lib/generator/templates/app/dispatchers/gateway.cgi
+++ b/railties/lib/generator/generators/app/templates/dispatchers/gateway.cgi
diff --git a/railties/lib/generator/templates/app/doc/README_FOR_APP b/railties/lib/generator/generators/app/templates/doc/README_FOR_APP
index fe41f5cc24..fe41f5cc24 100644
--- a/railties/lib/generator/templates/app/doc/README_FOR_APP
+++ b/railties/lib/generator/generators/app/templates/doc/README_FOR_APP
diff --git a/railties/lib/generator/templates/app/public/404.html b/railties/lib/generator/generators/app/templates/public/404.html
index eff660b90c..eff660b90c 100644
--- a/railties/lib/generator/templates/app/public/404.html
+++ b/railties/lib/generator/generators/app/templates/public/404.html
diff --git a/railties/lib/generator/templates/app/public/422.html b/railties/lib/generator/generators/app/templates/public/422.html
index b54e4a3cad..b54e4a3cad 100644
--- a/railties/lib/generator/templates/app/public/422.html
+++ b/railties/lib/generator/generators/app/templates/public/422.html
diff --git a/railties/lib/generator/templates/app/public/500.html b/railties/lib/generator/generators/app/templates/public/500.html
index ec3bbf02c4..ec3bbf02c4 100644
--- a/railties/lib/generator/templates/app/public/500.html
+++ b/railties/lib/generator/generators/app/templates/public/500.html
diff --git a/railties/lib/generator/templates/app/public/favicon.ico b/railties/lib/generator/generators/app/templates/public/favicon.ico
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/public/favicon.ico
+++ b/railties/lib/generator/generators/app/templates/public/favicon.ico
diff --git a/railties/lib/generator/templates/app/public/images/rails.png b/railties/lib/generator/generators/app/templates/public/images/rails.png
index d5edc04e65..d5edc04e65 100644
--- a/railties/lib/generator/templates/app/public/images/rails.png
+++ b/railties/lib/generator/generators/app/templates/public/images/rails.png
Binary files differ
diff --git a/railties/lib/generator/templates/app/public/index.html b/railties/lib/generator/generators/app/templates/public/index.html
index cd337dc74c..cd337dc74c 100644
--- a/railties/lib/generator/templates/app/public/index.html
+++ b/railties/lib/generator/generators/app/templates/public/index.html
diff --git a/railties/lib/generator/templates/app/public/javascripts/application.js b/railties/lib/generator/generators/app/templates/public/javascripts/application.js
index fe4577696b..fe4577696b 100644
--- a/railties/lib/generator/templates/app/public/javascripts/application.js
+++ b/railties/lib/generator/generators/app/templates/public/javascripts/application.js
diff --git a/railties/lib/generator/templates/app/public/javascripts/controls.js b/railties/lib/generator/generators/app/templates/public/javascripts/controls.js
index ca29aefdd1..ca29aefdd1 100644
--- a/railties/lib/generator/templates/app/public/javascripts/controls.js
+++ b/railties/lib/generator/generators/app/templates/public/javascripts/controls.js
diff --git a/railties/lib/generator/templates/app/public/javascripts/dragdrop.js b/railties/lib/generator/generators/app/templates/public/javascripts/dragdrop.js
index 07229f986f..07229f986f 100644
--- a/railties/lib/generator/templates/app/public/javascripts/dragdrop.js
+++ b/railties/lib/generator/generators/app/templates/public/javascripts/dragdrop.js
diff --git a/railties/lib/generator/templates/app/public/javascripts/effects.js b/railties/lib/generator/generators/app/templates/public/javascripts/effects.js
index 5a639d2dea..5a639d2dea 100644
--- a/railties/lib/generator/templates/app/public/javascripts/effects.js
+++ b/railties/lib/generator/generators/app/templates/public/javascripts/effects.js
diff --git a/railties/lib/generator/templates/app/public/javascripts/prototype.js b/railties/lib/generator/generators/app/templates/public/javascripts/prototype.js
index dfe8ab4e13..dfe8ab4e13 100644
--- a/railties/lib/generator/templates/app/public/javascripts/prototype.js
+++ b/railties/lib/generator/generators/app/templates/public/javascripts/prototype.js
diff --git a/railties/lib/generator/templates/app/public/robots.txt b/railties/lib/generator/generators/app/templates/public/robots.txt
index 085187fa58..085187fa58 100644
--- a/railties/lib/generator/templates/app/public/robots.txt
+++ b/railties/lib/generator/generators/app/templates/public/robots.txt
diff --git a/railties/lib/generator/templates/app/public/stylesheets/.empty_directory b/railties/lib/generator/generators/app/templates/public/stylesheets/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/public/stylesheets/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/public/stylesheets/.empty_directory
diff --git a/railties/lib/generator/templates/app/script/about.tt b/railties/lib/generator/generators/app/templates/script/about.tt
index 9604485fd2..9604485fd2 100755
--- a/railties/lib/generator/templates/app/script/about.tt
+++ b/railties/lib/generator/generators/app/templates/script/about.tt
diff --git a/railties/lib/generator/templates/app/script/console.tt b/railties/lib/generator/generators/app/templates/script/console.tt
index 307b7c09c4..307b7c09c4 100755
--- a/railties/lib/generator/templates/app/script/console.tt
+++ b/railties/lib/generator/generators/app/templates/script/console.tt
diff --git a/railties/lib/generator/templates/app/script/dbconsole.tt b/railties/lib/generator/generators/app/templates/script/dbconsole.tt
index 7ce41645a6..7ce41645a6 100755
--- a/railties/lib/generator/templates/app/script/dbconsole.tt
+++ b/railties/lib/generator/generators/app/templates/script/dbconsole.tt
diff --git a/railties/lib/generator/templates/app/script/destroy.tt b/railties/lib/generator/generators/app/templates/script/destroy.tt
index 9f22a9dbca..9f22a9dbca 100755
--- a/railties/lib/generator/templates/app/script/destroy.tt
+++ b/railties/lib/generator/generators/app/templates/script/destroy.tt
diff --git a/railties/lib/generator/templates/app/script/generate.tt b/railties/lib/generator/generators/app/templates/script/generate.tt
index 9a9e17ab29..9a9e17ab29 100755
--- a/railties/lib/generator/templates/app/script/generate.tt
+++ b/railties/lib/generator/generators/app/templates/script/generate.tt
diff --git a/railties/lib/generator/templates/app/script/performance/benchmarker.tt b/railties/lib/generator/generators/app/templates/script/performance/benchmarker.tt
index 3abf448c15..3abf448c15 100755
--- a/railties/lib/generator/templates/app/script/performance/benchmarker.tt
+++ b/railties/lib/generator/generators/app/templates/script/performance/benchmarker.tt
diff --git a/railties/lib/generator/templates/app/script/performance/profiler.tt b/railties/lib/generator/generators/app/templates/script/performance/profiler.tt
index 66f851a079..66f851a079 100755
--- a/railties/lib/generator/templates/app/script/performance/profiler.tt
+++ b/railties/lib/generator/generators/app/templates/script/performance/profiler.tt
diff --git a/railties/lib/generator/templates/app/script/plugin.tt b/railties/lib/generator/generators/app/templates/script/plugin.tt
index f0603c33c4..f0603c33c4 100755
--- a/railties/lib/generator/templates/app/script/plugin.tt
+++ b/railties/lib/generator/generators/app/templates/script/plugin.tt
diff --git a/railties/lib/generator/templates/app/script/runner.tt b/railties/lib/generator/generators/app/templates/script/runner.tt
index 7302825f6c..7302825f6c 100755
--- a/railties/lib/generator/templates/app/script/runner.tt
+++ b/railties/lib/generator/generators/app/templates/script/runner.tt
diff --git a/railties/lib/generator/templates/app/script/server.tt b/railties/lib/generator/generators/app/templates/script/server.tt
index 893db31a20..893db31a20 100755
--- a/railties/lib/generator/templates/app/script/server.tt
+++ b/railties/lib/generator/generators/app/templates/script/server.tt
diff --git a/railties/lib/generator/templates/app/test/fixtures/.empty_directory b/railties/lib/generator/generators/app/templates/test/fixtures/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/test/fixtures/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/test/fixtures/.empty_directory
diff --git a/railties/lib/generator/templates/app/test/functional/.empty_directory b/railties/lib/generator/generators/app/templates/test/functional/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/test/functional/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/test/functional/.empty_directory
diff --git a/railties/lib/generator/templates/app/test/integration/.empty_directory b/railties/lib/generator/generators/app/templates/test/integration/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/test/integration/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/test/integration/.empty_directory
diff --git a/railties/lib/generator/templates/app/test/performance/performance_test.rb b/railties/lib/generator/generators/app/templates/test/performance/performance_test.rb
index 4b60558b43..4b60558b43 100644
--- a/railties/lib/generator/templates/app/test/performance/performance_test.rb
+++ b/railties/lib/generator/generators/app/templates/test/performance/performance_test.rb
diff --git a/railties/lib/generator/templates/app/test/test_helper.rb b/railties/lib/generator/generators/app/templates/test/test_helper.rb
index b9fe2517c8..b9fe2517c8 100644
--- a/railties/lib/generator/templates/app/test/test_helper.rb
+++ b/railties/lib/generator/generators/app/templates/test/test_helper.rb
diff --git a/railties/lib/generator/templates/app/test/unit/.empty_directory b/railties/lib/generator/generators/app/templates/test/unit/.empty_directory
index e69de29bb2..e69de29bb2 100644
--- a/railties/lib/generator/templates/app/test/unit/.empty_directory
+++ b/railties/lib/generator/generators/app/templates/test/unit/.empty_directory
diff --git a/railties/test/generator/generator_test_helper.rb b/railties/test/generator/generator_test_helper.rb
index cdfd9bac0d..ebd3547e5e 100644
--- a/railties/test/generator/generator_test_helper.rb
+++ b/railties/test/generator/generator_test_helper.rb
@@ -4,13 +4,13 @@ require 'fileutils'
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../../lib"
# For this while, let's load all generators by hand
-require 'generator/generators/app'
+require 'generator/generators/app/app_generator'
class GeneratorTestCase < Test::Unit::TestCase
include FileUtils
def destination_root
- @destinartion_root ||= File.expand_path("#{File.dirname(__FILE__)}/../fixtures/tmp")
+ @destination_root ||= File.expand_path("#{File.dirname(__FILE__)}/../fixtures/tmp")
end
def setup