In order to use bundler you must change to the directory where Gemfile exists
* Change runner command to cd to directory prior to running script/runner
This commit is contained in:
parent
22d34a538d
commit
cd92f1f4f1
@ -4,7 +4,7 @@ module Whenever
|
||||
|
||||
def output
|
||||
path_required
|
||||
%Q(#{File.join(@path, 'script', 'runner')} -e #{@environment} #{task.inspect})
|
||||
%Q(cd #{File.join(@path)} && script/runner -e #{@environment} #{task.inspect})
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ class OutputAtTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using one entry because the times are aligned" do
|
||||
assert_match '2 5,15 * * 1,3,5 /your/path/script/runner -e production "blahblah"', @output
|
||||
assert_match '2 5,15 * * 1,3,5 cd /your/path && script/runner -e production "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -168,9 +168,9 @@ class OutputAtTest < Test::Unit::TestCase
|
||||
|
||||
should "output all of the commands @daily" do
|
||||
assert_match '@daily cd /your/path && RAILS_ENV=production /usr/bin/env rake blah:blah', @output
|
||||
assert_match '@daily /your/path/script/runner -e production "runner_1"', @output
|
||||
assert_match '@daily cd /your/path && script/runner -e production "runner_1"', @output
|
||||
assert_match '@daily command_1', @output
|
||||
assert_match '@daily /your/path/script/runner -e production "runner_2"', @output
|
||||
assert_match '@daily cd /your/path && script/runner -e production "runner_2"', @output
|
||||
assert_match '@daily command_2', @output
|
||||
end
|
||||
end
|
||||
|
@ -14,7 +14,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using that path" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e production "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e production "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -30,7 +30,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using that path" do
|
||||
assert_match two_hours + ' /some/other/path/script/runner -e production "blahblah"', @output
|
||||
assert_match two_hours + ' cd /some/other/path && script/runner -e production "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -47,7 +47,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using that path" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e production "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e production "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -65,7 +65,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "use the path" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e production "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e production "blahblah"', @output
|
||||
assert_no_match /\/rails\/path/, @output
|
||||
end
|
||||
end
|
||||
@ -101,7 +101,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using that environment" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e silly "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e silly "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -118,7 +118,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using that environment" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e serious "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e serious "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -135,7 +135,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using the override environment" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e serious "blahblah"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e serious "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -152,7 +152,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using the overridden path and environment" do
|
||||
assert_match two_hours + ' /serious/path/script/runner -e serious "blahblah"', @output
|
||||
assert_match two_hours + ' cd /serious/path && script/runner -e serious "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -169,7 +169,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using the overridden path and environment" do
|
||||
assert_match two_hours + ' /serious/path/script/runner -e serious "blahblah"', @output
|
||||
assert_match two_hours + ' cd /serious/path && script/runner -e serious "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -186,7 +186,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using the original environmnet" do
|
||||
assert_match two_hours + ' /silly/path/script/runner -e silly "blahblah"', @output
|
||||
assert_match two_hours + ' cd /silly/path && script/runner -e silly "blahblah"', @output
|
||||
end
|
||||
end
|
||||
|
||||
@ -202,7 +202,7 @@ class OutputRunnerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
should "output the runner using the original environmnet" do
|
||||
assert_match two_hours + ' /my/path/script/runner -e production "Product.import(\"http://example.com/product.xml\")"', @output
|
||||
assert_match two_hours + ' cd /my/path && script/runner -e production "Product.import(\"http://example.com/product.xml\")"', @output
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user