joi.rb 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. module Docs
  2. class Joi < UrlScraper
  3. self.name = "Joi"
  4. self.slug = "joi"
  5. self.type = "joi"
  6. self.release = "17.9.1"
  7. self.base_url = "https://joi.dev/api/?v=#{self.release}"
  8. self.links = {
  9. home: "https://joi.dev/",
  10. code: "https://github.com/hapijs/joi",
  11. }
  12. html_filters.push "joi/entries", "joi/clean_html"
  13. options[:container] = '.markdown-wrapper'
  14. options[:title] = "Joi"
  15. options[:attribution] = <<-HTML
  16. Copyright &copy; 2012-2022, Project contributors Copyright &copy; 2012-2022, Sideway Inc Copyright &copy; 2012-2014, Walmart
  17. All rights reserved.
  18. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  19. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  20. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  21. The names of any contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
  22. HTML
  23. def get_latest_version(opts)
  24. get_npm_version("joi", opts)
  25. end
  26. private
  27. end
  28. end