0.0
No commit activity in last 3 years
No release in over 3 years
This rake task will update (delete and copy) all the files under the public directory to S3, by default is the public directory but you can pass as argument the path to the folder inside the public directory.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0.0
~> 1.5.2
>= 0

Runtime

>= 0.7.2
 Project Readme

This rake task will update (delete and copy) all the files under the public directory to S3, by default is the public directory but you can pass as argument the path to the folder inside the public directory.

The rake task will verify if the local file exist on s3 and if the local file have been modified since the upload to s3.

** Rails 2.3.4 **

In your Gemfile

gem 'syncassets_r2'

In your Rakefile

Dir["#{Gem.searcher.find('syncassets_r2').full_gem_path}/lib/tasks/**/*.rake"].each { |ext| load ext }

In your config/aws.yml

development:
  access_key_id:     'YOUR_ACCESS_KEY'
  secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
  bucket:            'YOUR_BUCKET_NAME'
test:
  access_key_id:     'YOUR_ACCESS_KEY'
  secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
  bucket:            'YOUR_BUCKET_NAME'
production:
  access_key_id:     'YOUR_ACCESS_KEY'
  secret_access_key: 'YOUR_SECRET_ACCESS_KEY'
  bucket:            'YOUR_BUCKET_NAME'

Running the task

rake syncassets:sync_s3_public_assets
# this will sync all the folders and files under the /public directory of your app

rake syncassets:sync_s3_public_assets[javascripts]
# this will sync all the folders and files under the /public/javascripts directory of your app

rake syncassets:sync_s3_public_assets[javascripts/some_folder]
# this will sync all the folders and files under the /public/javascripts/some_folder directory of your app