forked from pangratz/irc-log-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
43 lines (33 loc) · 881 Bytes
/
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
APPNAME = 'irc'
require "bundler/setup"
require 'rake-pipeline'
require 'colored'
desc "Build #{APPNAME}"
task :build => :clean do
Rake::Pipeline::Project.new('Assetfile').invoke
end
desc "Build #{APPNAME}"
task :clean do
Rake::Pipeline::Project.new('Assetfile').clean
end
desc "Run tests with PhantomJS"
task :test => :build do
unless system("which phantomjs > /dev/null 2>&1")
abort "PhantomJS is not installed. Download from http://phantomjs.org/"
end
cmd = "phantomjs tests/qunit/run-qunit.js \"file://#{File.dirname(__FILE__)}/tests/index.html\""
# Run the tests
puts "Running #{APPNAME} tests"
success = system(cmd)
if success
puts "Tests Passed".green
else
puts "Tests Failed".red
exit(1)
end
end
desc "Automatically run tests (Mac OS X only)"
task :autotest do
system("kicker -e 'rake test' app")
end
task :default => :test