aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/commands/application/application_command.rb
blob: 7e3a2b011d6bd5a9204a2d7d93866b7cb2d957a9 (plain) (tree)




























                                                                
require "rails/generators"
require "rails/generators/rails/app/app_generator"

module Rails
  module Generators
    class AppGenerator # :nodoc:
      # We want to exit on failure to be kind to other libraries
      # This is only when accessing via CLI
      def self.exit_on_failure?
        true
      end
    end
  end

  module Command
    class ApplicationCommand < Base
      hide_command!

      def help
        perform # Punt help output to the generator.
      end

      def perform(*args)
        Rails::Generators::AppGenerator.start \
          Rails::Generators::ARGVScrubber.new(args).prepare!
      end
    end
  end
end