Sha256: dfa28e98209d475543cb86a8314ae3b75bd9972e897cd29e4120ad6a8f367a49

Contents?: true

Size: 549 Bytes

Versions: 63

Compression:

Stored size: 549 Bytes

Contents

module EbDeployer
  class SmokeTest
    def initialize(test_body)
      @test_body = test_body
    end

    def run(host_name, logger=nil)
      return unless @test_body
      logger.log("running smoke test for #{host_name}...") if logger

      case @test_body
      when Proc
        @test_body.call(host_name)
      when String
        eval(@test_body, binding)
      else
        raise "smoke test can only be a string to evaluate or a proc object such as lambda"
      end

      logger.log("smoke test succeeded.") if logger
    end
  end
end

Version data entries

63 entries across 63 versions & 3 rubygems

Version Path
man_eb_deployer-0.8.0 lib/eb_deployer/smoke_test.rb
eb_deployer_updated-0.8.1 lib/eb_deployer/smoke_test.rb
eb_deployer_updated-0.8.0 lib/eb_deployer/smoke_test.rb
eb_deployer-0.7.0 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.6 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.5 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.4 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.3 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.2 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.1 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta6 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta5 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta4 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta3 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta2 lib/eb_deployer/smoke_test.rb
eb_deployer-0.5.2 lib/eb_deployer/smoke_test.rb
eb_deployer-0.6.0.beta1 lib/eb_deployer/smoke_test.rb
eb_deployer-0.5.1.beta3 lib/eb_deployer/smoke_test.rb
eb_deployer-0.5.1.beta2 lib/eb_deployer/smoke_test.rb