formatting
This commit is contained in:
parent
15d91a3efd
commit
8bb0f04131
@ -3,6 +3,7 @@
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
require 'whenever'
|
require 'whenever'
|
||||||
|
require 'whenever/version'
|
||||||
|
|
||||||
options = {}
|
options = {}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ require 'tempfile'
|
|||||||
|
|
||||||
module Whenever
|
module Whenever
|
||||||
class CommandLine
|
class CommandLine
|
||||||
|
|
||||||
def self.execute(options={})
|
def self.execute(options={})
|
||||||
new(options).run
|
new(options).run
|
||||||
end
|
end
|
||||||
@ -130,6 +129,5 @@ module Whenever
|
|||||||
def comment_close
|
def comment_close
|
||||||
"# End #{comment_base}"
|
"# End #{comment_base}"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -142,7 +142,6 @@ module Whenever
|
|||||||
|
|
||||||
output[0, max_occurances].join(',')
|
output[0, max_occurances].join(',')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
module Whenever
|
module Whenever
|
||||||
class Job
|
class Job
|
||||||
|
|
||||||
attr_reader :at
|
attr_reader :at
|
||||||
|
|
||||||
def initialize(options = {})
|
def initialize(options = {})
|
||||||
@ -42,6 +41,5 @@ module Whenever
|
|||||||
def escape_double_quotes(str)
|
def escape_double_quotes(str)
|
||||||
str.gsub(/"/) { '\"' }
|
str.gsub(/"/) { '\"' }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
module Whenever
|
module Whenever
|
||||||
class JobList
|
class JobList
|
||||||
|
|
||||||
def initialize(options)
|
def initialize(options)
|
||||||
@jobs, @env, @set_variables, @pre_set_variables = {}, {}, {}, {}
|
@jobs, @env, @set_variables, @pre_set_variables = {}, {}, {}, {}
|
||||||
|
|
||||||
@ -143,6 +142,5 @@ module Whenever
|
|||||||
|
|
||||||
shortcut_jobs.join + combine(regular_jobs).join
|
shortcut_jobs.join + combine(regular_jobs).join
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
module Whenever
|
module Whenever
|
||||||
module Output
|
module Output
|
||||||
class Redirection
|
class Redirection
|
||||||
|
|
||||||
def initialize(output)
|
def initialize(output)
|
||||||
@output = output
|
@output = output
|
||||||
end
|
end
|
||||||
@ -52,7 +51,6 @@ module Whenever
|
|||||||
def redirect_from_string
|
def redirect_from_string
|
||||||
">> #{@output} 2>&1"
|
">> #{@output} 2>&1"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,9 +11,9 @@ job_type :command, ":task :output"
|
|||||||
|
|
||||||
# Run rake through bundler if possible
|
# Run rake through bundler if possible
|
||||||
if Whenever.bundler?
|
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
|
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
|
end
|
||||||
|
|
||||||
# Create a runner job that's appropriate for the Rails version,
|
# Create a runner job that's appropriate for the Rails version,
|
||||||
|
Loading…
Reference in New Issue
Block a user