jest.rb 763 B

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class Jest < UrlScraper
  3. include MultipleBaseUrls
  4. self.type = 'simple'
  5. self.release = '28.0.3'
  6. self.base_urls = [
  7. 'https://jestjs.io/docs/',
  8. 'https://jestjs.io/docs/expect'
  9. ]
  10. self.root_path = 'getting-started'
  11. self.links = {
  12. home: 'https://jestjs.io/',
  13. code: 'https://github.com/facebook/jest'
  14. }
  15. html_filters.push 'jest/entries', 'jest/clean_html'
  16. options[:skip_patterns] = [
  17. /^next/,
  18. /\d+\.[x\d]/ # avoid deprecated versions
  19. ]
  20. options[:attribution] = <<-HTML
  21. &copy; 2022 Facebook, Inc.<br>
  22. Licensed under the MIT License.
  23. HTML
  24. def get_latest_version(opts)
  25. doc = get_latest_github_release('facebook', 'jest', opts)
  26. end
  27. end
  28. end