forked from ooyala/barkeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (36 loc) · 1.36 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require "bundler/setup"
require "pathological"
require "rake/testtask"
require "resque/tasks"
require "fezzik"
# We use Fezzik for deployments. Fezzik requires this Rakefile, which should in turn require all deploy tasks.
if Fezzik.activated?
Fezzik.init(:tasks => "config/tasks")
require "config/deploy_targets/common"
Dir.glob("config/deploy_targets/*.rb").each { |path| require path }
BarkeepDeploy.ensure_all_options_are_present
end
task :test => ["test:units", "test:integrations", "test:coffeescripts"]
namespace :test do
Rake::TestTask.new(:units) do |task|
task.libs << "test"
task.test_files = FileList["test/unit/*"]
end
# TODO(caleb): Use a better name for this task.
desc "Run the coffeescript unit tests with shoulda.js."
task :coffeescripts do
puts `node node_modules/jasmine-node/lib/jasmine-node/cli.js --coffee test/coffeescript`
end
Rake::TestTask.new(:integrations) do |task|
task.libs << "test"
task.test_files = FileList["test/integration/*"]
end
end
namespace :resque do
# The resque:work task is defined by the Resque gem. Before running it, we need to require the worker code.
task :work => :require_resque_tasks
# These tasks must be defined for Resque to be able to run tasks on these queues.
task :require_resque_tasks do
Dir.glob("resque_jobs/*.rb").each { |file_name| require file_name }
end
end