ipecache 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/bin/ipecache +9 -0
- data/ipecache.gemspec +1 -1
- data/lib/ipecache/plugins/akamai.rb +1 -1
- data/lib/ipecache/plugins/edgecast.rb +1 -1
- data/lib/ipecache/plugins/fastly.rb +1 -1
- data/lib/ipecache/plugins/plugin.rb +4 -0
- data/lib/ipecache/runner.rb +3 -1
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -67,7 +67,7 @@ The main component of Ipecache, and the program which initialises and calls all
|
|
67
67
|
|
68
68
|
#### Usage
|
69
69
|
```bash
|
70
|
-
ipecache [-f -u -c -p --status]
|
70
|
+
ipecache [-f -u -c -p -l --status]
|
71
71
|
```
|
72
72
|
|
73
73
|
* Mandatory Parameters (you must specify one or the other)
|
@@ -78,6 +78,8 @@ ipecache [-f -u -c -p --status]
|
|
78
78
|
* --status: Prints the status of all ipecache plugins
|
79
79
|
* -c: Indicates that only CDN plugins should be run
|
80
80
|
* -p: Indicates that only local proxy plugins should be run.
|
81
|
+
* -l: Specify a file to log errors to
|
82
|
+
* --nofail: Do not quit on error, continue purging
|
81
83
|
|
82
84
|
|
83
85
|
#### Example (Checking plugin status)
|
data/bin/ipecache
CHANGED
@@ -46,6 +46,11 @@ Choice.options do
|
|
46
46
|
long '--log-file'
|
47
47
|
desc 'Log errors to specified file in addition to stdout'
|
48
48
|
end
|
49
|
+
|
50
|
+
option :continue_on_error, :required => false do
|
51
|
+
long '--nofail'
|
52
|
+
desc 'Continue on errors instead of exiting'
|
53
|
+
end
|
49
54
|
end
|
50
55
|
|
51
56
|
if Choice.choices[:status]
|
@@ -76,6 +81,10 @@ if Choice.choices[:log_file]
|
|
76
81
|
@log_file = Choice.choices[:log_file]
|
77
82
|
end
|
78
83
|
|
84
|
+
if Choice.choices[:continue_on_error]
|
85
|
+
@continue_on_error = Choice.choices[:continue_on_error]
|
86
|
+
end
|
87
|
+
|
79
88
|
if !Choice.choices[:cdnonly]
|
80
89
|
puts ""
|
81
90
|
puts "Running plugins registered for Proxy Purge..."
|
data/ipecache.gemspec
CHANGED
@@ -2,7 +2,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'ipecache'
|
5
|
-
gem.version = '0.0.
|
5
|
+
gem.version = '0.0.4'
|
6
6
|
gem.authors = ["Jon Cowie"]
|
7
7
|
gem.email = 'jonlives@gmail.com'
|
8
8
|
gem.homepage = 'https://github.com/jonlives/ipecache'
|
@@ -54,7 +54,7 @@ module Ipecache
|
|
54
54
|
response_hash = response.to_hash
|
55
55
|
if response_hash[:purge_request_response][:return][:result_msg] != "Success."
|
56
56
|
plugin_puts_error(url,"An Error occured: #{response_hash[:purge_request_response][:return][:result_msg]}")
|
57
|
-
exit 1
|
57
|
+
exit 1 unless continue_on_error
|
58
58
|
else
|
59
59
|
plugin_puts "Purge successful!"
|
60
60
|
end
|
data/lib/ipecache/runner.rb
CHANGED
@@ -25,11 +25,13 @@ module Ipecache
|
|
25
25
|
def run_plugins(hook)
|
26
26
|
urls = @urls
|
27
27
|
log_file = @log_file
|
28
|
+
continue_on_error = @continue_on_error
|
28
29
|
Ipecache::Plugins.run(
|
29
30
|
:config => ipecache_config,
|
30
31
|
:hook => hook.to_sym,
|
31
32
|
:urls => urls,
|
32
|
-
:log_file => log_file
|
33
|
+
:log_file => log_file,
|
34
|
+
:continue_on_error => continue_on_error
|
33
35
|
)
|
34
36
|
end
|
35
37
|
|