Sha256: c7abe9f32dcbdd87578db27c167d0abac6f7eabba013b41ac4000352f926f651

Contents?: true

Size: 380 Bytes

Versions: 70

Compression:

Stored size: 380 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

70 entries across 70 versions & 1 rubygems

Version Path
specinfra-2.10.3 lib/specinfra/command/base/port.rb
specinfra-2.10.2 lib/specinfra/command/base/port.rb
specinfra-2.10.1 lib/specinfra/command/base/port.rb
specinfra-2.10.0 lib/specinfra/command/base/port.rb
specinfra-2.9.3 lib/specinfra/command/base/port.rb
specinfra-2.9.2 lib/specinfra/command/base/port.rb
specinfra-2.9.1 lib/specinfra/command/base/port.rb
specinfra-2.9.0 lib/specinfra/command/base/port.rb
specinfra-2.8.0 lib/specinfra/command/base/port.rb
specinfra-2.7.0 lib/specinfra/command/base/port.rb
specinfra-2.6.0 lib/specinfra/command/base/port.rb
specinfra-2.5.0 lib/specinfra/command/base/port.rb
specinfra-2.4.5 lib/specinfra/command/base/port.rb
specinfra-2.4.4 lib/specinfra/command/base/port.rb
specinfra-2.4.3 lib/specinfra/command/base/port.rb
specinfra-2.4.2 lib/specinfra/command/base/port.rb
specinfra-2.4.1 lib/specinfra/command/base/port.rb
specinfra-2.4.0 lib/specinfra/command/base/port.rb
specinfra-2.3.2 lib/specinfra/command/base/port.rb
specinfra-2.3.1 lib/specinfra/command/base/port.rb