Jeff

Jeff mixes in client behaviour for Amazon Web Services (AWS) which require Signature version 2 authentication.

Monsieur Jeff couples with Excon.

jeff

Usage

A somewhat contrived example:

Service = Struct.new(:aws_access_key_id, :aws_secret_access_key) do
  include Jeff

  def aws_endpoint
    'https://mws.amazonservices.com/Products/2011-10-01'
  end

  def status
    get(query: { 'Action' => 'GetServiceStatus' })
      .body
      .match(/Status>([^<]+)/)
      .[](1)
  end
end

srv = Service.new('key', 'secret')
srv.status # => "GREEN"

Vacuum and Peddler implement Jeff.