History

Update Vagrant documentation (1.8.3)

Thibaut Courouble committed 10 years ago

Commit 41d63151 parent 3146b486 files · +13 −13Browse files

Unified · Split

6 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. assets/javascripts/views/pages/simple.coffee +1 −0
  3. assets/javascripts/views/pages/vagrant.coffee +0 −5
  4. lib/docs/filters/vagrant/clean_html.rb +2 −2
  5. lib/docs/filters/vagrant/entries.rb +5 −2
  6. lib/docs/scrapers/vagrant.rb +4 −3
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -477,7 +477,7 @@ credits = [ · 476 unmodified lines
477 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'477 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'
478 ], [478 ], [
479 'Vagrant',479 'Vagrant',
480 '2010-2015 Mitchell Hashimoto',480 '2010-2016 Mitchell Hashimoto',
481 'MIT',481 'MIT',
482 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE'482 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE'
483 ], [483 ], [
assets/javascripts/views/pages/simple.coffee+1−0
@@ -36,6 +36,7 @@ app.views.SphinxSimplePage = · 35 unmodified lines
36app.views.TensorflowPage =36app.views.TensorflowPage =
37app.views.TypescriptPage =37app.views.TypescriptPage =
38app.views.UnderscorePage =38app.views.UnderscorePage =
39app.views.VagrantPage =
39app.views.VuePage =40app.views.VuePage =
40app.views.WebpackPage =41app.views.WebpackPage =
41app.views.SimplePage42app.views.SimplePage
assets/javascripts/views/pages/vagrant.coffee+0−5
@@ -1,5 +0,0 @@
1#= require views/pages/base
2
3class app.views.VagrantPage extends app.views.BasePage
4 prepare: ->
5 @highlightCode @findAll('pre.ruby'), 'ruby'
lib/docs/filters/vagrant/clean_html.rb+2−2
@@ -2,12 +2,12 @@ module Docs · 1 unmodified line
2 class Vagrant2 class Vagrant
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 @doc = at_css('.page-contents .span8')5 @doc = at_css('#main-content .bs-docs-section')
6 6
7 css('hr').remove7 css('hr').remove
8 8
9 css('pre > code').each do |node|9 css('pre > code').each do |node|
10 node.parent['class'] = node['class']10 node.parent['data-language'] = 'ruby'
11 node.before(node.children).remove11 node.before(node.children).remove
12 end12 end
13 13
lib/docs/filters/vagrant/entries.rb+5−2
@@ -12,14 +12,17 @@ module Docs · 11 unmodified lines
12 end12 end
13 13
14 def get_type14 def get_type
15 at_css('.sidebar-nav li.current').content15 type = at_css('.docs-sidenav > li.active > a').content
16 node = at_css('.docs-sidenav > li.active > ul > li.active > a + ul')
17 type << ": #{node.previous_element.content}" if node
18 type
16 end19 end
17 20
18 def additional_entries21 def additional_entries
19 case at_css('h1 + p > strong > code').try(:content)22 case at_css('h1 + p > strong > code').try(:content)
20 when /config\./23 when /config\./
21 h2 = nil24 h2 = nil
22 css('.page-contents .span8 > *').each_with_object [] do |node, entries|25 css('#main-content .bs-docs-section > *').each_with_object [] do |node, entries|
23 next if node.name == 'pre'26 next if node.name == 'pre'
24 if node.name == 'h2'27 if node.name == 'h2'
25 h2 = node.content28 h2 = node.content
lib/docs/scrapers/vagrant.rb+4−3
@@ -2,8 +2,9 @@ module Docs · 1 unmodified line
2 class Vagrant < UrlScraper2 class Vagrant < UrlScraper
3 self.name = 'Vagrant'3 self.name = 'Vagrant'
4 self.type = 'vagrant'4 self.type = 'vagrant'
5 self.release = '1.8.1'5 self.release = '1.8.3'
6 self.base_url = 'https://docs.vagrantup.com/v2/'6 self.base_url = 'https://www.vagrantup.com/docs/'
7 self.root_path = 'index.html'
7 self.links = {8 self.links = {
8 home: 'https://www.vagrantup.com/',9 home: 'https://www.vagrantup.com/',
9 code: 'https://github.com/mitchellh/vagrant'10 code: 'https://github.com/mitchellh/vagrant'
@@ -12,7 +13,7 @@ module Docs · 2 unmodified lines
12 html_filters.push 'vagrant/entries', 'vagrant/clean_html'13 html_filters.push 'vagrant/entries', 'vagrant/clean_html'
13 14
14 options[:attribution] = <<-HTML15 options[:attribution] = <<-HTML
15 &copy; 2010&ndash;2015 Mitchell Hashimoto<br>16 &copy; 2010&ndash;2016 Mitchell Hashimoto<br>
16 Licensed under the MIT License.17 Licensed under the MIT License.
17 HTML18 HTML
18 end19 end