Skip to content

Instantly share code, notes, and snippets.

@danwrong danwrong/akamai.rb
Created Mar 11, 2011

Embed
What would you like to do?
require 'akamai'
module Build
class Akamai
class << self
def configure(username, password)
::Akamai.configure do |c|
c.cachecontrol_username = username
c.cachecontrol_password = password
end
end
end
def initialize(base_path)
@base_path = base_path
end
def purge(files)
urls = files.to_a.map do |file|
"#{@base_path}#{file}"
end
::Akamai.purge(*urls)
urls
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.