1
0

salt_stack.rb 810 B

12345678910111213141516171819202122232425262728
  1. module Docs
  2. # The official documentation website is heavily rate-limited
  3. class SaltStack < FileScraper
  4. self.type = 'simple'
  5. self.slug = 'saltstack'
  6. self.release = '2019.2.0'
  7. self.base_url = 'https://docs.saltstack.com/en/latest/'
  8. self.root_path = 'ref/index.html'
  9. self.links = {
  10. home: 'https://www.saltstack.com/',
  11. code: 'https://github.com/saltstack/salt'
  12. }
  13. html_filters.push 'salt_stack/clean_html', 'salt_stack/entries'
  14. options[:only_patterns] = [/all\//]
  15. options[:container] = '.body-content > .section'
  16. options[:attribution] = <<-HTML
  17. &copy; 2019 SaltStack.<br>
  18. Licensed under the Apache License, Version 2.0.
  19. HTML
  20. def get_latest_version(opts)
  21. get_latest_github_release('saltstack', 'salt', opts)
  22. end
  23. end
  24. end