Class: FloodCli::Cli::Console

Inherits:
Thor
  • Object
show all
Defined in:
lib/cli/console.rb

Instance Method Summary collapse

Instance Method Details

#loginObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/cli/console.rb', line 8

def 
  say('Enter your Flood IO credentials.', :yellow)
  email = ask('Email: ')
  password = ask('Password: ', echo: false)
  puts
  config = ask('Config: ', default: "#{Dir.home}/.fio")
  endpoint = ask('Endpoint: ', default: 'https://api.flood.io')
  proxy = ask('HTTP Proxy: ')

  cli = FloodCli.new(endpoint: endpoint, proxy: proxy, config: config, verbose: options[:verbose])
  cli.(email: email, password: password)
end