Sha256: aaaf160bc4e9ff22b026f78061466e84f77860c64e2cd35fc3ecab0e981aa8ef

Contents?: true

Size: 347 Bytes

Versions: 97

Compression:

Stored size: 347 Bytes

Contents

RSpec::Matchers.define :be_reachable  do
  match do |host|
    proto   = 'tcp'
    timeout = 5
    if @attr
      port    = @attr[:port]
      proto   = @attr[:proto]   if @attr[:proto]
      timeout = @attr[:timeout] if @attr[:timeout]
    end

    host.reachable?(port, proto, timeout)
  end

  chain :with do |attr|
    @attr = attr
  end
end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
serverspec-0.13.0 lib/serverspec/matchers/be_reachable.rb
serverspec-0.12.0 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.5 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.4 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.3 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.2 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.1 lib/serverspec/matchers/be_reachable.rb
serverspec-0.11.0 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.13 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.12 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.11 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.10 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.9 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.8 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.7 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.6 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.5 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.4 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.3 lib/serverspec/matchers/be_reachable.rb
serverspec-0.10.2 lib/serverspec/matchers/be_reachable.rb