This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First the end result of what we want: | |
class Foo | |
before_hook :whoa | |
before_hook :amazing | |
def test | |
puts "This is kinda cool!" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :backup do | |
desc "backup db from heroku and send to S3" | |
task :push_to_s3 => :environment do | |
Rake::Task[:environment].invoke | |
require 'aws/s3' | |
require 'heroku' | |
APP_NAME = 'luna-sandals' # put your app name here | |
BACKUP_BUCKET = "#{APP_NAME}-db-backups" # put your backup bucket name here | |
file_name = "backup-#{Time.now.strftime('%s')}.dump" |