graphite.rb 901 B

123456789101112131415161718192021222324252627
  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. home: 'https://graphiteapp.org/',
  8. code: 'https://github.com/graphite-project/graphite-web'
  9. }
  10. html_filters.push 'graphite/entries', 'graphite/clean_html'
  11. options[:container] = '.document > div'
  12. options[:skip] = %w(releases.html who-is-using.html composer.html search.html py-modindex.html genindex.html)
  13. options[:attribution] = <<-HTML
  14. &copy; 2008&ndash;2012 Chris Davis<br>
  15. &copy; 2011&ndash;2016 The Graphite Project<br>
  16. Licensed under the Apache License, Version 2.0.
  17. HTML
  18. def get_latest_version(opts)
  19. doc = fetch_doc('https://graphite.readthedocs.io/en/latest/releases.html', opts)
  20. doc.at_css('#release-notes li > a').content
  21. end
  22. end
  23. end