Permalink
Browse files

Merge pull request #4 from ladams02/master

Support for options email-notification.
  • Loading branch information...
2 parents 0e8d723 + 2c6e2c2 commit 5422528fc6f51ad9926652a41205ce64f27f6e43 @jayzes committed Mar 20, 2012
Showing with 5 additions and 2 deletions.
  1. +2 −1 lib/akamai/configuration.rb
  2. +3 −1 lib/akamai/connection.rb
@@ -6,6 +6,7 @@ class Configuration
:cachecontrol_password,
:cachecontrol_domain,
:cachecontrol_purge_action,
+ :cachecontrol_email_notification,
:netstorage_username,
:netstorage_password,
:netstorage_ftp_host,
@@ -17,7 +18,7 @@ def initialize(args = {})
self.wsdl_url = 'http://ccuapi.akamai.com/ccuapi-axis.wsdl'
self.cachecontrol_domain = "production"
self.cachecontrol_purge_action = "remove"
-
+
for key, val in args
send("#{key}=".to_sym, val)
end
View
@@ -18,7 +18,9 @@ def driver
end
def purge(*urls)
- result = driver.purgeRequest(config.cachecontrol_username, config.cachecontrol_password, '', ["domain=#{config.cachecontrol_domain}", "action=#{config.cachecontrol_purge_action}"], urls)
+ opts = ["domain=#{config.cachecontrol_domain}", "action=#{config.cachecontrol_purge_action}"]
+ opts << "email-notification=#{config.cachecontrol_email_notification}" if config.cachecontrol_email_notification
+ result = driver.purgeRequest(config.cachecontrol_username, config.cachecontrol_password, '', opts, urls)
raise PurgeError, result.inspect unless result.resultCode == '100'
true
end

0 comments on commit 5422528

Please sign in to comment.