Sha256: 3f2256f08863b3f4790d8609adbcc1b8d80a036c8ac84a9d9003dea04160d166

Contents?: true

Size: 744 Bytes

Versions: 24

Compression:

Stored size: 744 Bytes

Contents

module Jekyll
  module Cloudfront
    class Invalidator
      def self.invalidate(config, changed_files)
        aws_key = config['s3_id']
        aws_secret = config['s3_secret']
        s3_bucket_name = config['s3_bucket']
        cloudfront_distribution_id = config['cloudfront_distribution_id']
        s3 = AWS::S3.new(
          :access_key_id => aws_key,
          :secret_access_key => aws_secret)
        s3_object_keys = changed_files
        s3_object_keys << ""
        report = SimpleCloudfrontInvalidator::CloudfrontClient.new(
          aws_key, aws_secret, cloudfront_distribution_id).invalidate(
            s3_object_keys)
        puts report[:text_report]
        report[:invalidated_items_count]
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
jekyll-s3-2.1.2 lib/cloudfront/invalidator.rb
jekyll-s3-2.1.1 lib/cloudfront/invalidator.rb
jekyll-s3-2.1.0 lib/cloudfront/invalidator.rb
jekyll-s3-2.0.0 lib/cloudfront/invalidator.rb