-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1688 from ramkumar-kr/publish_docs
Fixes #1090
- Loading branch information
Showing
14 changed files
with
2 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,6 @@ pkg | |
.ruby-version | ||
.ruby-gemset | ||
.bundle | ||
.yardoc/* | ||
.byebug_history | ||
dist | ||
Gemfile.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,47 +24,3 @@ RuboCop::RakeTask.new | |
|
||
task default: [:rubocop, :spec] | ||
|
||
begin | ||
require 'yard' | ||
DOC_FILES = ['lib/**/*.rb', 'README.md'].freeze | ||
|
||
YARD::Rake::YardocTask.new(:doc) do |t| | ||
t.files = DOC_FILES | ||
end | ||
|
||
namespace :doc do | ||
YARD::Rake::YardocTask.new(:pages) do |t| | ||
t.files = DOC_FILES | ||
t.options = ['-o', '../grape.doc/docs'] | ||
end | ||
|
||
namespace :pages do | ||
desc 'Check out gh-pages.' | ||
task :checkout do | ||
dir = File.dirname(__FILE__) + '/../grape.doc' | ||
unless Dir.exist?(dir) | ||
Dir.mkdir(dir) | ||
Dir.chdir(dir) do | ||
system('git init') | ||
system('git remote add origin [email protected]:ruby-grape/grape.git') | ||
system('git pull') | ||
system('git checkout gh-pages') | ||
end | ||
end | ||
end | ||
|
||
desc 'Generate and publish YARD docs to GitHub pages.' | ||
task publish: ['doc:pages:checkout', 'doc:pages'] do | ||
Dir.chdir(File.dirname(__FILE__) + '/../grape.doc') do | ||
system('git checkout gh-pages') | ||
system('git add .') | ||
system('git add -u') | ||
system("git commit -m 'Generating docs for version #{Grape::VERSION}.'") | ||
system('git push origin gh-pages') | ||
end | ||
end | ||
end | ||
end | ||
rescue LoadError # rubocop:disable Lint/HandleExceptions | ||
# ignore | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters