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
477477 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE'
478478 ], [
479479 'Vagrant',
480− '2010-2015 Mitchell Hashimoto',
480+ '2010-2016 Mitchell Hashimoto',
481481 'MIT',
482482 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE'
483483 ], [
assets/javascripts/views/pages/simple.coffee+1−0
@@ -36,6 +36,7 @@ app.views.SphinxSimplePage = · 35 unmodified lines
3636 app.views.TensorflowPage =
3737 app.views.TypescriptPage =
3838 app.views.UnderscorePage =
39+app.views.VagrantPage =
3940 app.views.VuePage =
4041 app.views.WebpackPage =
4142 app.views.SimplePage
assets/javascripts/views/pages/vagrant.coffee+0−5
@@ -1,5 +0,0 @@
1−#= require views/pages/base
2−
3−class 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
22 class Vagrant
33 class CleanHtmlFilter < Filter
44 def call
5− @doc = at_css('.page-contents .span8')
5+ @doc = at_css('#main-content .bs-docs-section')
66
77 css('hr').remove
88
99 css('pre > code').each do |node|
10− node.parent['class'] = node['class']
10+ node.parent['data-language'] = 'ruby'
1111 node.before(node.children).remove
1212 end
1313
lib/docs/filters/vagrant/entries.rb+5−2
@@ -12,14 +12,17 @@ module Docs · 11 unmodified lines
1212 end
1313
1414 def get_type
15− at_css('.sidebar-nav li.current').content
15+ 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
1619 end
1720
1821 def additional_entries
1922 case at_css('h1 + p > strong > code').try(:content)
2023 when /config\./
2124 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|
2326 next if node.name == 'pre'
2427 if node.name == 'h2'
2528 h2 = node.content
lib/docs/scrapers/vagrant.rb+4−3
@@ -2,8 +2,9 @@ module Docs · 1 unmodified line
22 class Vagrant < UrlScraper
33 self.name = 'Vagrant'
44 self.type = 'vagrant'
5− self.release = '1.8.1'
6− self.base_url = 'https://docs.vagrantup.com/v2/'
5+ self.release = '1.8.3'
6+ self.base_url = 'https://www.vagrantup.com/docs/'
7+ self.root_path = 'index.html'
78 self.links = {
89 home: 'https://www.vagrantup.com/',
910 code: 'https://github.com/mitchellh/vagrant'
@@ -12,7 +13,7 @@ module Docs · 2 unmodified lines
1213 html_filters.push 'vagrant/entries', 'vagrant/clean_html'
1314
1415 options[:attribution] = <<-HTML
15− &copy; 2010&ndash;2015 Mitchell Hashimoto<br>
16+ &copy; 2010&ndash;2016 Mitchell Hashimoto<br>
1617 Licensed under the MIT License.
1718 HTML
1819 end