Class: Spire::Commands::Register

Inherits:
Object
  • Object
show all
Includes:
Mixlib::CLI, Mixins::Help
Defined in:
lib/spire/commands/register.rb

Overview

This is the spire command

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::Help

included

Class Method Details

.run(args) ⇒ Object



27
28
29
# File 'lib/spire/commands/register.rb', line 27

def self.run(args)
  self.new.run(args)
end

Instance Method Details

#run(args) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/spire/commands/register.rb', line 31

def run(args)
  parse_options(args)
  spire = Spire.new(CLI.url)
  spire.register(:email => config[:email], :password => config[:password])
  CLI.rc["secret"] = spire.secret
  CLI.save_rc
				$stdout.puts spire.secret
end