Sha256: bc7209cbfa635cf209727e20997f658920b9992ff2d9740f268a1205b99e87ef

Contents?: true

Size: 480 Bytes

Versions: 52

Compression:

Stored size: 480 Bytes

Contents

module Serverspec
  module Type
    class Port < Base
      def listening?(protocol)
        if protocol
          protocol = protocol.to_s.downcase
          unless ["udp", "tcp", "tcp6", "udp6"].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

52 entries across 52 versions & 1 rubygems

Version Path
serverspec-1.16.0 lib/serverspec/type/port.rb
serverspec-1.15.0 lib/serverspec/type/port.rb
serverspec-1.14.0 lib/serverspec/type/port.rb
serverspec-1.13.0 lib/serverspec/type/port.rb
serverspec-1.12.0 lib/serverspec/type/port.rb
serverspec-1.11.0 lib/serverspec/type/port.rb
serverspec-1.10.0 lib/serverspec/type/port.rb
serverspec-1.9.1 lib/serverspec/type/port.rb
serverspec-1.9.0 lib/serverspec/type/port.rb
serverspec-1.8.0 lib/serverspec/type/port.rb
serverspec-1.7.1 lib/serverspec/type/port.rb
serverspec-1.7.0 lib/serverspec/type/port.rb
serverspec-1.6.0 lib/serverspec/type/port.rb
serverspec-1.5.0 lib/serverspec/type/port.rb
serverspec-2.0.0.beta2 lib/serverspec/type/port.rb
serverspec-1.4.2 lib/serverspec/type/port.rb
serverspec-2.0.0.beta1 lib/serverspec/type/port.rb
serverspec-1.4.1 lib/serverspec/type/port.rb
serverspec-1.4.0 lib/serverspec/type/port.rb
serverspec-1.3.0 lib/serverspec/type/port.rb