Unified · Split
| @@ -354,8 +354,8 @@ credits = [ · 353 unmodified lines | |||
| 354 | 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' | 354 | 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' |
| 355 | ], [ | 355 | ], [ |
| 356 | 'Jest', | 356 | 'Jest', |
| 357 | '2014-present Facebook Inc.', | 357 | 'Facebook, Inc. and its affiliates.', |
| 358 | 'BSD', | 358 | 'MIT', |
| 359 | 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' | 359 | 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' |
| 360 | ], [ | 360 | ], [ |
| 361 | 'jQuery', | 361 | 'jQuery', |
| @@ -20,15 +20,23 @@ module Docs · 19 unmodified lines | |||
| 20 | def additional_entries | 20 | def additional_entries |
| 21 | return [] unless !root_page? && self.type == self.name # api page | 21 | return [] unless !root_page? && self.type == self.name # api page |
| 22 | 22 | ||
| 23 | at_css('.mainContainer ul').css('li > a').map do |node| | 23 | entries = [] |
| 24 | name = node.at_css('code').content.strip | 24 | |
| 25 | at_css('.mainContainer ul').css('li > a').each do |node| | ||
| 26 | code = node.at_css('code') | ||
| 27 | next if code.nil? | ||
| 28 | |||
| 29 | name = code.content.strip | ||
| 25 | name.sub! %r{\(.*\)}, '()' | 30 | name.sub! %r{\(.*\)}, '()' |
| 26 | name.remove! %r{[\s=<].*} | 31 | name.remove! %r{[\s=<].*} |
| 27 | name.prepend 'jest ' if name.start_with?('--') | 32 | name.prepend 'jest ' if name.start_with?('--') |
| 28 | name.prepend 'Config: ' if slug == 'configuration' | 33 | name.prepend 'Config: ' if slug == 'configuration' |
| 29 | id = node['href'].remove('#') | 34 | id = node['href'].remove('#') |
| 30 | [name, id] | 35 | |
| 36 | entries << [name, id] | ||
| 31 | end | 37 | end |
| 38 | |||
| 39 | entries | ||
| 32 | end | 40 | end |
| 33 | end | 41 | end |
| 34 | end | 42 | end |
| @@ -1,11 +1,11 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Jest < UrlScraper | 2 | class Jest < UrlScraper |
| 3 | self.type = 'simple' | 3 | self.type = 'simple' |
| 4 | self.release = '24.8.0' | 4 | self.release = '24.9' |
| 5 | self.base_url = 'https://jestjs.io/docs/en/' | 5 | self.base_url = 'https://jestjs.io/docs/en/' |
| 6 | self.root_path = 'getting-started' | 6 | self.root_path = 'getting-started' |
| 7 | self.links = { | 7 | self.links = { |
| 8 | home: 'https://facebook.github.io/jest/', | 8 | home: 'https://jestjs.io/', |
| 9 | code: 'https://github.com/facebook/jest' | 9 | code: 'https://github.com/facebook/jest' |
| 10 | } | 10 | } |
| 11 | 11 | ||
| @@ -14,8 +14,8 @@ module Docs · 2 unmodified lines | |||
| 14 | options[:container] = '.docMainWrapper' | 14 | options[:container] = '.docMainWrapper' |
| 15 | 15 | ||
| 16 | options[:attribution] = <<-HTML | 16 | options[:attribution] = <<-HTML |
| 17 | © 2014–present Facebook Inc.<br> | 17 | © 2019 Facebook, Inc. and its affiliates.<br> |
| 18 | Licensed under the BSD License. | 18 | Licensed under the MIT License. |
| 19 | HTML | 19 | HTML |
| 20 | 20 | ||
| 21 | def get_latest_version(opts) | 21 | def get_latest_version(opts) |