Module: Whenever

Defined in:
lib/whenever.rb,
lib/whenever/job.rb,
lib/whenever/cron.rb,
lib/whenever/version.rb,
lib/whenever/job_list.rb,
lib/whenever/command_line.rb,
lib/whenever/output_redirection.rb

Defined Under Namespace

Modules: Output Classes: CommandLine, Job, JobList

Constant Summary collapse

VERSION =
'0.7.3'

Class Method Summary collapse

Class Method Details

.bundler?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/whenever.rb', line 32

def self.bundler?
  File.exists?(File.join(path, 'Gemfile'))
end

.cron(options) ⇒ Object



20
21
22
# File 'lib/whenever.rb', line 20

def self.cron(options)
  Whenever::JobList.new(options).generate_cron_output
end

.pathObject



24
25
26
# File 'lib/whenever.rb', line 24

def self.path
  Dir.pwd
end

.rails3?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/whenever.rb', line 28

def self.rails3?
  File.exists?(File.join(path, 'script', 'rails'))
end