Sha256: 14d635eff1b784f35625286d56195dcedef763649465969b42a7f139e5e776cf

Contents?: true

Size: 416 Bytes

Versions: 5

Compression:

Stored size: 416 Bytes

Contents

command :login do |c|
  c.syntax = 'ios login'
  c.summary = 'Save account credentials'
  c.description = ''

  c.action do |args, options|
    say_warning "You are already authenticated" if Netrc.read[Cupertino::HOSTNAME]

    user = ask "Username:"
    pass = password "Password:"

    netrc = Netrc.read
    netrc[Cupertino::HOSTNAME] = user, pass
    netrc.save

    say_ok "Account credentials saved"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cupertino-0.4.0 ./lib/cupertino/provisioning_portal/commands/login.rb
cupertino-0.3.3 ./lib/cupertino/provisioning_portal/commands/login.rb
cupertino-0.3.2 ./lib/cupertino/provisioning_portal/commands/login.rb
cupertino-0.3.1 ./lib/cupertino/provisioning_portal/commands/login.rb
cupertino-0.3.0 ./lib/cupertino/provisioning_portal/commands/login.rb