Module: Whenever
- Defined in:
- lib/whenever.rb,
lib/whenever/os.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, OS, Output
Classes: CommandLine, Job, JobList, NumericSeconds
Constant Summary
collapse
- VERSION =
'1.1.1'
Class Method Summary
collapse
Class Method Details
.bin_rails? ⇒ Boolean
24
25
26
|
# File 'lib/whenever.rb', line 24
def self.bin_rails?
File.exist?(File.join(path, 'bin', 'rails'))
end
|
.bundler? ⇒ Boolean
32
33
34
|
# File 'lib/whenever.rb', line 32
def self.bundler?
File.exist?(File.join(path, 'Gemfile'))
end
|
.cron(options) ⇒ Object
12
13
14
|
# File 'lib/whenever.rb', line 12
def self.cron(options)
Whenever::JobList.new(options).generate_cron_output
end
|
.path ⇒ Object
20
21
22
|
# File 'lib/whenever.rb', line 20
def self.path
Dir.pwd
end
|
.script_rails? ⇒ Boolean
28
29
30
|
# File 'lib/whenever.rb', line 28
def self.script_rails?
File.exist?(File.join(path, 'script', 'rails'))
end
|
.seconds(number, units) ⇒ Object
16
17
18
|
# File 'lib/whenever.rb', line 16
def self.seconds(number, units)
Whenever::NumericSeconds.seconds(number, units)
end
|
.update_cron(options) ⇒ Object
36
37
38
39
40
|
# File 'lib/whenever.rb', line 36
def self.update_cron options
o = { 'update' => true, 'console' => false}
o.merge! options if options
Whenever::CommandLine.execute o
end
|