technicalpickles-whenever 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/job_types/default.rb +1 -2
- data/lib/version.rb +1 -1
- data/test/output_lockrun_test.rb +4 -6
- data/whenever.gemspec +1 -1
- metadata +1 -1
data/lib/job_types/default.rb
CHANGED
@@ -34,8 +34,7 @@ module Whenever
|
|
34
34
|
|
35
35
|
def lockrunify(output)
|
36
36
|
path_required
|
37
|
-
|
38
|
-
%Q{/usr/bin/env lockrun --lockfile=#{lockfile_path} -- sh -c "#{escaped_output}"}
|
37
|
+
%Q{/usr/bin/env lockrun --lockfile=#{lockfile_path} -- sh -c '#{output}'}
|
39
38
|
end
|
40
39
|
|
41
40
|
def lockfile_path
|
data/lib/version.rb
CHANGED
data/test/output_lockrun_test.rb
CHANGED
@@ -15,7 +15,7 @@ class OutputLockrunTest < Test::Unit::TestCase
|
|
15
15
|
end
|
16
16
|
|
17
17
|
should "output the command wrapped by lockrun with the default lockfile" do
|
18
|
-
assert_match two_hours + %Q{ /usr/bin/env lockrun --lockfile=/some/directory/log/default.lockrun -- sh -c
|
18
|
+
assert_match two_hours + %Q{ /usr/bin/env lockrun --lockfile=/some/directory/log/default.lockrun -- sh -c 'blahblah'}, @output
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -30,10 +30,8 @@ class OutputLockrunTest < Test::Unit::TestCase
|
|
30
30
|
file
|
31
31
|
end
|
32
32
|
|
33
|
-
"cd #{@path} && RAILS_ENV=#{@environment} /usr/bin/env rake #{task}"
|
34
|
-
|
35
33
|
should "output the command wrapped by lockrun with the default lockfile" do
|
36
|
-
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/my/super/directory/log/default.lockrun -- sh -c
|
34
|
+
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/my/super/directory/log/default.lockrun -- sh -c 'cd /my/super/directory && RAILS_ENV=production /usr/bin/env rake blahblah'}, @output
|
37
35
|
end
|
38
36
|
end
|
39
37
|
|
@@ -49,7 +47,7 @@ class OutputLockrunTest < Test::Unit::TestCase
|
|
49
47
|
end
|
50
48
|
|
51
49
|
should "output the command wrapped by lockrun with the default lockfile" do
|
52
|
-
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/my/directory/log/default.lockrun -- sh -c
|
50
|
+
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/my/directory/log/default.lockrun -- sh -c '/my/directory/script/runner -e production "blahblah"'}, @output
|
53
51
|
end
|
54
52
|
end
|
55
53
|
|
@@ -65,7 +63,7 @@ class OutputLockrunTest < Test::Unit::TestCase
|
|
65
63
|
end
|
66
64
|
|
67
65
|
should "output the command wrapped by lockrun with the zomg lockfile" do
|
68
|
-
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/some/directory/log/zomg.lockrun -- sh -c
|
66
|
+
assert_includes %Q{#{two_hours} /usr/bin/env lockrun --lockfile=/some/directory/log/zomg.lockrun -- sh -c 'blahblah'}, @output
|
69
67
|
end
|
70
68
|
end
|
71
69
|
|
data/whenever.gemspec
CHANGED