Module: AwsSigner
- Extended by:
- Configuration
- Defined in:
- lib/aws_signer.rb,
lib/aws_signer/version.rb,
lib/aws_signer/signature.rb,
lib/aws_signer/configuration.rb
Defined Under Namespace
Modules: Configuration Classes: RequiredConfigurationError, Signature
Constant Summary collapse
- VERSION =
'0.1.0'
Constants included from Configuration
Configuration::DEFAULT_S3_BASE_URL, Configuration::REQUIRED_ATTRIBUTES
Instance Attribute Summary
Attributes included from Configuration
#access_key_id, #s3_base_url, #secret_access_key, #upload_bucket
Class Method Summary collapse
-
.signature(options = {}) ⇒ Object
Public: Create a signature using the options passed in.
Methods included from Configuration
configure, validate_configuration!
Class Method Details
.signature(options = {}) ⇒ Object
Public: Create a signature using the options passed in.
options - The Hash options used to create the signature (default: {}):
:file_name - The String file name of the file being uploaded (required).
:mime_type - The String mime type of the file being uploaded (required).
:request_expiration - The Integer number of minute to expire the signature in (optional, default: 5).
:headers - The String headers for the signature (optional, default: 'x-amz-acl:public-read').
:base_file_path - The String base file path to upload the file to (optional, default: a path containing
the current timestamp and a random string,
e.g. 2014/07/31/02/12/debd6f2fcb1b5cb160fce9c9909aebf2).
Examples:
AwsSigner.signature(:file_name => 'image.gif', :mime_type => 'image/gif')
# => <AwsSigner::Signature>
Returns an AwsSigner::Signature object.
31 32 33 |
# File 'lib/aws_signer.rb', line 31 def signature( = {}) Signature.new() end |