aboutsummaryrefslogtreecommitdiffstats
path: root/railties/Rakefile
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2004-12-07 11:49:38 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2004-12-07 11:49:38 +0000
commit2594581e9f5594b32918326be895b4d443ab3e9c (patch)
tree051f52e4619b70f4757dbabf362d51a7d5f5fde9 /railties/Rakefile
parent3ee4357b8643c611bbe9eb3a7ce820a5e32cddaa (diff)
downloadrails-2594581e9f5594b32918326be895b4d443ab3e9c.tar.gz
rails-2594581e9f5594b32918326be895b4d443ab3e9c.tar.bz2
rails-2594581e9f5594b32918326be895b4d443ab3e9c.zip
Added a better generator for scaffolding that actually creates the code, so it can be edited bit by bit. See "script/generate scaffold" [bitsweat]. Added a whole new approach to generators that used the shared "script/generate" command. Run with no-args to see help [bitsweat].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@63 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/Rakefile')
-rw-r--r--railties/Rakefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/Rakefile b/railties/Rakefile
index 92a1bfc765..5a286bcd1e 100644
--- a/railties/Rakefile
+++ b/railties/Rakefile
@@ -21,7 +21,8 @@ TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/testing
LOG_FILES = %w( apache.log development.log test.log production.log )
HTML_FILES = %w( 404.html 500.html index.html )
-SCRIPT_FILES = %w( new_controller new_model new_mailer new_crud )
+SCRIPT_FILES = %w( generate )
+GENERATORS = %w( controller mailer model scaffold )
VENDOR_LIBS = %w( actionpack activerecord actionmailer railties )
@@ -136,11 +137,16 @@ task :copy_configs do
end
task :copy_generators do
+ mkdir_p File.join(PKG_DESTINATION, 'script')
SCRIPT_FILES.each do |file|
dest_file = File.join(PKG_DESTINATION, 'script', file)
cp File.join('generators', "#{file}.rb"), dest_file
chmod 0755, dest_file
end
+
+ GENERATORS.each do |dir|
+ cp_r File.join('generators', dir), File.join(PKG_DESTINATION, 'script', dir)
+ end
end
task :copy_rootfiles do