zig.rb 586 B

123456789101112131415161718192021222324
  1. module Docs
  2. class Zig < UrlScraper
  3. self.name = 'Zig'
  4. self.type = 'simple'
  5. self.release = '0.9.0'
  6. self.base_url = 'https://ziglang.org/documentation/0.9.0/'
  7. self.links = {
  8. home: 'https://ziglang.org/',
  9. code: 'https://github.com/ziglang/zig'
  10. }
  11. html_filters.push 'zig/entries', 'zig/clean_html'
  12. options[:follow_links] = false
  13. options[:attribution] = <<-HTML
  14. &copy; 2015–2021, Zig contributors
  15. HTML
  16. def get_latest_version(opts)
  17. tags = get_github_tags('ziglang', 'zig', opts)
  18. tags[0]['name']
  19. end
  20. end
  21. end