Class: Envirobly::Cli::Main

Inherits:
Base
  • Object
show all
Defined in:
lib/envirobly/cli/main.rb

Instance Method Summary collapse

Methods inherited from Base

exit_on_failure?

Instance Method Details

#deploy(environment) ⇒ Object



9
10
11
12
# File 'lib/envirobly/cli/main.rb', line 9

def deploy(environment)
  abort_if_aws_cli_is_missing
  Envirobly::Deployment.new environment, options
end

#set_access_tokenObject



15
16
17
18
19
20
21
22
23
# File 'lib/envirobly/cli/main.rb', line 15

def set_access_token
  token = ask("Access Token:", echo: false).strip
  if token == ""
    $stderr.puts "Token can't be empty."
    exit 1
  end

  Envirobly::AccessToken.new(token).save
end

#versionObject



3
4
5
# File 'lib/envirobly/cli/main.rb', line 3

def version
  puts Envirobly::VERSION
end