forked from rails/rails-perftest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (29 loc) · 895 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
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'rake/testtask'
namespace :test do
Rake::TestTask.new("regular") do |t|
t.libs = ["test"]
t.pattern = "test/*_test.rb"
t.ruby_opts = ['-w']
end
Rake::TestTask.new("generators") do |t|
t.libs = ["test"]
t.pattern = "test/generators/*_test.rb"
t.ruby_opts = ['-w']
end
end
task :test => ['test:regular', 'test:generators']
task :default => :test
specname = "rails-perftest.gemspec"
deps = `git ls-files`.split("\n") - [specname]
file specname => deps do
files = `git ls-files`.split("\n")
test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
executables = `git ls-files -- exe/*`.split("\n").map{ |f| File.basename(f) }
require 'erb'
File.open specname, 'w:utf-8' do |f|
f.write ERB.new(File.read("#{specname}.erb")).result(binding)
end
end
task :build => specname