Created
May 14, 2011 02:35
-
-
Save AquaGeek/971800 to your computer and use it in GitHub Desktop.
Rails Lighthouse ticket #6521
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 50be58516e7a1865824ee43c9b8636e4cdcc6159 Mon Sep 17 00:00:00 2001 | |
From: Steve Hodgkiss <steve@hodgkiss.me.uk> | |
Date: Fri, 4 Mar 2011 14:22:00 +0000 | |
Subject: [PATCH] Revert "Delegate everything to the generator" | |
This reverts commit 0904e8256864239f673bf91fce1cfffb9345ee61. | |
--- | |
.../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 3f6ff35..ada14a1 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 | |
-- | |
1.7.3.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment