Sha256: a7e6dc2e4a90ec07349e97d6364ae6394b23aab751e0517b1238c8d35a7963a8

Contents?: true

Size: 490 Bytes

Versions: 21

Compression:

Stored size: 490 Bytes

Contents

module Itamae
  module Resource
    class Execute < Base
      define_attribute :action, default: :run
      define_attribute :command, type: String, default_name: true

      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)
        updated!
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
itamae-1.14.1 lib/itamae/resource/execute.rb
itamae-1.14.0 lib/itamae/resource/execute.rb
itamae-1.13.1 lib/itamae/resource/execute.rb
itamae-1.13.0 lib/itamae/resource/execute.rb
itamae-1.12.6 lib/itamae/resource/execute.rb
itamae-1.12.5 lib/itamae/resource/execute.rb
itamae-1.12.4 lib/itamae/resource/execute.rb
itamae-1.12.3 lib/itamae/resource/execute.rb
itamae-1.12.2 lib/itamae/resource/execute.rb
itamae-1.12.1 lib/itamae/resource/execute.rb
itamae-1.12.0 lib/itamae/resource/execute.rb
itamae-1.11.2 lib/itamae/resource/execute.rb
itamae-1.11.1 lib/itamae/resource/execute.rb
itamae-1.11.0 lib/itamae/resource/execute.rb
itamae-1.10.10 lib/itamae/resource/execute.rb
itamae-1.10.9 lib/itamae/resource/execute.rb
itamae-1.10.8 lib/itamae/resource/execute.rb
itamae-1.10.7 lib/itamae/resource/execute.rb
itamae-1.10.6 lib/itamae/resource/execute.rb
itamae-1.10.5 lib/itamae/resource/execute.rb