Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSL: add zap stanza #4869

Merged
merged 1 commit into from
Jun 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/cask/artifact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Cask::Artifact; end
require 'cask/artifact/input_method'
require 'cask/artifact/screen_saver'
require 'cask/artifact/uninstall'

require 'cask/artifact/zap'

module Cask::Artifact
#
Expand All @@ -46,6 +46,7 @@ def self.artifacts
Cask::Artifact::ScreenSaver,
Cask::Artifact::Uninstall,
Cask::Artifact::AfterBlock,
Cask::Artifact::Zap,
]
end

Expand Down
13 changes: 13 additions & 0 deletions lib/cask/artifact/zap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Cask::Artifact::Zap < Cask::Artifact::UninstallBase
def install_phase
odebug "Nothing to do. The zap artifact has no install phase."
end

def uninstall_phase
odebug "Nothing to do. The zap artifact has no uninstall phase."
end

def zap_phase
dispatch_uninstall_directives(self.class.artifact_dsl_key)
end
end
3 changes: 2 additions & 1 deletion lib/cask/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ def self.ordinary_artifact_types

SPECIAL_ARTIFACT_TYPES = [
:nested_container,
:uninstall
:uninstall,
:zap,
]

SPECIAL_ARTIFACT_TYPES.each do |type|
Expand Down