History

Update Mongoose documentation (4.0.3)

Thibaut committed 11 years ago

Commit 329dfea1 parent ea542302 files · +11 −3Browse files

Showing the changes to lib (2 of 2 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/mongoose/entries.rb +6 −2
  2. lib/docs/scrapers/mongoose.rb +5 −1
lib/docs/filters/mongoose/entries.rb+6−2
@@ -22,14 +22,18 @@ module Docs · 21 unmodified lines
22 entries = []22 entries = []
23 23
24 css('h3[id]').each do |node|24 css('h3[id]').each do |node|
25 next if node['id'] == 'index_'25 id = node['id']
26 next if id == 'index_'
27
28 id.sub!('%24', '$')
29 node['id'] = id
26 30
27 name = node.content.strip31 name = node.content.strip
28 name.sub! %r{\(.+\)}, '()'32 name.sub! %r{\(.+\)}, '()'
29 next if name.include?(' ')33 next if name.include?(' ')
30 34
31 type = name.split(/[#\.\(]/).first35 type = name.split(/[#\.\(]/).first
32 entries << [name, node['id'], type]36 entries << [name, id, type]
33 end37 end
34 38
35 entries39 entries
lib/docs/scrapers/mongoose.rb+5−1
@@ -2,10 +2,14 @@ module Docs · 1 unmodified line
2 class Mongoose < UrlScraper2 class Mongoose < UrlScraper
3 self.name = 'Mongoose'3 self.name = 'Mongoose'
4 self.type = 'mongoose'4 self.type = 'mongoose'
5 self.version = '3.8.19'5 self.version = '4.0.3'
6 self.base_url = 'http://mongoosejs.com/docs/'6 self.base_url = 'http://mongoosejs.com/docs/'
7 self.root_path = 'index.html'7 self.root_path = 'index.html'
8 self.initial_paths = %w(guide.html api.html)8 self.initial_paths = %w(guide.html api.html)
9 self.links = {
10 home: 'http://mongoosejs.com/',
11 code: 'https://github.com/Automattic/mongoose'
12 }
9 13
10 html_filters.push 'mongoose/clean_html', 'mongoose/entries'14 html_filters.push 'mongoose/clean_html', 'mongoose/entries'
11 15