Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (42 sloc) 1.22 kb
require 'rubygems'
require 'bundler'
Bundler.setup :default, :test, :development
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
end
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
task :spec
task :default => :spec
begin
require 'yard'
YARD_OPTS = ['-m', 'markdown', '-M', 'maruku']
DOC_FILES = ['lib/**/*.rb', 'README.markdown']
YARD::Rake::YardocTask.new(:doc) do |t|
t.files = DOC_FILES
t.options = YARD_OPTS
end
namespace :doc do
YARD::Rake::YardocTask.new(:pages) do |t|
t.files = DOC_FILES
t.options = YARD_OPTS + ['-o', '../grape.doc']
end
namespace :pages do
desc 'Generate and publish YARD docs to GitHub pages.'
task :publish => ['doc:pages'] do
Dir.chdir(File.dirname(__FILE__) + '/../grape.doc') do
system("git add .")
system("git add -u")
system("git commit -m 'Generating docs for version #{version}.'")
system("git push origin gh-pages")
end
end
end
end
rescue LoadError
puts "You need to install YARD."
end
Jump to Line
Something went wrong with that request. Please try again.