Sha256: 7ebd7784a433695bf766f36fdbc31594dbf5e61e1f0bd78717c2c51f7a5b3b4c
Contents?: true
Size: 572 Bytes
Versions: 41
Compression:
Stored size: 572 Bytes
Contents
require 'itamae' module Itamae module Resource class Execute < Base define_attribute :action, default: :run define_attribute :command, type: String, default_name: true define_attribute :cwd, type: String def pre_action case @current_action when :run attributes.executed = true end end def set_current_attributes current.executed = false end def action_run(options) run_command(attributes.command, cwd: attributes.cwd) updated! end end end end
Version data entries
41 entries across 41 versions & 1 rubygems