Sha256: 879b288b2cbac8513f51af144400524b655a66def75fc955e8a97e73765afb0c

Contents?: true

Size: 439 Bytes

Versions: 103

Compression:

Stored size: 439 Bytes

Contents

class Specinfra::Command::Base::Cron < Specinfra::Command::Base
  class << self
    def check_has_entry(user, entry)
      entry_escaped = entry.gsub(/\*/, '\\*').gsub(/\[/, '\\[').gsub(/\]/, '\\]')
      grep_command = "grep -v '^[[:space:]]*#' | grep -- ^#{escape(entry_escaped)}$"
      if user.nil?
        "crontab -l | #{grep_command}"
      else
        "crontab -u #{escape(user)} -l | #{grep_command}"
      end
    end
  end
end

Version data entries

103 entries across 103 versions & 1 rubygems

Version Path
specinfra-2.25.1 lib/specinfra/command/base/cron.rb
specinfra-2.25.0 lib/specinfra/command/base/cron.rb
specinfra-2.24.2 lib/specinfra/command/base/cron.rb
specinfra-2.24.1 lib/specinfra/command/base/cron.rb
specinfra-2.24.0 lib/specinfra/command/base/cron.rb
specinfra-2.23.0 lib/specinfra/command/base/cron.rb
specinfra-2.22.0 lib/specinfra/command/base/cron.rb
specinfra-2.21.1 lib/specinfra/command/base/cron.rb
specinfra-2.21.0 lib/specinfra/command/base/cron.rb
specinfra-2.20.2 lib/specinfra/command/base/cron.rb
specinfra-2.20.1 lib/specinfra/command/base/cron.rb
specinfra-2.20.0 lib/specinfra/command/base/cron.rb
specinfra-2.19.6 lib/specinfra/command/base/cron.rb
specinfra-2.19.5 lib/specinfra/command/base/cron.rb
specinfra-2.19.4 lib/specinfra/command/base/cron.rb
specinfra-2.19.3 lib/specinfra/command/base/cron.rb
specinfra-2.19.2 lib/specinfra/command/base/cron.rb
specinfra-2.19.1 lib/specinfra/command/base/cron.rb
specinfra-2.19.0 lib/specinfra/command/base/cron.rb
specinfra-2.18.3 lib/specinfra/command/base/cron.rb