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.0.0.beta25 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta24 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta23 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta22 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta21 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta20 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta19 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta18 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta17 lib/specinfra/command/base/port.rb
specinfra-2.0.0.beta16 lib/specinfra/command/base/port.rb