瀏覽代碼

codeceptjs: update to 3.0.2

samfundev 5 年之前
父節點
當前提交
23b4378582

+ 2 - 2
lib/docs/filters/codeceptjs/clean_html.rb

@@ -7,9 +7,9 @@ module Docs
           return doc
         end
 
-        @doc = doc.at_css('div.reference div[role=main]')
+        @doc = doc.at_css('article div.content__default')
 
-        css('hr').remove
+        css('hr, a.header-anchor').remove
 
         unless at_css('h1')
           at_css('h2').name = 'h1'

+ 1 - 1
lib/docs/filters/codeceptjs/entries.rb

@@ -2,7 +2,7 @@ module Docs
   class Codeceptjs
     class EntriesFilter < Docs::EntriesFilter
       def get_name
-        at_css('h1').content
+        at_css('h1').content.strip
       end
 
       def get_type

+ 9 - 1
lib/docs/scrapers/codeceptjs.rb

@@ -3,7 +3,7 @@ module Docs
     self.name = 'CodeceptJS'
     self.type = 'simple'
     self.root_path = 'index.html'
-    self.release = '1.4.4'
+    self.release = '3.0.2'
     self.base_url = 'https://codecept.io/'
     self.links = {
       home: 'https://codecept.io/',
@@ -17,6 +17,14 @@ module Docs
     options[:skip_links] = ->(filter) { !filter.root_page? }
     options[:skip_patterns] = [/changelog/, /quickstart\z/]
 
+    options[:fix_urls] = -> (url) do
+      url.sub! %r{\.html\z}, ''
+      url.sub! %r{custom-helpers\z}, 'helpers'
+      url
+    end
+
+    options[:trailing_slash] = true
+
     options[:attribution] = <<-HTML
       &copy; 2015 DavertMik &lt;davert@codegyre.com&gt; (http://codegyre.com)<br>
       Licensed under the MIT License.

二進制
public/icons/docs/codeceptjs/16.png


二進制
public/icons/docs/codeceptjs/16@2x.png


+ 1 - 1
public/icons/docs/codeceptjs/SOURCE

@@ -1 +1 @@
-http://codecept.io/images/cjs-base.png
+https://github.com/codeceptjs/website/blob/a4e7e9a8ebe56db7ed3783cb1f1d8d26a6c87b43/docs/.vuepress/public/logo.svg