Sha256: b5a94863bc5372adc198dd50a7556395beed9b1b16663ccc04161d4231c7389f

Contents?: true

Size: 232 Bytes

Versions: 1

Compression:

Stored size: 232 Bytes

Contents

require 'netrc'

class CredentialsProvider

  def value
    if creds = Netrc.read['api.rackspace.com']
      Map(username: creds.first, api_key: creds.last)
    else
      fail Rax::LoginRequired, "login required"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rax-0.0.2 app/providers/credentials_provider.rb