diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-23 19:10:42 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-23 19:10:42 +0200 |
commit | 4494a752c3c568c65fa899c54486153a1a5fa187 (patch) | |
tree | 60149451a075242bd36c5298ea9838d1d2d50f2f /railties/bin | |
parent | 75fbd7393606b9b026418229eb3eb38542753d43 (diff) | |
download | rails-4494a752c3c568c65fa899c54486153a1a5fa187.tar.gz rails-4494a752c3c568c65fa899c54486153a1a5fa187.tar.bz2 rails-4494a752c3c568c65fa899c54486153a1a5fa187.zip |
Change current sstructure.
Diffstat (limited to 'railties/bin')
-rwxr-xr-x | railties/bin/gen | 8 | ||||
-rwxr-xr-x | railties/bin/rails | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/railties/bin/gen b/railties/bin/gen index f054d4e853..6cc66ac455 100755 --- a/railties/bin/gen +++ b/railties/bin/gen @@ -14,16 +14,18 @@ else ARGV.size == 1 ARGV << "--help" end -require File.dirname(__FILE__) + '/../lib/generator' +require File.dirname(__FILE__) + '/../lib/generators' -Rails::Generators.builtin.each do |name| - require "generator/generators/#{name}/#{name}_generator" +Rails::Generators.builtin.each do |group, name| + require "generators/#{group}/#{name}/#{name}_generator" end name = ARGV.shift if klass = Thor::Util.find_by_namespace("rails:generators:#{name}") klass.start +elsif klass = Thor::Util.find_by_namespace(name) + klass.start else puts "Could not find generator #{name}." end diff --git a/railties/bin/rails b/railties/bin/rails index 57eb8809ed..538d0cbc84 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -9,7 +9,7 @@ end ARGV << "--help" if ARGV.empty? -require File.dirname(__FILE__) + '/../lib/generator' -require 'generator/generators/app/app_generator' +require File.dirname(__FILE__) + '/../lib/generators' +require 'generators/rails/app/app_generator' Rails::Generators::AppGenerator.start |