Sha256: 5525ba4c7221cbb9e9fea5e589af54b87b9022af449993478ee5f4ca325a36a3

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

#!/usr/bin/env ruby

require_relative "../lib/amazon_auth"
require 'highline/import'

result = []

login = if amazon_username = ENV['AMAZON_USERNAME']
  amazon_username
else
  ask("Enter your #{AmazonInfo.domain} username: ") { |q| q.echo = true } unless login = ARGV[0]
end
passwd = ENV['AMAZON_PASSWORD'] || ask("Enter your #{AmazonInfo.domain} password: ") { |q| q.echo = "*" }

raise "Empty login or password" if login.to_s.size == 0 || passwd.to_s.size == 0

puts "Put the following lines in .env (Remove AMAZON_USERNAME and AMAZON_PASSWORD if you have)"
puts
puts "AMAZON_USERNAME_CODE=#{AmazonAuth::Converter.encode(login)}"
puts "AMAZON_PASSWORD_CODE=#{AmazonAuth::Converter.encode(passwd)}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amazon_auth-0.1.0 bin/convert_login