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.6.27 lib/serverspec/type/port.rb
serverspec-0.6.26 lib/serverspec/type/port.rb
serverspec-0.6.25 lib/serverspec/type/port.rb
serverspec-0.6.24 lib/serverspec/type/port.rb
serverspec-0.6.23 lib/serverspec/type/port.rb
serverspec-0.6.22 lib/serverspec/type/port.rb