forked from bborn/communityengine
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
executable file
·54 lines (44 loc) · 1.12 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
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
APP_RAKEFILE = File.expand_path("../test/testapp/Rakefile", __FILE__)
puts APP_RAKEFILE
load 'rails/tasks/engine.rake'
require 'rake/testtask'
task :default => :test
desc 'Runs test:units, test:functionals'
task :test do
tests_to_run = %w(test:units test:functionals)
errors = tests_to_run.collect do |task|
begin
Rake::Task[task].invoke
nil
rescue => e
task
end
end.compact
abort "Errors running #{errors * ', '}!" if errors.any?
end
namespace :test do
Rake::TestTask.new(:functionals) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = 'test/functional/**/*_test.rb'
t.verbose = true
end
Rake::TestTask.new(:units) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = 'test/unit/**/*_test.rb'
t.verbose = true
end
end
task :build do
system "gem build community_engine.gemspec"
end
task :release => :build do
system "gem push community_engine-#{CommunityEngine::Version::STRING}.gem"
end