diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-12 13:15:05 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-12 13:15:05 -0700 |
commit | b210d9e722aace63909fb1ebe1b1434ded650ead (patch) | |
tree | 08eb79616649575aa42d4064fb20eea13563dec2 | |
parent | 2bff3017531eb253b1721fa82ac079c5a790814c (diff) | |
parent | 00379ee998b5ed10d8a4197f3fa0f57873f17ba1 (diff) | |
download | rails-b210d9e722aace63909fb1ebe1b1434ded650ead.tar.gz rails-b210d9e722aace63909fb1ebe1b1434ded650ead.tar.bz2 rails-b210d9e722aace63909fb1ebe1b1434ded650ead.zip |
Merge pull request #532 from amatsuda/update_script
Revert "Delegate everything to the generator"
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index d79f76c799..ed3bf15ca9 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -9,11 +9,21 @@ module Rails @options = generator.options end - private + private + %w(template copy_file directory empty_directory inside + empty_directory_with_gitkeep create_file chmod shebang).each do |method| + class_eval <<-RUBY, __FILE__, __LINE__ + 1 + def #{method}(*args, &block) + @generator.send(:#{method}, *args, &block) + end + RUBY + end - def method_missing(meth, *args, &block) - @generator.send(meth, *args, &block) - end + # TODO: Remove once this is fully in place + def method_missing(meth, *args, &block) + STDERR.puts "Calling #{meth} with #{args.inspect} with #{block}" + @generator.send(meth, *args, &block) + end end # The application builder allows you to override elements of the application |