Class: Jekyll::Cloudfront::Invalidator
- Inherits:
-
Object
- Object
- Jekyll::Cloudfront::Invalidator
- Defined in:
- lib/cloudfront/invalidator.rb
Class Method Summary collapse
Class Method Details
.invalidate(aws_key, aws_secret, s3_bucket_name, cloudfront_distribution_id) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/cloudfront/invalidator.rb', line 4 def self.invalidate( aws_key, aws_secret, s3_bucket_name, cloudfront_distribution_id) bucket = AWS::S3::Bucket.find(s3_bucket_name) s3_object_keys = bucket.objects.map { |f| f.key } CloudfrontS3Invalidator::CloudfrontClient.new( aws_key, aws_secret, cloudfront_distribution_id).invalidate( s3_object_keys) end |