Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

refinerycms-s3assets

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

refinerycms-s3assets

bundlerRubyGems.org
Version
0.2.1
Version published
Maintainers
1
Created
Source

refinerycms-s3assets

A common development scenario, when using a Heroku-hosted Refinery CMS app, is to copy production data to development via the use of heroku db:pull. This gem adds a rake task to your Refinery CMS project which copies your production assets stored on s3 onto the local filesystem.

Requirements

  • Mac OS X, Linux, or UNIX.
  • A Heroku account (or S3 credentials).
  • A Refinery CMS project (Refinery 1.x and 2.x are supported)

Installation

Open up your Gemfile and add at the bottom this line:

gem 'refinerycms-s3assets', :group => :development

Now, run:

bundle install

Usage

This gem assumes that your production Heroku app is storing assets on Amazon s3 and that your Heroku app has the following three config vars properly defined: S3_BUCKET, S3_KEY and S3_SECRET ( see http://devcenter.heroku.com/articles/config-vars for more info).

Copying production data to development

Start by copying your production database to your local database:

heroku db:pull

To copy all Image and Resource files from S3 you can now run the following:

bundle exec rake refinery_s3assets:pull

Copying development data to production

Start by copying your development database to your production:

heroku db:push

To copy all Image and Resources files from local development to S3 you can run the following:

bundle exec rake refinery_s3assets:push

Alternatative methods of specifying S3 credentials

If you do not have a Heroku application but you do know the S3 credentials then you can provide these manually as ENV variables:

S3_KEY=key S3_SECRET=secret S3_BUCKET=bucket bundle exec rake refinery_s3assets:pull

Warning

There is currently no prompting if you are overwriting existing files so please be careful.

License

Please see MIT-LICENSE for more details.

Copyright (c) 2012 Rounders Consulting Inc.

FAQs

Package last updated on 11 Jun 2012

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