forked from rails/rails-observers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
33 lines (25 loc) · 770 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
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'rake/testtask'
Rake::TestTask.new("test:regular") do |t|
t.libs = ["test"]
t.pattern = "test/*_test.rb"
t.ruby_opts = ['-w']
end
Rake::TestTask.new("test:generators") do |t|
t.libs = ["test"]
t.pattern = "test/generators/*_test.rb"
t.ruby_opts = ['-w']
end
task :default => :test
task :test => ['test:regular', 'test:generators']
specname = "rails-observers.gemspec"
deps = `git ls-files`.split("\n") - [specname]
file specname => deps do
files = `git ls-files`.split("\n")
executables = `git ls-files -- bin/*`.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