qunit.rb 875 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # frozen_string_literal: true
  2. module Docs
  3. class Qunit < UrlScraper
  4. self.name = 'QUnit'
  5. self.type = 'qunit'
  6. self.release = '2.24.1'
  7. self.base_url = 'https://qunitjs.com/api/'
  8. self.root_path = '/'
  9. self.links = {
  10. home: 'https://qunitjs.com/',
  11. code: 'https://github.com/qunitjs/qunit'
  12. }
  13. html_filters.push 'qunit/entries', 'qunit/clean_html'
  14. options[:trailing_slash] = false
  15. options[:container] = '.main'
  16. options[:skip_patterns] = [
  17. /^QUnit$/,
  18. /^assert$/,
  19. /^callbacks$/,
  20. /^async$/,
  21. /^config$/,
  22. /^extension$/,
  23. /^deprecated$/,
  24. /^removed$/,
  25. ]
  26. options[:attribution] = <<-HTML
  27. &copy; OpenJS Foundation and contributors.<br>
  28. Licensed under the MIT license.
  29. HTML
  30. def get_latest_version(opts)
  31. get_npm_version('qunit', opts)
  32. end
  33. end
  34. end