2019-10-12 15:55:25 +02:00
|
|
|
module Docs
|
|
|
|
class Sequelize < UrlScraper
|
2022-10-03 21:40:18 +02:00
|
|
|
include MultipleBaseUrls
|
|
|
|
|
2019-10-12 15:55:25 +02:00
|
|
|
self.name = 'Sequelize'
|
|
|
|
self.slug = 'sequelize'
|
|
|
|
self.type = 'simple'
|
|
|
|
self.links = {
|
|
|
|
home: 'https://sequelize.org/',
|
2019-10-26 03:30:48 +02:00
|
|
|
code: 'https://github.com/sequelize/sequelize'
|
2019-10-12 15:55:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# List of content filters (to be applied sequentially)
|
|
|
|
html_filters.push 'sequelize/entries', 'sequelize/clean_html'
|
|
|
|
|
2019-10-26 03:30:48 +02:00
|
|
|
# Skip the source files, the license page and the "Who's using Sequelize" page
|
|
|
|
options[:skip_patterns] = [/\.js\.html/, /manual\/legal\.html/, /manual\/whos-using\.html/]
|
2019-10-12 15:55:25 +02:00
|
|
|
|
|
|
|
# License information that appears appears at the bottom of the entry page
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
Copyright © 2014–present Sequelize contributors<br>
|
|
|
|
Licensed under the MIT License.
|
|
|
|
HTML
|
|
|
|
|
2022-10-03 21:40:18 +02:00
|
|
|
def initial_urls
|
|
|
|
[
|
|
|
|
"https://sequelize.org/docs/v6/",
|
|
|
|
"https://sequelize.org/api/v6/identifiers.html",
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2020-12-27 19:32:05 +01:00
|
|
|
version '6' do
|
2022-10-03 21:40:18 +02:00
|
|
|
self.release = '6.23.2'
|
|
|
|
self.base_url = "https://sequelize.org/docs/v6/"
|
|
|
|
self.base_urls = [
|
|
|
|
"https://sequelize.org/docs/v6/",
|
|
|
|
"https://sequelize.org/api/v6/",
|
|
|
|
]
|
2020-12-27 19:32:05 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
version '5' do
|
|
|
|
self.release = '5.22.0'
|
|
|
|
self.base_url = "https://sequelize.org/v#{version}/"
|
|
|
|
end
|
|
|
|
|
|
|
|
version '4' do
|
|
|
|
self.release = '4.44.4'
|
|
|
|
self.base_url = "https://sequelize.org/v#{version}/"
|
|
|
|
end
|
|
|
|
|
2019-10-12 15:55:25 +02:00
|
|
|
# Method to fetch the most recent version of the project
|
|
|
|
def get_latest_version(opts)
|
|
|
|
get_npm_version('sequelize', opts)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|