Sha256: fdb53dcccd7ed839228359d4e0de73860714b90a3af3b4c52e714bd25ba2c57c

Contents?: true

Size: 440 Bytes

Versions: 222

Compression:

Stored size: 440 Bytes

Contents

class Specinfra::Command::Base::Process < Specinfra::Command::Base
  class << self
    def get(process, opts)
      "ps -C #{escape(process)} -o #{opts[:format]} | head -1"
    end

    def check_is_running(process)
      "ps aux | grep -w -- #{escape(process)} | grep -qv grep"
    end

    def check_count(process,count)
      "test $(ps aux | grep -w -- #{escape(process)} | grep -v grep | wc -l) -eq #{escape(count)}"
    end
  end
end

Version data entries

222 entries across 222 versions & 3 rubygems

Version Path
specinfra-2.36.4 lib/specinfra/command/base/process.rb
specinfra-2.36.3 lib/specinfra/command/base/process.rb
specinfra-2.36.2 lib/specinfra/command/base/process.rb
specinfra-2.36.1 lib/specinfra/command/base/process.rb
specinfra-2.36.0 lib/specinfra/command/base/process.rb
specinfra-2.35.1 lib/specinfra/command/base/process.rb
specinfra-2.35.0 lib/specinfra/command/base/process.rb
specinfra-2.34.9 lib/specinfra/command/base/process.rb
specinfra-2.34.8 lib/specinfra/command/base/process.rb
specinfra-2.34.7 lib/specinfra/command/base/process.rb
specinfra-2.34.6 lib/specinfra/command/base/process.rb
specinfra-2.34.5 lib/specinfra/command/base/process.rb
specinfra-2.34.4 lib/specinfra/command/base/process.rb
specinfra-2.34.3 lib/specinfra/command/base/process.rb
specinfra-2.34.2 lib/specinfra/command/base/process.rb
specinfra-2.34.1 lib/specinfra/command/base/process.rb
specinfra-2.34.0 lib/specinfra/command/base/process.rb
specinfra-2.33.1 lib/specinfra/command/base/process.rb
specinfra-2.33.0 lib/specinfra/command/base/process.rb
specinfra-2.32.0 lib/specinfra/command/base/process.rb