Sha256: cb2f59f0be22ab6cc635f049c81505aa6fa163cb8e1c80e80902a2c2389a04e0
Contents?: true
Size: 371 Bytes
Versions: 44
Compression:
Stored size: 371 Bytes
Contents
require 'netrc' module Locomotive::Wagon module NetrcConcern def write_credentials_to_netrc(host, email, api_key) netrc = Netrc.read netrc[host] = email, api_key netrc.save end def read_credentials_from_netrc(host) if entry = Netrc.read[host] { email: entry.login, api_key: entry.password } end end end end
Version data entries
44 entries across 44 versions & 1 rubygems