History

Finish Koa scraper

Thibaut Courouble committed 8 years ago

Commit ad7be4d1 parent b97cfa68 files · +8 −3Browse files

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

Unified · Split

2 files
  1. lib/docs/filters/koa/entries.rb +1 −1
  2. lib/docs/scrapers/koa.rb +2 −2
lib/docs/filters/koa/entries.rb+1−1
@@ -15,7 +15,7 @@ module Docs · 14 unmodified lines
15 (slug.include?('index') && !node.content.include?('.'))15 (slug.include?('index') && !node.content.include?('.'))
16 end16 end
17 .map do |node|17 .map do |node|
18 name = node.content.sub(/\(.*\)$/, '')18 name = node.content.strip.sub(/\(.*\)\z/, '()')
19 type = 'API' if type == @root_type && name.include?('.')19 type = 'API' if type == @root_type && name.include?('.')
20 [name, node['id'], type]20 [name, node['id'], type]
21 end21 end
lib/docs/scrapers/koa.rb+2−2
@@ -3,7 +3,7 @@ · 2 unmodified lines
3module Docs3module Docs
4 class Koa < Github4 class Koa < Github
5 self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'5 self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'
6 self.release = '2.4.1'6 self.release = '2.5.1'
7 7
8 self.root_path = 'api/index.md'8 self.root_path = 'api/index.md'
9 self.initial_paths = %w[9 self.initial_paths = %w[
@@ -31,7 +31,7 @@ module Docs · 21 unmodified lines
31 options[:container] = '.markdown-body'31 options[:container] = '.markdown-body'
32 32
33 options[:attribution] = <<-HTML33 options[:attribution] = <<-HTML
34 &copy; 2017 Koa contributors<br>34 &copy; 2018 Koa contributors<br>
35 Licensed under the MIT License.35 Licensed under the MIT License.
36 HTML36 HTML
37 end37 end