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
2222 entries = []
2323
2424 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
2630
2731 name = node.content.strip
2832 name.sub! %r{\(.+\)}, '()'
2933 next if name.include?(' ')
3034
3135 type = name.split(/[#\.\(]/).first
32− entries << [name, node['id'], type]
36+ entries << [name, id, type]
3337 end
3438
3539 entries
lib/docs/scrapers/mongoose.rb+5−1
@@ -2,10 +2,14 @@ module Docs · 1 unmodified line
22 class Mongoose < UrlScraper
33 self.name = 'Mongoose'
44 self.type = 'mongoose'
5− self.version = '3.8.19'
5+ self.version = '4.0.3'
66 self.base_url = 'http://mongoosejs.com/docs/'
77 self.root_path = 'index.html'
88 self.initial_paths = %w(guide.html api.html)
9+ self.links = {
10+ home: 'http://mongoosejs.com/',
11+ code: 'https://github.com/Automattic/mongoose'
12+ }
913
1014 html_filters.push 'mongoose/clean_html', 'mongoose/entries'
1115