Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for options email-notification. #4

Merged
merged 2 commits into from

3 participants

@ladams02

Updated Configuration to accept cachecontrol_email_notification and updated Connection to append to purge options.

@jayzes jayzes merged commit 5422528 into jayzes:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +2 −1  lib/akamai/configuration.rb
  2. +3 −1 lib/akamai/connection.rb
View
3  lib/akamai/configuration.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
4 lib/akamai/connection.rb
@@ -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
Something went wrong with that request. Please try again.