diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 68bca363..79246985 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -477,7 +477,7 @@ credits = [ 'https://raw.githubusercontent.com/jashkenas/underscore/master/LICENSE' ], [ 'Vagrant', - '2010-2015 Mitchell Hashimoto', + '2010-2016 Mitchell Hashimoto', 'MIT', 'https://raw.githubusercontent.com/mitchellh/vagrant/master/LICENSE' ], [ diff --git a/assets/javascripts/views/pages/simple.coffee b/assets/javascripts/views/pages/simple.coffee index 1758263f..caceeb5d 100644 --- a/assets/javascripts/views/pages/simple.coffee +++ b/assets/javascripts/views/pages/simple.coffee @@ -36,6 +36,7 @@ app.views.SphinxSimplePage = app.views.TensorflowPage = app.views.TypescriptPage = app.views.UnderscorePage = +app.views.VagrantPage = app.views.VuePage = app.views.WebpackPage = app.views.SimplePage diff --git a/assets/javascripts/views/pages/vagrant.coffee b/assets/javascripts/views/pages/vagrant.coffee deleted file mode 100644 index 49540958..00000000 --- a/assets/javascripts/views/pages/vagrant.coffee +++ /dev/null @@ -1,5 +0,0 @@ -#= require views/pages/base - -class app.views.VagrantPage extends app.views.BasePage - prepare: -> - @highlightCode @findAll('pre.ruby'), 'ruby' diff --git a/lib/docs/filters/vagrant/clean_html.rb b/lib/docs/filters/vagrant/clean_html.rb index 679fa800..de2fd06d 100644 --- a/lib/docs/filters/vagrant/clean_html.rb +++ b/lib/docs/filters/vagrant/clean_html.rb @@ -2,12 +2,12 @@ module Docs class Vagrant class CleanHtmlFilter < Filter def call - @doc = at_css('.page-contents .span8') + @doc = at_css('#main-content .bs-docs-section') css('hr').remove css('pre > code').each do |node| - node.parent['class'] = node['class'] + node.parent['data-language'] = 'ruby' node.before(node.children).remove end diff --git a/lib/docs/filters/vagrant/entries.rb b/lib/docs/filters/vagrant/entries.rb index eada92a2..e72fe6fa 100644 --- a/lib/docs/filters/vagrant/entries.rb +++ b/lib/docs/filters/vagrant/entries.rb @@ -12,14 +12,17 @@ module Docs end def get_type - at_css('.sidebar-nav li.current').content + type = at_css('.docs-sidenav > li.active > a').content + node = at_css('.docs-sidenav > li.active > ul > li.active > a + ul') + type << ": #{node.previous_element.content}" if node + type end def additional_entries case at_css('h1 + p > strong > code').try(:content) when /config\./ h2 = nil - css('.page-contents .span8 > *').each_with_object [] do |node, entries| + css('#main-content .bs-docs-section > *').each_with_object [] do |node, entries| next if node.name == 'pre' if node.name == 'h2' h2 = node.content diff --git a/lib/docs/scrapers/vagrant.rb b/lib/docs/scrapers/vagrant.rb index 7a3b2e14..d6cd128e 100644 --- a/lib/docs/scrapers/vagrant.rb +++ b/lib/docs/scrapers/vagrant.rb @@ -2,8 +2,9 @@ module Docs class Vagrant < UrlScraper self.name = 'Vagrant' self.type = 'vagrant' - self.release = '1.8.1' - self.base_url = 'https://docs.vagrantup.com/v2/' + self.release = '1.8.3' + self.base_url = 'https://www.vagrantup.com/docs/' + self.root_path = 'index.html' self.links = { home: 'https://www.vagrantup.com/', code: 'https://github.com/mitchellh/vagrant' @@ -12,7 +13,7 @@ module Docs html_filters.push 'vagrant/entries', 'vagrant/clean_html' options[:attribution] = <<-HTML - © 2010–2015 Mitchell Hashimoto
+ © 2010–2016 Mitchell Hashimoto
Licensed under the MIT License. HTML end