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.91.0 lib/specinfra/command/base/port.rb
specinfra-2.90.1 lib/specinfra/command/base/port.rb
specinfra-2.90.0 lib/specinfra/command/base/port.rb
specinfra-2.89.0 lib/specinfra/command/base/port.rb
specinfra-2.88.2 lib/specinfra/command/base/port.rb
specinfra-2.88.1 lib/specinfra/command/base/port.rb
specinfra-2.88.0 lib/specinfra/command/base/port.rb
specinfra-2.87.2 lib/specinfra/command/base/port.rb
specinfra-2.87.1 lib/specinfra/command/base/port.rb
specinfra-2.87.0 lib/specinfra/command/base/port.rb
specinfra-2.86.0 lib/specinfra/command/base/port.rb
specinfra-2.85.1 lib/specinfra/command/base/port.rb
specinfra-2.85.0 lib/specinfra/command/base/port.rb
specinfra-2.84.1 lib/specinfra/command/base/port.rb
specinfra-2.84.0 lib/specinfra/command/base/port.rb
specinfra-2.83.4 lib/specinfra/command/base/port.rb
specinfra-2.83.3 lib/specinfra/command/base/port.rb
specinfra-2.83.2 lib/specinfra/command/base/port.rb
specinfra-2.83.1 lib/specinfra/command/base/port.rb
specinfra-2.83.0 lib/specinfra/command/base/port.rb