From 0ba298731ed795f6780febcf639a00f2fc45018e Mon Sep 17 00:00:00 2001 From: MasterEnoc Date: Sat, 14 Nov 2020 17:20:33 -0600 Subject: [PATCH] Update cypress to 5.6.0 --- lib/docs/filters/cypress/clean_html.rb | 2 ++ lib/docs/scrapers/cypress.rb | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/cypress/clean_html.rb b/lib/docs/filters/cypress/clean_html.rb index 9b93b313..5f60b810 100644 --- a/lib/docs/filters/cypress/clean_html.rb +++ b/lib/docs/filters/cypress/clean_html.rb @@ -14,6 +14,8 @@ module Docs css('.article-footer').remove css('.article-footer-updated').remove + css('.dashboard-ad').remove + css('pre').each do |node| node.content = node.content node['data-language'] = 'javascript' diff --git a/lib/docs/scrapers/cypress.rb b/lib/docs/scrapers/cypress.rb index 56380630..3bf3b923 100644 --- a/lib/docs/scrapers/cypress.rb +++ b/lib/docs/scrapers/cypress.rb @@ -4,7 +4,7 @@ module Docs class Cypress < UrlScraper self.name = 'Cypress' self.type = 'cypress' - self.release = '3.4.1' + self.release = '5.6.0' self.base_url = 'https://docs.cypress.io' self.root_path = '/api/api/table-of-contents.html' self.links = { @@ -18,14 +18,18 @@ module Docs options[:max_image_size] = 300_000 options[:include_default_entry] = true - options[:skip_patterns] = [/examples\//] + options[:skip_patterns] = [ + /examples\//, + /guides/ + ] + options[:skip_link] = ->(link) { href = link.attr(:href) href.nil? ? true : EntriesFilter::SECTIONS.none? { |section| href.match?("/#{section}/") } } options[:attribution] = <<-HTML - © 2017 Cypress.io
+ © 2020 Cypress.io
Licensed under the MIT License. HTML