Sha256: 9439a8bbf98b0059b48fb1a470067d2d5178fa18009e44ac1ce4b915ed191821

Contents?: true

Size: 894 Bytes

Versions: 6

Compression:

Stored size: 894 Bytes

Contents

module Runbook::Statements
  class Assert < Runbook::Statement
    attr_reader :cmd, :cmd_ssh_config, :cmd_raw
    attr_reader :interval, :timeout, :attempts
    attr_reader :abort_statement

    def timeout_statement
      Runbook.deprecator.deprecation_warning(:timeout_statement, :abort_statement)
      @abort_statement
    end

    def initialize(
      cmd,
      cmd_ssh_config: nil,
      cmd_raw: false,
      interval: 1,
      timeout: 0,
      attempts: 0,
      abort_statement: nil,
      timeout_statement: nil
    )
      @cmd = cmd
      @cmd_ssh_config = cmd_ssh_config
      @cmd_raw = cmd_raw
      @interval = interval
      @timeout = timeout
      @attempts = attempts
      if timeout_statement
        Runbook.deprecator.deprecation_warning(:timeout_statement, :abort_statement)
      end
      @abort_statement = abort_statement || timeout_statement
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 lib/runbook/statements/assert.rb
runbook-1.1.0 lib/runbook/statements/assert.rb
runbook-1.0.0 lib/runbook/statements/assert.rb
runbook-0.16.1 lib/runbook/statements/assert.rb
runbook-0.16.0 lib/runbook/statements/assert.rb
runbook-0.15.0 lib/runbook/statements/assert.rb