Sha256: 38c98b5a54b433140f18a4e4e82e58b45429122c05b91dd7dc4d4f2e40bbd7d2

Contents?: true

Size: 346 Bytes

Versions: 9

Compression:

Stored size: 346 Bytes

Contents

class Specinfra::Command::Base::Port < Specinfra::Command::Base
  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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta15 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta14 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta13 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta12 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta11 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta10 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta9 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta8 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta7 lib/specinfra/command/base/port.rb