1
0

jest.rb 704 B

1234567891011121314151617181920212223242526
  1. module Docs
  2. class Jest < UrlScraper
  3. self.type = 'simple'
  4. self.release = '23.5.0'
  5. self.base_url = 'https://jestjs.io/docs/en/'
  6. self.root_path = 'getting-started'
  7. self.links = {
  8. home: 'https://facebook.github.io/jest/',
  9. code: 'https://github.com/facebook/jest'
  10. }
  11. html_filters.push 'jest/entries', 'jest/clean_html'
  12. options[:container] = '.docMainWrapper'
  13. options[:attribution] = <<-HTML
  14. &copy; 2014&ndash;present Facebook Inc.<br>
  15. Licensed under the BSD License.
  16. HTML
  17. def get_latest_version(opts)
  18. doc = fetch_doc('https://jestjs.io/docs/en/getting-started', opts)
  19. doc.at_css('header > a > h3').content
  20. end
  21. end
  22. end