Sha256: b50bdb1026957892a9d83986038550adce436f142702c5fdc4d5493fefd3069b

Contents?: true

Size: 381 Bytes

Versions: 311

Compression:

Stored size: 381 Bytes

Contents

class Specinfra::Command::Base::Port < Specinfra::Command::Base
  class << self
    def check_is_listening(port, options={})
      pattern = ":#{port} "
      pattern = " #{options[:local_address]}#{pattern}" if options[:local_address]
      pattern = "^#{options[:protocol]} .*#{pattern}" if options[:protocol]
      "netstat -tunl | grep -- #{escape(pattern)}"
    end
  end
end

Version data entries

311 entries across 311 versions & 3 rubygems

Version Path
specinfra-2.82.5 lib/specinfra/command/base/port.rb
specinfra-2.82.4 lib/specinfra/command/base/port.rb
specinfra-2.82.3 lib/specinfra/command/base/port.rb
specinfra-2.82.2 lib/specinfra/command/base/port.rb
specinfra-2.82.1 lib/specinfra/command/base/port.rb
specinfra-2.82.0 lib/specinfra/command/base/port.rb
specinfra-2.81.0 lib/specinfra/command/base/port.rb
specinfra-2.80.0 lib/specinfra/command/base/port.rb
specinfra-2.79.0 lib/specinfra/command/base/port.rb
specinfra-2.78.2 lib/specinfra/command/base/port.rb
specinfra-2.78.1 lib/specinfra/command/base/port.rb
specinfra-2.78.0 lib/specinfra/command/base/port.rb
specinfra-2.77.3 lib/specinfra/command/base/port.rb
specinfra-2.77.2 lib/specinfra/command/base/port.rb
specinfra-2.77.1 lib/specinfra/command/base/port.rb
specinfra-2.77.0 lib/specinfra/command/base/port.rb
specinfra-2.76.9 lib/specinfra/command/base/port.rb
specinfra-2.76.8 lib/specinfra/command/base/port.rb
specinfra-2.76.7 lib/specinfra/command/base/port.rb
specinfra-2.76.6 lib/specinfra/command/base/port.rb