1
0

chai.rb 815 B

12345678910111213141516171819202122232425262728293031
  1. module Docs
  2. class Chai < UrlScraper
  3. self.name = 'Chai'
  4. self.type = 'simple'
  5. self.release = '4.2.0'
  6. self.base_url = 'https://www.chaijs.com'
  7. self.root_path = '/api/'
  8. self.initial_paths = %w(/guide/installation/)
  9. self.links = {
  10. home: 'https://www.chaijs.com/',
  11. code: 'https://github.com/chaijs/chai'
  12. }
  13. html_filters.push 'chai/entries', 'chai/clean_html'
  14. options[:container] = '#content'
  15. options[:trailing_slash] = true
  16. options[:only_patterns] = [/\A\/guide/, /\A\/api/]
  17. options[:skip] = %w(/api/test/ /guide/ /guide/resources/)
  18. options[:attribution] = <<-HTML
  19. &copy; 2017 Chai.js Assertion Library<br>
  20. Licensed under the MIT License.
  21. HTML
  22. def get_latest_version(opts)
  23. get_npm_version('chai', opts)
  24. end
  25. end
  26. end