Class: Jets::Command::ApplicationCommand

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/commands/application/application_command.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

banner, base_name, command_name, default_command_root, desc, engine?, executable, exit_on_failure?, hide_command!, inherited, long_desc, namespace, perform, printing_commands, usage_path

Methods included from ApiHelpers

#check_for_error_message!, #no_token_exit!, #paging_params

Methods included from AwsHelpers

#find_stack, #first_run?

Methods included from AwsServices

#apigateway, #aws_lambda, #aws_options, #cfn, #dynamodb, #logs, #s3, #s3_resource, #sns, #sqs, #sts

Methods included from AwsServices::StackStatus

#lookup, #stack_exists?, #stack_in_progress?

Methods included from AwsServices::GlobalMemoist

included

Methods included from Actions

#load_generators, #load_tasks, #require_application!, #require_application_and_environment!, #set_application_directory!

Instance Method Details

#helpObject



10
11
12
# File 'lib/jets/commands/application/application_command.rb', line 10

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

#perform(*args) ⇒ Object

This is:

bundle exec jets application:help => jets new --help
bundle exec jets application      => jets new --help


19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/jets/commands/application/application_command.rb', line 19

def perform(*args)
  version_flags = %w[-v --version] & args
  unless version_flags.empty?
    puts "Jets #{Jets::VERSION}"
    return
  end

  # require lazily so that Rails constant is only defined within generators
  require "jets/generators/overrides/app/app_generator"
  override_exit_on_failure?
  argv = Rails::Generators::ARGVScrubber.new(args).prepare!
  Jets::Generators::AppGenerator.start argv
end