graphite.rb 861 B

1234567891011121314151617181920212223242526
  1. module Docs
  2. class Graphite < UrlScraper
  3. self.type = 'graphite'
  4. self.release = '1.1.4'
  5. self.base_url = 'https://graphite.readthedocs.io/en/latest/'
  6. self.links = {
  7. code: 'https://github.com/graphite-project/graphite-web'
  8. }
  9. html_filters.push 'graphite/entries', 'graphite/clean_html'
  10. options[:container] = '.document > div'
  11. options[:skip] = %w(releases.html who-is-using.html composer.html search.html py-modindex.html genindex.html)
  12. options[:attribution] = <<-HTML
  13. &copy; 2008&ndash;2012 Chris Davis<br>
  14. &copy; 2011&ndash;2016 The Graphite Project<br>
  15. Licensed under the Apache License, Version 2.0.
  16. HTML
  17. def get_latest_version(opts)
  18. doc = fetch_doc('https://graphite.readthedocs.io/en/latest/releases.html', opts)
  19. doc.at_css('#release-notes li > a').content
  20. end
  21. end
  22. end