Skip to content

Instantly share code, notes, and snippets.

@robparvin
robparvin / cloud_front_invalidator.rb
Created February 28, 2012 12:03
Amazon CloudFront cache invalidator for Paperclip & Fog for use with various defined image styles
require 'openssl'
require 'digest/sha1'
require 'net/https'
require 'base64'
class CloudFrontInvalidator
#file - The Paperclip attachment
#style - The defined style to invalidate (e.g. :original, :thumbnail...)
def initialize(file, style = :original)
@aws_account = aws_access_key_id
@robparvin
robparvin / deploy.rb
Created February 20, 2012 16:19
Deploying Rails 3.2 with Asset Pipeline
load 'deploy/assets'