Method: Appfront::Command::Auth.login

Defined in:
lib/appfront/command/auth.rb

.loginObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/appfront/command/auth.rb', line 4

def self.
  puts "Enter your Appfront credentials."

  print "email: "
  email = ask

  print "password: "

  echo_off
  pass = ask_for_password
  echo_on

  api = Appfront::API.new(email: email, password: pass)
  key = api.

  netrc.delete 'jarvis.appfront.io'

  netrc['jarvis.appfront.io'] = email, key
  netrc.save

  true
end