1
0

sequelize.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module Docs
  2. class Sequelize < UrlScraper
  3. self.name = 'Sequelize'
  4. self.slug = 'sequelize'
  5. self.type = 'simple'
  6. self.links = {
  7. home: 'https://sequelize.org/',
  8. code: 'https://github.com/sequelize/sequelize'
  9. }
  10. # List of content filters (to be applied sequentially)
  11. html_filters.push 'sequelize/entries', 'sequelize/clean_html'
  12. # Skip the source files, the license page and the "Who's using Sequelize" page
  13. options[:skip_patterns] = [/\.js\.html/, /manual\/legal\.html/, /manual\/whos-using\.html/]
  14. # License information that appears appears at the bottom of the entry page
  15. options[:attribution] = <<-HTML
  16. Copyright &copy; 2014&ndash;present Sequelize contributors<br>
  17. Licensed under the MIT License.
  18. HTML
  19. version '6' do
  20. self.release = '6.5.0'
  21. self.base_url = "https://sequelize.org/master/"
  22. end
  23. version '5' do
  24. self.release = '5.22.0'
  25. self.base_url = "https://sequelize.org/v#{version}/"
  26. end
  27. version '4' do
  28. self.release = '4.44.4'
  29. self.base_url = "https://sequelize.org/v#{version}/"
  30. end
  31. # Method to fetch the most recent version of the project
  32. def get_latest_version(opts)
  33. get_npm_version('sequelize', opts)
  34. end
  35. end
  36. end