|
|
@@ -1,20 +1,16 @@
|
|
|
module Docs
|
|
|
class Chef < UrlScraper
|
|
|
self.type = 'sphinx_simple'
|
|
|
- self.base_url = 'https://docs-archive.chef.io/release/'
|
|
|
+ self.base_url = 'https://docs.chef.io'
|
|
|
self.links = {
|
|
|
home: 'https://www.chef.io/',
|
|
|
code: 'https://github.com/chef/chef'
|
|
|
}
|
|
|
|
|
|
- html_filters.push 'chef/entries', 'chef/clean_html'
|
|
|
-
|
|
|
options[:skip_patterns] = [
|
|
|
- /\A[^\/]+\/\z/,
|
|
|
- /\A[^\/]+\/index\.html\z/,
|
|
|
- /\A[^\/]+\/release_notes\.html\z/,
|
|
|
- /\Aserver[^\/]+\/chef_overview\.html\z/,
|
|
|
- /\A[\d\-]+\/server_components\.html\z/ ]
|
|
|
+ /release_notes/,
|
|
|
+ /feedback/
|
|
|
+ ]
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
© Chef Software, Inc.<br>
|
|
|
@@ -24,12 +20,38 @@ module Docs
|
|
|
We are not affiliated with, endorsed or sponsored by Chef Inc.
|
|
|
HTML
|
|
|
|
|
|
+ version '16' do
|
|
|
+ self.release = '16.7.61'
|
|
|
+
|
|
|
+ options[:container] = '.off-canvas-wrapper'
|
|
|
+
|
|
|
+ options[:skip] = [
|
|
|
+ '/automate/api/',
|
|
|
+ '/habitat/supervisor_api/',
|
|
|
+ '/habitat/builder_api/'
|
|
|
+ ]
|
|
|
+
|
|
|
+ html_filters.push 'chef/entries', 'chef/clean_html'
|
|
|
+
|
|
|
+ end
|
|
|
+
|
|
|
version '12' do
|
|
|
self.release = '12.13'
|
|
|
+ self.base_url = 'https://docs-archive.chef.io/release/'
|
|
|
+
|
|
|
+ html_filters.push 'chef/entries_old', 'chef/clean_html_old'
|
|
|
|
|
|
options[:client_path] = client_path = '12-13'
|
|
|
options[:server_path] = server_path = 'server_12-8'
|
|
|
|
|
|
+ options[:skip_patterns] = [
|
|
|
+ /\A[^\/]+\/\z/,
|
|
|
+ /\A[^\/]+\/index\.html\z/,
|
|
|
+ /\A[^\/]+\/release_notes\.html\z/,
|
|
|
+ /\Aserver[^\/]+\/chef_overview\.html\z/,
|
|
|
+ /\A[\d\-]+\/server_components\.html\z/
|
|
|
+ ]
|
|
|
+
|
|
|
self.root_path = "#{client_path}/chef_overview.html"
|
|
|
self.initial_paths = ["#{server_path}/server_components.html"]
|
|
|
|
|
|
@@ -38,10 +60,21 @@ module Docs
|
|
|
|
|
|
version '11' do
|
|
|
self.release = '11.18'
|
|
|
+ self.base_url = 'https://docs-archive.chef.io/release/'
|
|
|
+
|
|
|
+ html_filters.push 'chef/entries_old', 'chef/clean_html_old'
|
|
|
|
|
|
options[:client_path] = client_path = '11-18'
|
|
|
options[:server_path] = server_path = 'server_12-8'
|
|
|
|
|
|
+ options[:skip_patterns] = [
|
|
|
+ /\A[^\/]+\/\z/,
|
|
|
+ /\A[^\/]+\/index\.html\z/,
|
|
|
+ /\A[^\/]+\/release_notes\.html\z/,
|
|
|
+ /\Aserver[^\/]+\/chef_overview\.html\z/,
|
|
|
+ /\A[\d\-]+\/server_components\.html\z/
|
|
|
+ ]
|
|
|
+
|
|
|
self.root_path = "#{client_path}/chef_overview.html"
|
|
|
self.initial_paths = ["#{server_path}/server_components.html"]
|
|
|
|
|
|
@@ -52,5 +85,6 @@ module Docs
|
|
|
doc = fetch_doc('https://downloads.chef.io/products/infra', opts)
|
|
|
doc.at_css('#versions > option').content.strip
|
|
|
end
|
|
|
+
|
|
|
end
|
|
|
end
|