From 8bb0f04131cac1183e9b996881149dc578e219ba Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Sun, 31 Jul 2011 09:33:16 -0400 Subject: [PATCH] formatting --- bin/whenever | 1 + lib/whenever/command_line.rb | 2 -- lib/whenever/cron.rb | 1 - lib/whenever/job.rb | 2 -- lib/whenever/job_list.rb | 2 -- lib/whenever/output_redirection.rb | 2 -- lib/whenever/setup.rb | 4 ++-- 7 files changed, 3 insertions(+), 11 deletions(-) diff --git a/bin/whenever b/bin/whenever index 74c72a3..c2bd54c 100644 --- a/bin/whenever +++ b/bin/whenever @@ -3,6 +3,7 @@ require 'rubygems' require 'optparse' require 'whenever' +require 'whenever/version' options = {} diff --git a/lib/whenever/command_line.rb b/lib/whenever/command_line.rb index e5dd976..c52067d 100644 --- a/lib/whenever/command_line.rb +++ b/lib/whenever/command_line.rb @@ -3,7 +3,6 @@ require 'tempfile' module Whenever class CommandLine - def self.execute(options={}) new(options).run end @@ -130,6 +129,5 @@ module Whenever def comment_close "# End #{comment_base}" end - end end diff --git a/lib/whenever/cron.rb b/lib/whenever/cron.rb index 95d74b5..4336d21 100644 --- a/lib/whenever/cron.rb +++ b/lib/whenever/cron.rb @@ -142,7 +142,6 @@ module Whenever output[0, max_occurances].join(',') end - end end end diff --git a/lib/whenever/job.rb b/lib/whenever/job.rb index c4be4fb..668f3f4 100644 --- a/lib/whenever/job.rb +++ b/lib/whenever/job.rb @@ -1,6 +1,5 @@ module Whenever class Job - attr_reader :at def initialize(options = {}) @@ -42,6 +41,5 @@ module Whenever def escape_double_quotes(str) str.gsub(/"/) { '\"' } end - end end diff --git a/lib/whenever/job_list.rb b/lib/whenever/job_list.rb index 444137a..e5f6c40 100644 --- a/lib/whenever/job_list.rb +++ b/lib/whenever/job_list.rb @@ -1,6 +1,5 @@ module Whenever class JobList - def initialize(options) @jobs, @env, @set_variables, @pre_set_variables = {}, {}, {}, {} @@ -143,6 +142,5 @@ module Whenever shortcut_jobs.join + combine(regular_jobs).join end - end end diff --git a/lib/whenever/output_redirection.rb b/lib/whenever/output_redirection.rb index 44fa1d2..1529709 100644 --- a/lib/whenever/output_redirection.rb +++ b/lib/whenever/output_redirection.rb @@ -1,7 +1,6 @@ module Whenever module Output class Redirection - def initialize(output) @output = output end @@ -52,7 +51,6 @@ module Whenever def redirect_from_string ">> #{@output} 2>&1" end - end end end diff --git a/lib/whenever/setup.rb b/lib/whenever/setup.rb index 68a0b17..4f3e218 100644 --- a/lib/whenever/setup.rb +++ b/lib/whenever/setup.rb @@ -11,9 +11,9 @@ job_type :command, ":task :output" # Run rake through bundler if possible if Whenever.bundler? - job_type :rake, "cd :path && RAILS_ENV=:environment bundle exec rake :task --silent :output" + job_type :rake, "cd :path && RAILS_ENV=:environment bundle exec rake :task --silent :output" else - job_type :rake, "cd :path && RAILS_ENV=:environment rake :task --silent :output" + job_type :rake, "cd :path && RAILS_ENV=:environment rake :task --silent :output" end # Create a runner job that's appropriate for the Rails version,