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

View File

@ -1,11 +1,28 @@
require "bundler"
Bundler.require(:development)
require "bundler/gem_tasks" require "bundler/gem_tasks"
require "rspec/core/rake_task"
desc "Run specs" task :default => :spec
task :spec do # {{{
sh "bundle exec rspec --color --format=nested #{Dir.glob(File.join(File.dirname(__FILE__), "spec/**/*_spec.rb")).join(" ")}" desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |task| # {{{
task.pattern = "spec/**/*_spec.rb"
task.rspec_opts = "--colour --format=documentation"
end # }}} end # }}}
desc "Generate documentation" desc "Generate YARD Documentation"
task :doc do # {{{ YARD::Rake::YardocTask.new do |task| # {{{
sh "bundle exec yard doc" 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 # }}} end # }}}