Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (26 sloc) 839 Bytes
#!/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")
test_files = `git ls-files -- {test,spec,features}/*`.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