Class: Rails::Command::RakeCommand

Inherits:
Base show all
Extended by:
Actions
Defined in:
railties/lib/rails/commands/rake/rake_command.rb

Overview

:nodoc:

Class Method Summary collapse

Methods included from Actions

load_generators, load_tasks, require_application!, require_application_and_environment!, require_environment!, set_application_directory!

Methods inherited from Base

banner, base_name, command_name, default_command_root, desc, engine?, executable, exit_on_failure?, #help, hide_command!, inherited, namespace, usage_path

Class Method Details

.perform(task, args, config) ⇒ Object


15
16
17
18
19
20
21
22
23
24
25
26
# File 'railties/lib/rails/commands/rake/rake_command.rb', line 15

def perform(task, args, config)
  require_rake

  Rake.with_application do |rake|
    rake.init("rails", [task, *args])
    rake.load_rakefile
    if Rails.respond_to?(:root)
      rake.options.suppress_backtrace_pattern = /\A(?!#{Regexp.quote(Rails.root.to_s)})/
    end
    rake.standard_exception_handling { rake.top_level }
  end
end

.printing_commandsObject


11
12
13
# File 'railties/lib/rails/commands/rake/rake_command.rb', line 11

def printing_commands
  formatted_rake_tasks.map(&:first)
end