Skip to content

Commit

Permalink
Make "rake test" and "rake rdoc" work.
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Mar 17, 2013
1 parent a8e5557 commit e7b7272
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"

gemspec = Bundler::GemHelper.gemspec

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
test.test_files = gemspec.test_files
test.verbose = true
end

require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "#{gemspec.name} #{gemspec.version}"
rdoc.rdoc_files.include(gemspec.extra_rdoc_files)
rdoc.rdoc_files.include('lib/**/*.rb')
end

task :default => :test
2 changes: 1 addition & 1 deletion unf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ to Ruby/JRuby.

gem.files = `git ls-files`.split("\n")
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.test_files = gem.files.grep(%r{^(test|spec|features)/.*\.rb})
gem.name = "unf"
gem.require_paths = ["lib"]
gem.version = UNF::VERSION
Expand Down

0 comments on commit e7b7272

Please sign in to comment.