Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4 from ladams02/master

Support for options email-notification.
  • Loading branch information...
commit 5422528fc6f51ad9926652a41205ce64f27f6e43 2 parents 0e8d723 + 2c6e2c2
Jay Zeschin authored
Showing with 5 additions and 2 deletions.
  1. +2 −1  lib/akamai/configuration.rb
  2. +3 −1 lib/akamai/connection.rb
3  lib/akamai/configuration.rb
View
@@ -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
4 lib/akamai/connection.rb
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
Please sign in to comment.
Something went wrong with that request. Please try again.