浏览代码

Update Codeception documentation (4.1.22)

Enoc 4 年之前
父节点
当前提交
7c911073c2
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 2 0
      lib/docs/filters/codeception/clean_html.rb
  2. 2 3
      lib/docs/scrapers/codeception.rb

+ 2 - 0
lib/docs/filters/codeception/clean_html.rb

@@ -42,6 +42,8 @@ module Docs
           node.parent.content = node.parent.content
         end
 
+        css('.alert-warning').remove
+
         doc
       end
     end

+ 2 - 3
lib/docs/scrapers/codeception.rb

@@ -2,7 +2,7 @@ module Docs
   class Codeception < UrlScraper
     self.name = 'Codeception'
     self.type = 'codeception'
-    self.release = '4.1.12'
+    self.release = '4.1.22'
     self.base_url = 'https://codeception.com/docs/'
     self.root_path = 'index.html'
     self.links = {
@@ -20,8 +20,7 @@ module Docs
     HTML
 
     def get_latest_version(opts)
-      doc = fetch_doc('https://codeception.com/changelog', opts)
-      doc.at_css('#page > h4').content
+      get_github_tags("Codeception", "Codeception", opts)[1]["name"]
     end
   end
 end