Class: Jets::Commands::Main

Inherits:
Base show all
Defined in:
lib/jets/commands/main.rb

Instance Method Summary collapse

Methods inherited from Base

autocomplete, banner, dispatch, eager_load!, help_list, inherited, klass_from_namespace, namespace_from_class, namespaced_commands, perform, subclasses

Instance Method Details

#buildObject



11
12
13
# File 'lib/jets/commands/main.rb', line 11

def build
  Build.new(options).run
end

#call(function_name, payload = '') ⇒ Object



82
83
84
# File 'lib/jets/commands/main.rb', line 82

def call(function_name, payload='')
  Call.new(function_name, payload, options).run
end

#consoleObject



56
57
58
# File 'lib/jets/commands/main.rb', line 56

def console
  Console.run
end

#dbconsoleObject



68
69
70
# File 'lib/jets/commands/main.rb', line 68

def dbconsole
  Dbconsole.start(*args)
end

#deleteObject



30
31
32
# File 'lib/jets/commands/main.rb', line 30

def delete
  Delete.new(options).run
end

#deploy(environment = nil) ⇒ Object

Note the environment is here to trick the Thor parser to allowing an environment parameter. It is not actually set here. It is set earlier in cli.rb: set_jets_env_for_deploy_command!



20
21
22
23
24
# File 'lib/jets/commands/main.rb', line 20

def deploy(environment=nil)
  Jets::Timing.clear # must happen outside Deploy#run
  Deploy.new(options).run
  Jets::Timing.report
end

#generate(generator, *args) ⇒ Object



88
89
90
# File 'lib/jets/commands/main.rb', line 88

def generate(generator, *args)
  Jets::Generator.invoke(generator, *args)
end

#routesObject



50
51
52
# File 'lib/jets/commands/main.rb', line 50

def routes
  puts Jets::Router.routes_help
end

#runner(code) ⇒ Object



62
63
64
# File 'lib/jets/commands/main.rb', line 62

def runner(code)
  Runner.run(code)
end

#serverObject



38
39
40
41
42
43
44
45
46
# File 'lib/jets/commands/main.rb', line 38

def server
  # shell out to shotgun for automatic reloading
  o = options
  command = "bundle exec shotgun --port #{o[:port]} --host #{o[:host]}"
  puts "=> #{command}".colorize(:green)
  puts Jets::Booter.message
  Jets::Rack::Server.start unless ENV['JETS_RACK'] == '0' # rack server runs in background by default
  system(command)
end

#statusObject



94
95
96
# File 'lib/jets/commands/main.rb', line 94

def status
  Jets::Cfn::Status.new(options).run
end

#urlObject



100
101
102
# File 'lib/jets/commands/main.rb', line 100

def url
  Jets::Commands::Url.new(options).display
end

#versionObject



106
107
108
# File 'lib/jets/commands/main.rb', line 106

def version
  puts Jets.version
end