No commit activity in last 3 years
No release in over 3 years
copies s3 assets from production refinerycms app hosted on Heroku to local
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.3.7
~> 2.21.2
~> 0.4.0
 Project Readme

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

  1. Mac OS X, Linux, or UNIX.
  2. A Heroku account (or S3 credentials).
  3. 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

Copyright (c) 2012 Rounders Consulting Inc.