le1t0-whenever 0.4.2.002 → 0.4.2.003
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/lib/whenever/job_types/default.rb +12 -8
- data/lib/whenever/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.rdoc
CHANGED
@@ -11,22 +11,26 @@ module Whenever
|
|
11
11
|
@output_redirection = opts.delete(:output) || :not_set
|
12
12
|
@environment = opts.delete(:environment) || :production
|
13
13
|
@path = opts.delete(:path) || Whenever.path
|
14
|
-
@envvars = opts
|
14
|
+
@envvars = envvars(opts)
|
15
15
|
end
|
16
16
|
|
17
17
|
def output
|
18
18
|
envvars + task
|
19
19
|
end
|
20
20
|
|
21
|
-
def envvars
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
def envvars(opts=nil)
|
22
|
+
return @envvars if opts.nil?
|
23
|
+
env_vars = opts
|
24
|
+
if env_vars.is_a?(Hash)
|
25
|
+
env_vars.keys.select do |key|
|
26
|
+
key.to_sym != :RAILS_ENV && key.to_s =~ /^[A-Z_]+$/
|
25
27
|
end.collect do |key|
|
26
|
-
"#{key}=#{
|
28
|
+
"#{key}=#{env_vars[key]}"
|
27
29
|
end.join(' ') + ' '
|
30
|
+
elsif env_vars.is_a?(Array)
|
31
|
+
env_vars.join(' ') + ' '
|
28
32
|
else
|
29
|
-
|
33
|
+
env_vars.to_s + ' '
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
@@ -38,4 +42,4 @@ module Whenever
|
|
38
42
|
|
39
43
|
end
|
40
44
|
end
|
41
|
-
end
|
45
|
+
end
|
data/lib/whenever/version.rb
CHANGED
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 4
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.4.2.
|
9
|
+
- 3
|
10
|
+
version: 0.4.2.003
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Le1t0
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-05
|
18
|
+
date: 2010-07-05 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|