diff --git a/README.markdown b/README.markdown
index eb48290..abb84d1 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1,3 +1,6 @@
+# Forked from appoxy
+Added invalidation method for Cloudfront
+
# Appoxy AWS Library
A Ruby gem for all Amazon Web Services.
diff --git a/VERSION.yml b/VERSION.yml
index 406d992..a3896db 100644
--- a/VERSION.yml
+++ b/VERSION.yml
@@ -1,5 +1,5 @@
---
:major: 2
:minor: 4
-:patch: 2
+:patch: 3
:build:
diff --git a/aws.gemspec b/aws.gemspec
index a66a8ee..4dfe903 100644
--- a/aws.gemspec
+++ b/aws.gemspec
@@ -1,15 +1,15 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
+# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{aws}
- s.version = "2.4.2"
+ s.version = "2.4.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Travis Reeder", "Chad Arimura", "RightScale"]
- s.date = %q{2011-01-21}
+ s.date = %q{2011-02-06}
s.description = %q{AWS Ruby Library for interfacing with Amazon Web Services including EC2, S3, SQS, SimpleDB and most of their other services as well. By http://www.appoxy.com}
s.email = %q{travis@appoxy.com}
s.extra_rdoc_files = [
diff --git a/lib/acf/acf_interface.rb b/lib/acf/acf_interface.rb
index 9777125..049052a 100644
--- a/lib/acf/acf_interface.rb
+++ b/lib/acf/acf_interface.rb
@@ -208,6 +208,31 @@ def list_streaming_distributions
request_hash = generate_request('GET', 'streaming-distribution')
request_cache_or_info :list_streaming_distributions, request_hash, AcfStreamingDistributionListParser, @@bench
end
+
+ # Invalidate list of files
+ # Returns the just created Invalidation or Aws::AwsError exception.
+ #
+ # acf.invalidate_files( 'distribution-id',
+ # ['path/to/file1', 'path/to/file2'],
+ # 'some-id-string')
+ #
+ def invalidate_files(distribution_id, files=[], caller_reference=nil)
+ caller_reference ||= generate_call_reference
+
+ files_str = ''
+ files.to_a.each { |file_path| files_str += "\n #{file_path}" }
+
+ body = <<-EOXML
+
+
+ #{files_str.lstrip}
+ #{caller_reference}
+
+ EOXML
+
+ request_hash = generate_request('POST', "distribution/#{distribution_id}/invalidation", body.strip)
+ merge_headers(request_info(request_hash, AcfDistributionParser.new))
+ end
# Create a new distribution.
# Returns the just created distribution or Aws::AwsError exception.
diff --git a/lib/awsbase/awsbase.rb b/lib/awsbase/awsbase.rb
index 4067279..06620bf 100644
--- a/lib/awsbase/awsbase.rb
+++ b/lib/awsbase/awsbase.rb
@@ -221,8 +221,8 @@ def generate_request2(aws_access_key, aws_secret_key, action, api_version, lib_p
request = Net::HTTP::Get.new("#{service}?#{service_params}")
end
- #puts "\n\n --------------- QUERY REQUEST TO AWS -------------- \n\n"
- #puts "#{@params[:service]}?#{service_params}\n\n"
+ puts "\n\n --------------- QUERY REQUEST TO AWS -------------- \n\n"
+ puts "#{@params[:service]}?#{service_params}\n\n"
# prepare output hash
{:request => request,