From a06c825b464758a0c22f8b089a596e46f1bba5cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 14 Jul 2009 22:20:43 +0200 Subject: Updated vendored Thor to 0.11.1 and update Rails::Generators. --- railties/lib/generators/rails/app/app_generator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/lib/generators/rails/app/app_generator.rb') diff --git a/railties/lib/generators/rails/app/app_generator.rb b/railties/lib/generators/rails/app/app_generator.rb index 20a06ed16a..88a52c60b0 100644 --- a/railties/lib/generators/rails/app/app_generator.rb +++ b/railties/lib/generators/rails/app/app_generator.rb @@ -46,11 +46,11 @@ module Rails::Generators end def create_root - self.root = File.expand_path(app_path, root) + self.destination_root = File.expand_path(app_path, destination_root) empty_directory '.' app_name # Sets the app name - FileUtils.cd(root) + FileUtils.cd(destination_root) end def create_root_files @@ -162,7 +162,7 @@ module Rails::Generators def apply_rails_template apply options[:template] if options[:template] - rescue LoadError, Errno::ENOENT => e + rescue Thor::Error, LoadError, Errno::ENOENT => e raise Error, "The template [#{options[:template]}] could not be loaded. Error: #{e}" end @@ -180,7 +180,7 @@ module Rails::Generators end def app_name - @app_name ||= File.basename(root) + @app_name ||= File.basename(destination_root) end def app_secret -- cgit v1.2.3