Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add YARD task for generating documentation

  • Loading branch information...
commit 56b542290126c7002078a4e7b972b623550742fa 1 parent 6fa421b
@Burgestrand Burgestrand authored
Showing with 20 additions and 0 deletions.
  1. +3 −0  Gemfile
  2. +17 −0 Rakefile
View
3  Gemfile
@@ -1,3 +1,6 @@
source "https://rubygems.org"
gemspec
+
+gem "yard"
+gem "redcarpet" # required by YARD
View
17 Rakefile
@@ -4,6 +4,23 @@ rescue LoadError
# Only gem pushers need bundler tasks.
end
+begin
+ require "yard"
+ YARD::Rake::YardocTask.new("yard:doc") do |task|
+ task.options = ["--no-stats"]
+ end
+
+ desc "List YARD stats, as well as undocumented methods"
+ task "yard:stats" do
+ YARD::CLI::Stats.run("--list-undoc")
+ end
+
+ task "Generate documentation and show stats"
+ task :yard => ["yard:doc", "yard:stats"]
+rescue LoadError
+ puts "WARN: YARD not available. You may install documentation dependencies via bundler."
+end
+
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new("spec") do |task|
task.ruby_opts = "-W2"
Please sign in to comment.
Something went wrong with that request. Please try again.