History

Update Marionette.js documentation (3.0.0, 2.4.7)

Thibaut Courouble committed 10 years ago

Commit c2dcd3d1 parent 29adb503 files · +15 −4Browse files

Unified · Split

3 files
  1. lib/docs/filters/marionette/clean_html.rb +1 −1
  2. lib/docs/filters/marionette/entries.rb +4 −1
  3. lib/docs/scrapers/marionette.rb +10 −2
lib/docs/filters/marionette/clean_html.rb+1−1
@@ -15,7 +15,7 @@ module Docs · 14 unmodified lines
1515 css('#source + h2', '#improve', '#source', '.glyphicon', 'p > br').remove
1616
1717 css('pre > code').each do |node|
18− node.parent['data-language'] = node['class'][/lang-(\w+)/, 1]
18+ node.parent['data-language'] = node['class'][/lang-(\w+)/, 1] if node['class']
1919 node.before(node.children).remove
2020 end
2121
lib/docs/filters/marionette/entries.rb+4−1
@@ -9,7 +9,10 @@ module Docs · 8 unmodified lines
99 end
1010
1111 def get_type
12− name
12+ type = name.dup
13+ type = 'CollectionView' if type.include?('CollectionView')
14+ type = 'Miscellaneous' if %w(Features Installing\ Marionette Upgrade\ Guide Common\ Concepts).include?(type)
15+ type
1316 end
1417
1518 def additional_entries
lib/docs/scrapers/marionette.rb+10−2
@@ -3,8 +3,6 @@ module Docs · 2 unmodified lines
33 self.name = 'Marionette.js'
44 self.slug = 'marionette'
55 self.type = 'marionette'
6− self.release = '2.4.7'
7− self.base_url = "http://marionettejs.com/docs/v#{release}/"
86 self.root_path = 'index'
97 self.links = {
108 home: 'http://marionettejs.com/',
@@ -19,5 +17,15 @@ module Docs · 8 unmodified lines
1917 &copy; 2016 Muted Solutions, LLC<br>
2018 Licensed under the MIT License.
2119 HTML
20+
21+ version '3' do
22+ self.release = '3.0.0'
23+ self.base_url = "http://marionettejs.com/docs/v#{release}/"
24+ end
25+
26+ version '2' do
27+ self.release = '2.4.7'
28+ self.base_url = "http://marionettejs.com/docs/v#{release}/"
29+ end
2230 end
2331 end