From ad7be4d06156ee4cd22d0ae01ac42760a537d559 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 8 Jul 2018 17:41:45 -0400 Subject: [PATCH] Finish Koa scraper --- assets/javascripts/news.json | 2 +- .../templates/pages/about_tmpl.coffee | 5 +++++ assets/stylesheets/global/_icons.scss | 1 + lib/docs/filters/koa/entries.rb | 2 +- lib/docs/scrapers/koa.rb | 4 ++-- public/icons/docs/koa/16.png | Bin 847 -> 0 bytes public/icons/docs/koa/16@2x.png | Bin 1549 -> 0 bytes public/icons/docs/koa/SOURCE | 1 - 8 files changed, 10 insertions(+), 5 deletions(-) delete mode 100644 public/icons/docs/koa/16.png delete mode 100644 public/icons/docs/koa/16@2x.png delete mode 100644 public/icons/docs/koa/SOURCE diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index dc2321d3..37bba8ec 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,7 +1,7 @@ [ [ "2018-07-08", - "New documentations: Leaflet, Terraform" + "New documentations: Leaflet, Terraform and Koa" ], [ "2018-03-26", "DevDocs is joining the freeCodeCamp community. Read the announcement here." diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 539fec67..fef9a024 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -365,6 +365,11 @@ credits = [ 'Steven Sanderson, the Knockout.js team, and other contributors', 'MIT', 'https://raw.githubusercontent.com/knockout/knockout/master/LICENSE' + ], [ + 'Koa', + '2018 Koa contributors', + 'MIT', + 'https://raw.githubusercontent.com/koajs/koa/master/LICENSE' ], [ 'Kotlin', '2010-2018 JetBrains s.r.o.', diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index 906f0cc7..d7e24591 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -93,6 +93,7 @@ ._icon-svg:before { background-position: -5rem -5rem; } ._icon-marionette:before { background-position: -6rem -5rem; } ._icon-jsdoc:before, +._icon-koa:before, ._icon-mongoose:before { background-position: -7rem -5rem; } ._icon-phpunit:before { background-position: -8rem -5rem; } ._icon-nokogiri:before { background-position: -9rem -5rem; @extend %darkIconFix !optional; } diff --git a/lib/docs/filters/koa/entries.rb b/lib/docs/filters/koa/entries.rb index 83a03a56..6e237371 100644 --- a/lib/docs/filters/koa/entries.rb +++ b/lib/docs/filters/koa/entries.rb @@ -15,7 +15,7 @@ module Docs (slug.include?('index') && !node.content.include?('.')) end .map do |node| - name = node.content.sub(/\(.*\)$/, '') + name = node.content.strip.sub(/\(.*\)\z/, '()') type = 'API' if type == @root_type && name.include?('.') [name, node['id'], type] end diff --git a/lib/docs/scrapers/koa.rb b/lib/docs/scrapers/koa.rb index 92d48c36..0fa4bc68 100644 --- a/lib/docs/scrapers/koa.rb +++ b/lib/docs/scrapers/koa.rb @@ -3,7 +3,7 @@ module Docs class Koa < Github self.base_url = 'https://github.com/koajs/koa/blob/master/docs/' - self.release = '2.4.1' + self.release = '2.5.1' self.root_path = 'api/index.md' self.initial_paths = %w[ @@ -31,7 +31,7 @@ module Docs options[:container] = '.markdown-body' options[:attribution] = <<-HTML - © 2017 Koa contributors
+ © 2018 Koa contributors
Licensed under the MIT License. HTML end diff --git a/public/icons/docs/koa/16.png b/public/icons/docs/koa/16.png deleted file mode 100644 index a4280f6911556d775da0ac4e88022a4093f63d98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 847 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0WW zg+Z8+Vb&Z8pn}NEkcg59UmvUF{9L`nl>DSry^7odplSvNn+hu+GdHy)QK2F?C$HG5 z!d3~a!V1U+3F|8Y3;nDA{o-C@9zzrKDK}xwt{K19`Se z86_nJR{Hwo<>h+i#(Mch>H3D2mX`VkM*2oZx=P7{9O-#x!EwNQn0$BtH5O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LRasKp80mB@%@KyZpw#-pZ9VwDtUD!z2Z-W)cW}2 zsr@Cw9t#5|T$Gah8PyO}`RR$FkNZKAGbZ4GdV2n%sJnsVxeL39e(m_ z-8(nGDcgOdt!~d0jb$odo?rD&yJ`Jrv9bi0<7N?=uk|&`MhZt3e|&0lXXpC**X0~+ z%ho*Ke{bJi=Cm_s7;8QWypw(?XMgV5V!!p*@A0lJW2?Cwcb~OB`2b7y^~-4sVi}_! h=P=z!NtoQYpW)j(t2*ZeA7nsfw5O||%Q~loCIB+$q7MK7 diff --git a/public/icons/docs/koa/SOURCE b/public/icons/docs/koa/SOURCE deleted file mode 100644 index a018af7f..00000000 --- a/public/icons/docs/koa/SOURCE +++ /dev/null @@ -1 +0,0 @@ -https://github.com/github/explore/blob/db7f2f28385d413ba9e03a635009b3434c9710fc/topics/koa/koa.png