Jeff
Jeff is a light-weight module that mixes in client behaviour for Amazon Web Services (AWS). It wraps Excon and implements Signature Version 2.
Usage
Build a hypothetical client.
class Client
include Jeff
end
Customise default headers and parameters.
class Client
params 'Service' => 'Service',
'Tag' => -> { tag }
attr_accessor :tag
end
Set AWS endpoint and credentials.
client = Client.new.tap do |config|
config.endpoint = 'http://example.com/path'
config.key = 'key'
config.secret = 'secret'
end
You should now be able to access the endpoint.
client.post query: { 'Foo' => 'Bar' },
body: 'data'
Compatibility
Jeff is compatible with Ruby 1.9 flavours.