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.0.1'

Class Method Summary collapse

Class Method Details

.bundler?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/whenever.rb', line 26

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

.cron(options) ⇒ Object



14
15
16
# File 'lib/whenever.rb', line 14

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

.pathObject



18
19
20
# File 'lib/whenever.rb', line 18

def self.path
  Dir.pwd
end

.rails3?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/whenever.rb', line 22

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