1
0

jest.rb 786 B

123456789101112131415161718192021222324252627282930313233343536
  1. module Docs
  2. class Jest < UrlScraper
  3. include MultipleBaseUrls
  4. self.type = 'simple'
  5. self.release = '29.0.1'
  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. /upgrading-to-/,
  19. /\d+\.[x\d]/ # avoid deprecated versions
  20. ]
  21. options[:attribution] = <<-HTML
  22. &copy; 2022 Facebook, Inc.<br>
  23. Licensed under the MIT License.
  24. HTML
  25. def get_latest_version(opts)
  26. doc = get_latest_github_release('facebook', 'jest', opts)
  27. end
  28. end
  29. end