Skip to content

Commit

Permalink
dev: add rake task to build rdoc for all 3 repos in one
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Nov 24, 2011
1 parent cfedf22 commit bb592b2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
coverage
rdoc
pkg
repos
tags
.bundle
Gemfile.lock
.bundle
bin
repos/*
!repos/.gitkeep
!repos/.yardopts
32 changes: 32 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,38 @@ task :default do
run_command 'rake'
end

namespace :doc do
desc "generate docs"
task :generate do
Dir.chdir("repos") do
sh "ln -s rspec-core/README.md RSpecCore.md" unless test ?f, "RSpecCore.md"
sh "ln -s rspec-expectations/README.md RSpecExpectations.md" unless test ?f, "RSpecExpectations.md"
sh "ln -s rspec-mocks/README.md RSpecMocks.md" unless test ?f, "RSpecMocks.md"
sh "yardoc"
sh "rm RSpecCore.md"
sh "rm RSpecExpectations.md"
sh "rm RSpecMocks.md"
end
end

desc "clobber generated docs"
task :clobber do
Dir.chdir("repos") do
sh "rm -rf .yardoc"
sh "rm -rf doc"
end
end

desc "publish generated docs"
task :publish do
Dir.chdir("repos") do
`rsync -av --delete doc david@davidchelimsky.net:/www/api.rspec.info`
end
end
end

task :rdoc => ["doc:clobber", "doc:generate"]

task :authors do
logs = Projects.inject("") do |logs, dir|
path = ReposPath.join(dir)
Expand Down
9 changes: 9 additions & 0 deletions repos/.yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--no-private
--markup markdown
rspec-core/lib/**/*.rb
rspec-expectations/lib/**/*.rb
rspec-mocks/lib/**/*.rb
-
RSpecCore.md
RSpecExpectations.md
RSpecMocks.md

0 comments on commit bb592b2

Please sign in to comment.