jq.rb 698 B

123456789101112131415161718192021222324252627
  1. module Docs
  2. class Jq < UrlScraper
  3. self.name = 'jq'
  4. self.slug = 'jq'
  5. self.type = 'jq'
  6. self.release = '1.6'
  7. self.links = {
  8. home: 'https://stedolan.github.io/jq/'
  9. }
  10. self.base_url = "https://stedolan.github.io/jq/manual/v#{self.release}/index.html"
  11. html_filters.push 'jq/entries', 'jq/clean_html'
  12. options[:skip_links] = true
  13. options[:attribution] = <<-HTML
  14. &copy; 2012 Stephen Dolan<br>
  15. Licensed under the <a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>
  16. HTML
  17. def get_latest_version(opts)
  18. get_latest_github_release('stedolan', 'jq', opts).split('-')[1]
  19. end
  20. end
  21. end