1
0

padrino.rb 872 B

12345678910111213141516171819202122232425262728293031
  1. module Docs
  2. class Padrino < UrlScraper
  3. self.slug = 'padrino'
  4. self.type = 'rubydoc'
  5. self.release = '0.14.4'
  6. self.base_url = 'https://www.rubydoc.info/github/padrino/padrino-framework/'
  7. self.root_path = 'file/README.rdoc'
  8. self.initial_paths = %w(index2)
  9. self.links = {
  10. home: 'http://padrinorb.com/',
  11. code: 'https://github.com/padrino/padrino-framework'
  12. }
  13. html_filters.push 'padrino/clean_html', 'padrino/entries'
  14. options[:container] = ->(filter) { filter.root_page? ? '#filecontents' : '#content' }
  15. options[:attribution] = <<-HTML
  16. &copy; 2010&ndash;2019 Padrino<br>
  17. Licensed under the MIT License.
  18. HTML
  19. stub 'index2' do
  20. request_one(url_for('index')).body
  21. end
  22. def get_latest_version(opts)
  23. get_github_tags('padrino', 'padrino-framework', opts)[0]['name']
  24. end
  25. end
  26. end