diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-16 09:39:36 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-19 16:10:42 +0200 |
commit | 42e51ea9c03cdd4833585239c239c420cf808758 (patch) | |
tree | e6df4ea7cd345317465e070a13e1ea21be65618c /railties/lib/generator/generators | |
parent | 489f42215223bda3a0a2d8f9b740007a6ee3fc54 (diff) | |
download | rails-42e51ea9c03cdd4833585239c239c420cf808758.tar.gz rails-42e51ea9c03cdd4833585239c239c420cf808758.tar.bz2 rails-42e51ea9c03cdd4833585239c239c420cf808758.zip |
More tasks into app generator.
Diffstat (limited to 'railties/lib/generator/generators')
-rw-r--r-- | railties/lib/generator/generators/app.thor | 72 |
1 files changed, 39 insertions, 33 deletions
diff --git a/railties/lib/generator/generators/app.thor b/railties/lib/generator/generators/app.thor index 6e9bae9ce0..cadc53c494 100644 --- a/railties/lib/generator/generators/app.thor +++ b/railties/lib/generator/generators/app.thor @@ -42,44 +42,50 @@ class App < Thor::Group end def create_app_files - %w( - app/controllers - app/helpers - app/models - app/views/layouts - ).each { |path| empty_directory(path) } - directory "app" end - def directories - %w( - config/environments - config/initializers - config/locales - db - doc - lib - lib/tasks - log - public/images - public/javascripts - public/stylesheets - script/performance - test/fixtures - test/functional - test/integration - test/performance - test/unit - vendor - vendor/plugins - tmp/sessions - tmp/sockets - tmp/cache - tmp/pids - ).each { |path| empty_directory(path) } + def create_doc_files + directory "doc" + end + + def create_log_files + empty_directory "log" + + inside "log" do + %w( server production development test ).each do |file| + create_file "#{file}.log" + chmod "#{file}.log", 0666, false + end + end end +# def directories +# %w( +# config/environments +# config/initializers +# config/locales +# db +# lib +# lib/tasks +# public/images +# public/javascripts +# public/stylesheets +# script/performance +# test/fixtures +# test/functional +# test/integration +# test/performance +# test/unit +# vendor +# vendor/plugins +# tmp/sessions +# tmp/sockets +# tmp/cache +# tmp/pids +# ).each { |path| empty_directory(path) } +# end + protected def app_name |