diff options
Diffstat (limited to 'railties/lib/rails/engine/commands_tasks.rb')
-rw-r--r-- | railties/lib/rails/engine/commands_tasks.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/railties/lib/rails/engine/commands_tasks.rb b/railties/lib/rails/engine/commands_tasks.rb index fa3ee59b7d..e21a7183fc 100644 --- a/railties/lib/rails/engine/commands_tasks.rb +++ b/railties/lib/rails/engine/commands_tasks.rb @@ -1,4 +1,4 @@ -require 'rails/commands/rake_proxy' +require "rails/commands/rake_proxy" module Rails class Engine @@ -53,7 +53,7 @@ In addition to those commands, there are: end def version - argv.unshift '--version' + argv.unshift "--version" require_command!("application") end @@ -74,7 +74,7 @@ In addition to those commands, there are: end def load_generators - require 'rails/generators' + require "rails/generators" require ENGINE_PATH engine = ::Rails::Engine.find(ENGINE_ROOT) @@ -93,21 +93,23 @@ In addition to those commands, there are: def parse_command(command) case command - when '--version', '-v' - 'version' - when '--help', '-h' - 'help' + when "--version", "-v" + "version" + when "--help", "-h" + "help" else command end end def rake_tasks + require_rake + return @rake_tasks if defined?(@rake_tasks) load_generators Rake::TaskManager.record_task_metadata = true - Rake.application.init('rails') + Rake.application.init("rails") Rake.application.load_rakefile @rake_tasks = Rake.application.tasks.select(&:comment) end |