Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e72d0a18bf
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (49 sloc) 1.688 kb
require 'rubygems'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rcov/rcovtask'
task :default => :test
desc "Run All Tests" :test do |test|
test.test_files = ["test/**/*.rb"]
test.verbose = true
desc "Generate Documentation" do |rdoc|
rdoc.main = "README.rdoc"
rdoc.rdoc_dir = "doc"
rdoc.rdoc_files.include("README.rdoc", "CHANGELOG", "LICENSE.txt", "lib/*.rb")
rdoc.title = "FakeWeb API Documentation"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.options << '--charset' << 'utf-8'
end do |t|
t.test_files = FileList['test/**/test*.rb']
t.rcov_opts << "--sort coverage"
t.rcov_opts << "--exclude gems"
t.rcov_opts << "--no-validator-links"
desc %{Update ".manifest" with the latest list of project filenames. Respect\
.gitignore by excluding everything that git ignores. Update `files` and\
`test_files` arrays in "*.gemspec" file if it's present.}
task :manifest do
list = Dir['**/*'].sort
spec_file = Dir['*.gemspec'].first
list -= [spec_file] if spec_file'.gitignore').each_line do |glob|
glob = glob.chomp.sub(/^\//, '')
list -= Dir[glob]
list -= Dir["#{glob}/**/*"] if and !File.symlink?(glob)
puts "excluding #{glob}"
if spec_file
spec = spec_file
spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
assignment = $1
bunch = $2 ? list.grep(/^test\//) : list
'%s%%w(%s)' % [assignment, bunch.join(' ')]
end, 'w') {|f| f << spec }
end'.manifest', 'w') {|f| f << list.join("\n") }
Jump to Line
Something went wrong with that request. Please try again.