From 301c48c15cc6bf8d8fac3c22356eacce380f6fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 23 Jun 2009 16:19:23 +0200 Subject: Added a generator file responsable for loading generator files. --- railties/bin/gen | 6 ++++-- railties/bin/rails | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'railties/bin') diff --git a/railties/bin/gen b/railties/bin/gen index 0567ab6058..f054d4e853 100755 --- a/railties/bin/gen +++ b/railties/bin/gen @@ -14,8 +14,10 @@ else ARGV.size == 1 ARGV << "--help" end -Dir[File.dirname(__FILE__) + '/../lib/generator/generators/*/*_generator.rb'].each do |file| - require file +require File.dirname(__FILE__) + '/../lib/generator' + +Rails::Generators.builtin.each do |name| + require "generator/generators/#{name}/#{name}_generator" end name = ARGV.shift diff --git a/railties/bin/rails b/railties/bin/rails index 4d08ca392d..57eb8809ed 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -9,5 +9,7 @@ end ARGV << "--help" if ARGV.empty? -require File.dirname(__FILE__) + '/../lib/generator/generators/app/app_generator' +require File.dirname(__FILE__) + '/../lib/generator' +require 'generator/generators/app/app_generator' + Rails::Generators::AppGenerator.start -- cgit v1.2.3