Use yard/rspec Rake tasks

This commit is contained in:
Rémi Prévost 2012-03-05 16:05:21 -05:00
parent b083bddeeb
commit 9ad83268ee
3 changed files with 25 additions and 21 deletions

View File

@ -1,13 +0,0 @@
--title "Teamocil"
--no-cache
--protected
--no-private
--markup "markdown"
--markup-provider "maruku"
--format html
"README.mkd"
"lib/**/*.rb"

View File

@ -1,7 +1,7 @@
PATH
remote: .
specs:
teamocil (0.3.1)
teamocil (0.3.2)
GEM
remote: http://rubygems.org/
@ -19,7 +19,7 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
syntax (1.0.0)
yard (0.7.2)
yard (0.7.5)
PLATFORMS
ruby

View File

@ -1,11 +1,28 @@
require "bundler"
Bundler.require(:development)
require "bundler/gem_tasks"
require "rspec/core/rake_task"
desc "Run specs"
task :spec do # {{{
sh "bundle exec rspec --color --format=nested #{Dir.glob(File.join(File.dirname(__FILE__), "spec/**/*_spec.rb")).join(" ")}"
task :default => :spec
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |task| # {{{
task.pattern = "spec/**/*_spec.rb"
task.rspec_opts = "--colour --format=documentation"
end # }}}
desc "Generate documentation"
task :doc do # {{{
sh "bundle exec yard doc"
desc "Generate YARD Documentation"
YARD::Rake::YardocTask.new do |task| # {{{
task.options = [
"-o", File.expand_path("../doc", __FILE__),
"--readme=README.md",
"--markup=markdown",
"--markup-provider=maruku",
"--no-private",
"--no-cache",
"--protected",
"--title=Teamocil",
]
task.files = ["lib/**/*.rb"]
end # }}}