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/numeric_seconds.rb,
lib/whenever/output_redirection.rb,
lib/whenever/capistrano/v2/support.rb

Defined Under Namespace

Modules: CapistranoSupport, Output Classes: CommandLine, Job, JobList, NumericSeconds

Constant Summary collapse

VERSION =
'0.9.4'

Class Method Summary collapse

Class Method Details

.bin_rails?Boolean


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

def self.bin_rails?
  File.exists?(File.join(path, 'bin', 'rails'))
end

.bundler?Boolean


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

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

.cron(options) ⇒ Object


9
10
11
# File 'lib/whenever.rb', line 9

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

.pathObject


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

def self.path
  Dir.pwd
end

.script_rails?Boolean


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

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

.seconds(number, units) ⇒ Object


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

def self.seconds(number, units)
  Whenever::NumericSeconds.seconds(number, units)
end