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.71.0 lib/specinfra/command/base/port.rb
specinfra-2.70.2 lib/specinfra/command/base/port.rb
specinfra-2.70.1 lib/specinfra/command/base/port.rb
specinfra-2.70.0 lib/specinfra/command/base/port.rb
specinfra-2.69.0 lib/specinfra/command/base/port.rb
specinfra-2.68.2 lib/specinfra/command/base/port.rb
specinfra-2.68.1 lib/specinfra/command/base/port.rb
specinfra-2.68.0 lib/specinfra/command/base/port.rb
specinfra-2.67.10 lib/specinfra/command/base/port.rb
specinfra-2.67.9 lib/specinfra/command/base/port.rb
specinfra-2.67.8 lib/specinfra/command/base/port.rb
specinfra-2.67.7 lib/specinfra/command/base/port.rb
specinfra-2.67.6 lib/specinfra/command/base/port.rb
specinfra-2.67.5 lib/specinfra/command/base/port.rb
specinfra-2.67.3 lib/specinfra/command/base/port.rb
specinfra-2.67.2 lib/specinfra/command/base/port.rb
specinfra-2.67.1 lib/specinfra/command/base/port.rb
specinfra-2.67.0 lib/specinfra/command/base/port.rb
specinfra-2.66.9 lib/specinfra/command/base/port.rb
specinfra-2.66.8 lib/specinfra/command/base/port.rb