1
0

fish.rb 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module Docs
  2. class Fish < UrlScraper
  3. self.name = 'Fish'
  4. self.type = 'simple'
  5. self.root_path = 'index.html'
  6. self.links = {
  7. home: 'https://fishshell.com/',
  8. code: 'https://github.com/fish-shell/fish-shell'
  9. }
  10. html_filters.push 'fish/clean_html', 'fish/entries'
  11. options[:skip] = %w(design.html license.html)
  12. # https://fishshell.com/docs/current/license.html
  13. options[:attribution] = <<-HTML
  14. &copy; 2005&ndash;2009 Axel Liljencrantz<br>
  15. Licensed under the GNU General Public License, version 2.
  16. HTML
  17. version '3.0' do
  18. self.release = '3.0.1'
  19. self.base_url = "https://fishshell.com/docs/#{version}/"
  20. end
  21. version '2.7' do
  22. self.release = '2.7.1'
  23. self.base_url = "https://fishshell.com/docs/#{version}/"
  24. end
  25. version '2.6' do
  26. self.release = '2.6.0'
  27. self.base_url = "https://fishshell.com/docs/#{version}/"
  28. end
  29. version '2.5' do
  30. self.release = '2.5.0'
  31. self.base_url = "https://fishshell.com/docs/#{version}/"
  32. end
  33. version '2.4' do
  34. self.release = '2.4.0'
  35. self.base_url = "https://fishshell.com/docs/#{version}/"
  36. end
  37. version '2.3' do
  38. self.release = '2.3.1'
  39. self.base_url = "https://fishshell.com/docs/#{version}/"
  40. end
  41. version '2.2' do
  42. self.release = '2.2.0'
  43. self.base_url = "https://fishshell.com/docs/#{version}/"
  44. end
  45. def get_latest_version(opts)
  46. get_latest_github_release('fish-shell', 'fish-shell', opts)
  47. end
  48. end
  49. end