Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

dev: add rake task to build rdoc for all 3 repos in one

  • Loading branch information...
commit bb592b2c27ec794b0170672d6c5a1eda0dde3297 1 parent cfedf22
David Chelimsky dchelimsky authored

Showing 3 changed files with 44 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 .gitignore
  2. +32 0 Rakefile
  3. +9 0 repos/.yardopts
4 .gitignore
@@ -3,9 +3,11 @@
3 3 coverage
4 4 rdoc
5 5 pkg
6   -repos
7 6 tags
8 7 .bundle
9 8 Gemfile.lock
10 9 .bundle
11 10 bin
  11 +repos/*
  12 +!repos/.gitkeep
  13 +!repos/.yardopts
32 Rakefile
@@ -180,6 +180,38 @@ task :default do
180 180 run_command 'rake'
181 181 end
182 182
  183 +namespace :doc do
  184 + desc "generate docs"
  185 + task :generate do
  186 + Dir.chdir("repos") do
  187 + sh "ln -s rspec-core/README.md RSpecCore.md" unless test ?f, "RSpecCore.md"
  188 + sh "ln -s rspec-expectations/README.md RSpecExpectations.md" unless test ?f, "RSpecExpectations.md"
  189 + sh "ln -s rspec-mocks/README.md RSpecMocks.md" unless test ?f, "RSpecMocks.md"
  190 + sh "yardoc"
  191 + sh "rm RSpecCore.md"
  192 + sh "rm RSpecExpectations.md"
  193 + sh "rm RSpecMocks.md"
  194 + end
  195 + end
  196 +
  197 + desc "clobber generated docs"
  198 + task :clobber do
  199 + Dir.chdir("repos") do
  200 + sh "rm -rf .yardoc"
  201 + sh "rm -rf doc"
  202 + end
  203 + end
  204 +
  205 + desc "publish generated docs"
  206 + task :publish do
  207 + Dir.chdir("repos") do
  208 + `rsync -av --delete doc david@davidchelimsky.net:/www/api.rspec.info`
  209 + end
  210 + end
  211 +end
  212 +
  213 +task :rdoc => ["doc:clobber", "doc:generate"]
  214 +
183 215 task :authors do
184 216 logs = Projects.inject("") do |logs, dir|
185 217 path = ReposPath.join(dir)
9 repos/.yardopts
... ... @@ -0,0 +1,9 @@
  1 +--no-private
  2 +--markup markdown
  3 +rspec-core/lib/**/*.rb
  4 +rspec-expectations/lib/**/*.rb
  5 +rspec-mocks/lib/**/*.rb
  6 +-
  7 +RSpecCore.md
  8 +RSpecExpectations.md
  9 +RSpecMocks.md

0 comments on commit bb592b2

Please sign in to comment.
Something went wrong with that request. Please try again.