History

Update Chef documentation (12.9, 11.18)

Thibaut Courouble committed 10 years ago

Commit 265f1621 parent 6239ead6 files · +8 −40Browse files

Unified · Split

6 files
  1. assets/javascripts/views/pages/simple.coffee +1 −0
  2. assets/javascripts/views/pages/sphinx_simple.coffee +0 −7
  3. lib/docs/filters/chef/clean_html.rb +2 −1
  4. lib/docs/filters/opentsdb/clean_html.rb +1 −0
  5. lib/docs/scrapers/chef.rb +4 −4
  6. lib/docs/scrapers/chefclient.rb +0 −28
assets/javascripts/views/pages/simple.coffee+1−0
@@ -18,6 +18,7 @@ app.views.PostgresPage = · 17 unmodified lines
1818 app.views.RamdaPage =
1919 app.views.ReactPage =
2020 app.views.RethinkdbPage =
21+app.views.SphinxSimplePage =
2122 app.views.TensorflowPage =
2223 app.views.TypescriptPage =
2324 app.views.UnderscorePage =
assets/javascripts/views/pages/sphinx_simple.coffee+0−7
@@ -1,7 +0,0 @@
1−#= require views/pages/base
2−
3−class app.views.SphinxSimplePage extends app.views.BasePage
4− prepare: ->
5− @highlightCode @findAll('pre.highlight-ruby'), 'ruby'
6− @highlightCode @findAll('pre.highlight-javascript'), 'javascript'
7− return
lib/docs/filters/chef/clean_html.rb+2−1
@@ -24,9 +24,10 @@ module Docs · 23 unmodified lines
2424 node.remove_attribute('border')
2525 end
2626
27− css('div[class^="highlight-"]').each do |node|
27+ css('div[class*="highlight-"]').each do |node|
2828 node.content = node.content.strip
2929 node.name = 'pre'
30+ node['data-language'] = node['class'][/highlight\-(\w+)/, 1]
3031 end
3132
3233 doc
lib/docs/filters/opentsdb/clean_html.rb+1−0
@@ -14,6 +14,7 @@ module Docs · 13 unmodified lines
1414 end
1515
1616 css('div[class*=highlight] .highlight pre').each do |node|
17+ node['data-language'] = node.parent.parent['class'][/highlight\-(\w+)/, 1]
1718 node.parent.parent.before(node)
1819 node.content = node.content.gsub(' ', ' ')
1920 end
lib/docs/scrapers/chef.rb+4−4
@@ -24,10 +24,10 @@ module Docs · 23 unmodified lines
2424 HTML
2525
2626 version '12' do
27− self.release = '12.7'
27+ self.release = '12.9'
2828
29− options[:client_path] = client_path = '12-7'
30− options[:server_path] = server_path = 'server_12-4'
29+ options[:client_path] = client_path = '12-9'
30+ options[:server_path] = server_path = 'server_12-5'
3131
3232 self.root_path = "#{client_path}/chef_overview.html"
3333 self.initial_paths = ["#{server_path}/server_components.html"]
@@ -39,7 +39,7 @@ module Docs · 5 unmodified lines
3939 self.release = '11.18'
4040
4141 options[:client_path] = client_path = '11-18'
42− options[:server_path] = server_path = 'server_12-4'
42+ options[:server_path] = server_path = 'server_12-5'
4343
4444 self.root_path = "#{client_path}/chef_overview.html"
4545 self.initial_paths = ["#{server_path}/server_components.html"]
lib/docs/scrapers/chefclient.rb+0−28
@@ -1,28 +0,0 @@
1−module Docs
2− class Chefclient < UrlScraper
3− self.name = 'Chef Client'
4− self.slug = 'chefclient'
5− self.type = 'chefclient'
6− self.version = '12.5'
7− self.base_url = "https://docs.chef.io/release/#{version.sub '.', '-'}/"
8− self.links = {
9− home: 'https://www.chef.io/',
10− docs: 'https://docs.chef.io/'
11− }
12−
13− html_filters.push 'chefclient/entries', 'chefclient/clean_html'
14−
15− options[:fix_urls] = ->(url) do
16− url.remove! %r{/release/[0-9\-+]/}
17− url
18− end
19−
20− options[:skip_patterns] = [/_images\//]
21− options[:trailing_slash] = false
22−
23− options[:attribution] = <<-HTML
24− &copy; 2015 Chef Software, Inc.<br>
25− Creative Commons Attribution 3.0 Unported License.
26− HTML
27− end
28−end