Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Add link for documentation published by rubygems in README
- Remove rake task to generate YARD docs
  • Loading branch information
ramkumar-kr committed Oct 5, 2017
1 parent 5808de3 commit 025c413
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 44 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ The current stable release is [1.0.1](https://github.com/ruby-grape/grape/blob/v
## Project Resources

* [Grape Website](http://www.ruby-grape.org)
* [Documentation](http://www.rubydoc.info/gems/grape)
* Need help? Try [Grape Google Group](http://groups.google.com/group/ruby-grape) or [Gitter](https://gitter.im/ruby-grape/grape)
* [Follow us on Twitter](https://twitter.com/grapeframework)

Expand Down
44 changes: 0 additions & 44 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 git@github.com: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

0 comments on commit 025c413

Please sign in to comment.