devdocs/lib/docs/scrapers/padrino.rb
2016-06-05 18:37:37 -04:00

27 lines
758 B
Ruby

module Docs
class Padrino < UrlScraper
self.slug = 'padrino'
self.type = 'rubydoc'
self.release = '0.13.2'
self.base_url = 'http://www.rubydoc.info/github/padrino/padrino-framework/'
self.root_path = 'file/README.rdoc'
self.initial_paths = %w(index2)
self.links = {
home: 'http://padrinorb.com/',
code: 'https://github.com/padrino/padrino-framework'
}
html_filters.push 'padrino/clean_html', 'padrino/entries'
options[:container] = ->(filter) { filter.root_page? ? '#filecontents' : '#content' }
options[:attribution] = <<-HTML
&copy; 2010&ndash;2016 Padrino<br>
Licensed under the MIT License.
HTML
stub 'index2' do
request_one(url_for('index')).body
end
end
end