Sha256: 2c777af08d2fbe2c4b4afee02968cf350f1474e27ed7844c31399ad5b00ca1d5

Contents?: true

Size: 465 Bytes

Versions: 46

Compression:

Stored size: 465 Bytes

Contents

module Serverspec
  module Type
    class Port < Base
      def listening?(protocol)
        if protocol 
          protocol = protocol.to_s.downcase
          unless ["udp", "tcp"].include?(protocol)
            raise ArgumentError.new("`be_listening` matcher doesn't support #{protocol}")
          end

          backend.check_listening_with_protocol(@name, protocol)
        else
          backend.check_listening(@name)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
serverspec-0.10.11 lib/serverspec/type/port.rb
serverspec-0.10.10 lib/serverspec/type/port.rb
serverspec-0.10.9 lib/serverspec/type/port.rb
serverspec-0.10.8 lib/serverspec/type/port.rb
serverspec-0.10.7 lib/serverspec/type/port.rb
serverspec-0.10.6 lib/serverspec/type/port.rb
serverspec-0.10.5 lib/serverspec/type/port.rb
serverspec-0.10.4 lib/serverspec/type/port.rb
serverspec-0.10.3 lib/serverspec/type/port.rb
serverspec-0.10.2 lib/serverspec/type/port.rb
serverspec-0.10.1 lib/serverspec/type/port.rb
serverspec-0.10.0 lib/serverspec/type/port.rb
serverspec-0.9.8 lib/serverspec/type/port.rb
serverspec-0.9.7 lib/serverspec/type/port.rb
serverspec-0.9.6 lib/serverspec/type/port.rb
serverspec-0.9.5 lib/serverspec/type/port.rb
serverspec-0.9.4 lib/serverspec/type/port.rb
serverspec-0.9.3 lib/serverspec/type/port.rb
serverspec-0.9.2 lib/serverspec/type/port.rb
serverspec-0.9.1 lib/serverspec/type/port.rb