Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

presss

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

presss

  • 0.9.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Presss

Presss uploads objects to and downloads objects from from Amazon S3. It's a tiny companion to a more complete implementation like AWS SDK.

Install

You can install Presss as a Rubygem or directly from the Git repository if you prefer.

Configure

You start by configuring Presss globally to use a certain bucket in a region with your credentials.

Presss.config = {
  region: 'eu-west-1',
  bucket_name: 'my-bucket-name',
  access_key_id: 'access key ID',
  secret_access_key: 'access key secret'
}

For valid regions see the AWS documentation. You can test if a region works by getting the hostname for it. In this example the region is eu-west-1.

$ host s3-eu-west-1.amazonaws.com

Upload files

The put method uploads anything that responds to either a read or to_s method. Currently the entire upload is stored in memory so it's not too great at uploading large files.

File.open('as6745it.zip') do |file|
  Presss.put('books/12/as6745it.zip', file, 'application/zip')
end

Download files

The get methods downloads the remote object and stores it in a string. Like with the put method this doesn't make it ideal for downloading large files.

Presss.get('books/12/as6745it.zip')

Copying

Presss is freely distributable under the terms of an MIT-style license. See COPYING or http://www.opensource.org/licenses/mit-license.php.

FAQs

Package last updated on 09 Aug 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc