Permalink
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (23 sloc) 648 Bytes
recipe :ignore
ignore(/^(html|tmp|support)/)
recipe :ruby
class Kicker::Recipes::Ruby
def self.is_test_file?(path)
path if File.exist?(File.expand_path("../#{path}", __FILE__))
end
end
process do |files|
if files.any? { |file| file.start_with?('lib') || file == 'README.rdoc' }
log "Updating documentation in the background"
system "rake documentation:generate &> /dev/null &"
end
end
process do |files|
Kicker::Recipes::Ruby.run_tests(files.take_and_map do |file|
case file
when %r{^lib/(.+)\.rb$}
path = $1.gsub('/', '_')
Kicker::Recipes::Ruby.is_test_file?("test/#{path}_test.rb")
end
end)
end