Class: Middleman::Cli::KeyCDN::Invalidate
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Middleman::Cli::KeyCDN::Invalidate
- Includes:
- Thor::Actions
- Defined in:
- lib/middleman-keycdn/commands/invalidate.rb
Overview
This class provides an “invalidate” command for the middleman CLI.
Constant Summary collapse
- INVALIDATION_LIMIT =
1000- INDEX_REGEX =
/ \A (.*\/)? index\.html \z /ix
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
23 24 25 |
# File 'lib/middleman-keycdn/commands/invalidate.rb', line 23 def self.exit_on_failure? true end |
Instance Method Details
#invalidate(opts = nil, files = nil) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/middleman-keycdn/commands/invalidate.rb', line 27 def invalidate(opts = nil, files = nil) = opts if .purge_all purge_all else purge_urls files end end |