History

Merge branch 'master' into mariadb

Jasper van Merle committed 7 years ago

Commit 29337982 parents ad53c65 2eb8654168 files · +874 −358Browse files

Showing the changes to lib/docs (84 of 168 files). Show all

Unified · Split

84 files
  1. lib/docs/core/doc.rb +6 −0
  2. lib/docs/core/requester.rb +8 −4
  3. lib/docs/core/scrapers/file_scraper.rb +18 −7
  4. lib/docs/core/url.rb +1 −1
  5. lib/docs/filters/codeceptjs/entries.rb +2 −2
  6. lib/docs/filters/cordova/clean_html.rb +1 −1
  7. lib/docs/filters/cpp/entries.rb +2 −0
  8. lib/docs/filters/css/entries.rb +17 −10
  9. lib/docs/filters/dom/clean_html.rb +1 −1
  10. lib/docs/filters/dom/entries.rb +12 −2
  11. lib/docs/filters/haskell/clean_html.rb +4 −0
  12. lib/docs/filters/haskell/entries.rb +2 −2
  13. lib/docs/filters/html/entries.rb +1 −1
  14. lib/docs/filters/javascript/clean_html.rb +2 −2
  15. lib/docs/filters/javascript/entries.rb +1 −1
  16. lib/docs/filters/mdn/clean_html.rb +90 −0
  17. lib/docs/filters/node/clean_html.rb +1 −1
  18. lib/docs/filters/node/entries.rb +2 −0
  19. lib/docs/filters/rdoc/clean_html.rb +4 −2
  20. lib/docs/filters/react/entries.rb +6 −2
  21. lib/docs/filters/redis/entries.rb +1 −1
  22. lib/docs/filters/rust/clean_html.rb +4 −2
  23. lib/docs/filters/rust/entries.rb +5 −6
  24. lib/docs/filters/sqlite/entries.rb +2 −1
  25. lib/docs/scrapers/ansible.rb +21 −1
  26. lib/docs/scrapers/apache.rb +1 −1
  27. lib/docs/scrapers/async.rb +2 −2
  28. lib/docs/scrapers/c.rb +0 −1
  29. lib/docs/scrapers/codeception.rb +1 −1
  30. lib/docs/scrapers/codeceptjs.rb +1 −1
  31. lib/docs/scrapers/cordova.rb +6 −1
  32. lib/docs/scrapers/cpp.rb +0 −1
  33. lib/docs/scrapers/crystal.rb +1 −1
  34. lib/docs/scrapers/d.rb +1 −1
  35. lib/docs/scrapers/d3.rb +1 −1
  36. lib/docs/scrapers/dart.rb +0 −2
  37. lib/docs/scrapers/django.rb +0 −6
  38. lib/docs/scrapers/erlang.rb +0 −4
  39. lib/docs/scrapers/eslint.rb +1 −1
  40. lib/docs/scrapers/flow.rb +1 −1
  41. lib/docs/scrapers/git.rb +1 −1
  42. lib/docs/scrapers/gnu/gcc.rb +0 −8
  43. lib/docs/scrapers/gnu/gnu_fortran.rb +0 −4
  44. lib/docs/scrapers/go.rb +1 −1
  45. lib/docs/scrapers/godot.rb +1 −1
  46. lib/docs/scrapers/graphite.rb +1 −1
  47. lib/docs/scrapers/haskell.rb +1 −1
  48. lib/docs/scrapers/homebrew.rb +2 −3
  49. lib/docs/scrapers/jasmine.rb +1 −1
  50. lib/docs/scrapers/julia.rb +2 −2
  51. lib/docs/scrapers/koa.rb +1 −1
  52. lib/docs/scrapers/leaflet.rb +1 −1
  53. lib/docs/scrapers/matplotlib.rb +29 −11
  54. lib/docs/scrapers/mocha.rb +1 −1
  55. lib/docs/scrapers/nginx.rb +1 −1
  56. lib/docs/scrapers/nim.rb +2 −2
  57. lib/docs/scrapers/node.rb +7 −2
  58. lib/docs/scrapers/nokogiri2.rb +8 −4
  59. lib/docs/scrapers/numpy.rb +0 −1
  60. lib/docs/scrapers/openjdk.rb +2 −3
  61. lib/docs/scrapers/pandas.rb +5 −0
  62. lib/docs/scrapers/perl.rb +0 −1
  63. lib/docs/scrapers/phoenix.rb +1 −1
  64. lib/docs/scrapers/php.rb +2 −3
  65. lib/docs/scrapers/puppeteer.rb +1 −1
  66. lib/docs/scrapers/python.rb +4 −8
  67. lib/docs/scrapers/rdoc/minitest.rb +7 −2
  68. lib/docs/scrapers/rdoc/rails.rb +10 −3
  69. lib/docs/scrapers/rdoc/ruby.rb +8 −19
  70. lib/docs/scrapers/react.rb +1 −1
  71. lib/docs/scrapers/redis.rb +1 −1
  72. lib/docs/scrapers/rust.rb +4 −1
  73. lib/docs/scrapers/scikit_image.rb +2 −2
  74. lib/docs/scrapers/scikit_learn.rb +2 −2
  75. lib/docs/scrapers/sinon.rb +13 −8
  76. lib/docs/scrapers/sqlite.rb +1 −2
  77. lib/docs/scrapers/statsmodels.rb +1 −1
  78. lib/docs/scrapers/symfony.rb +13 −8
  79. lib/docs/scrapers/twig.rb +6 −6
  80. lib/docs/scrapers/typescript.rb +1 −1
  81. lib/docs/scrapers/underscore.rb +4 −4
  82. lib/docs/scrapers/vagrant.rb +1 −1
  83. lib/docs/scrapers/yarn.rb +1 −1
  84. lib/docs/subscribers/requester_subscriber.rb +13 −0
lib/docs/core/doc.rb+6−0
@@ -95,6 +95,9 @@ module Docs · 94 unmodified lines
9595 false
9696 end
9797 end
98+ rescue Docs::SetupError => error
99+ puts "ERROR: #{error.message}"
100+ false
98101 end
99102
100103 def store_pages(store)
@@ -118,6 +121,9 @@ module Docs · 17 unmodified lines
118121 false
119122 end
120123 end
124+ rescue Docs::SetupError => error
125+ puts "ERROR: #{error.message}"
126+ false
121127 end
122128
123129 private
lib/docs/core/requester.rb+8−4
@@ -1,5 +1,7 @@
11 module Docs
22 class Requester < Typhoeus::Hydra
3+ include Instrumentable
4+
35 attr_reader :request_options
46
57 def self.run(urls, options = {}, &block)
@@ -20,7 +22,7 @@ module Docs · 14 unmodified lines
2022 def initialize(options = {})
2123 @request_options = options.extract!(:request_options)[:request_options].try(:dup) || {}
2224 options[:max_concurrency] ||= 20
23− options[:pipelining] = false
25+ options[:pipelining] = 0
2426 super
2527 end
2628
@@ -52,9 +54,11 @@ module Docs · 25 unmodified lines
5254 end
5355
5456 def handle_response(response)
55− on_response.each do |callback|
56− result = callback.call(response)
57− result.each { |url| request(url) } if result.is_a? Array
57+ instrument 'handle_response.requester', url: response.url do
58+ on_response.each do |callback|
59+ result = callback.call(response)
60+ result.each { |url| request(url) } if result.is_a?(Array)
61+ end
5862 end
5963 end
6064 end
lib/docs/core/scrapers/file_scraper.rb+18−7
@@ -1,14 +1,13 @@
11 module Docs
22 class FileScraper < Scraper
3+ SOURCE_DIRECTORY = File.expand_path '../../../../../docs', __FILE__
4+
35 Response = Struct.new :body, :url
46
57 class << self
6− attr_accessor :dir
7−
88 def inherited(subclass)
99 super
1010 subclass.base_url = base_url
11− subclass.dir = dir
1211 end
1312 end
1413
@@ -16,13 +15,25 @@ module Docs · 1 unmodified line
1615
1716 html_filters.push 'clean_local_urls'
1817
18+ def source_directory
19+ @source_directory ||= File.join(SOURCE_DIRECTORY, self.class.path)
20+ end
21+
1922 private
2023
24+ def assert_source_directory_exists
25+ unless Dir.exists?(source_directory)
26+ raise SetupError, "The #{self.class.name} scraper requires the original documentation files to be stored in the \"#{source_directory}\" directory."
27+ end
28+ end
29+
2130 def request_one(url)
22− Response.new read_file(file_path_for(url)), URL.parse(url)
31+ assert_source_directory_exists
32+ Response.new read_file(url_to_path(url)), URL.parse(url)
2333 end
2434
2535 def request_all(urls)
36+ assert_source_directory_exists
2637 queue = [urls].flatten
2738 until queue.empty?
2839 result = yield request_one(queue.shift)
@@ -34,12 +45,12 @@ module Docs · 5 unmodified lines
3445 response.body.present?
3546 end
3647
37− def file_path_for(url)
38− File.join self.class.dir, url.remove(base_url.to_s)
48+ def url_to_path(url)
49+ url.remove(base_url.to_s)
3950 end
4051
4152 def read_file(path)
42− File.read(path)
53+ File.read(File.join(source_directory, path))
4354 rescue
4455 instrument 'warn.doc', msg: "Failed to open file: #{path}"
4556 nil
lib/docs/core/url.rb+1−1
@@ -72,7 +72,7 @@ module Docs · 71 unmodified lines
7272
7373 if base == dest
7474 ''
75− elsif dest.start_with? File.join(base, '')
75+ elsif dest.start_with?(::File.join(base, ''))
7676 url.path[(path.length)..-1]
7777 end
7878 end
lib/docs/filters/codeceptjs/entries.rb+2−2
@@ -20,8 +20,8 @@ module Docs · 19 unmodified lines
2020 def additional_entries
2121 return [] unless subpath.start_with?('helpers') && subpath != 'helpers/'
2222
23− css('h2').each_with_object [] do |node, entries|
24− next if node['id'] == 'access-from-helpers'
23+ css('h2, h3').each_with_object [] do |node, entries|
24+ next if node['id'] == 'access-from-helpers' || node.content !~ /\s*[a-z_]/
2525 entries << ["#{node.content} (#{name})", node['id']]
2626 end
2727 end
lib/docs/filters/cordova/clean_html.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Cordova
33 class CleanHtmlFilter < Filter
44 def call
5− @doc = at_css('.page-content > div')
5+ @doc = at_css('#page-toc-source') || at_css('.page-content > div')
66
77 at_css('h1').content = 'Apache Cordova' if root_page?
88
lib/docs/filters/cpp/entries.rb+2−0
@@ -31,6 +31,8 @@ module Docs · 30 unmodified lines
3131 'Keywords'
3232 elsif subpath.start_with?('experimental')
3333 'Experimental libraries'
34+ elsif subpath.start_with?('language/')
35+ 'Language'
3436 elsif type = at_css('.t-navbar > div:nth-child(4) > :first-child').try(:content)
3537 type.strip!
3638 type.remove! ' library'
lib/docs/filters/css/entries.rb+17−10
@@ -6,13 +6,16 @@ module Docs · 5 unmodified lines
66 'CSS_Background_and_Borders' => 'Backgrounds & Borders',
77 'CSS_Columns' => 'Multi-column Layout',
88 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout',
9+ 'CSS_Fonts' => 'Fonts',
910 'CSS_Grid_Layout' => 'Grid Layout',
1011 'CSS_Images' => 'Images',
1112 'CSS_Lists_and_Counters' => 'Lists',
1213 'CSS_Transforms' => 'Transforms',
1314 'Media_Queries' => 'Media Queries',
15+ 'filter-function' => 'Filter Effects',
1416 'transform-function' => 'Transforms',
1517 '@media' => 'Media Queries',
18+ 'overscroll' => 'Overscroll',
1619 'text-size-adjust' => 'Miscellaneous',
1720 'resolved_value' => 'Miscellaneous',
1821 'touch-action' => 'Miscellaneous',
@@ -42,7 +45,7 @@ module Docs · 23 unmodified lines
4245 end
4346
4447 def get_type
45− if slug.include?('-webkit') || slug.include?('-moz')
48+ if slug.include?('-webkit') || slug.include?('-moz') || slug.include?('-ms')
4649 'Extensions'
4750 elsif type = TYPE_BY_PATH[slug.split('/').first]
4851 type
@@ -66,19 +69,22 @@ module Docs · 17 unmodified lines
6669 'Pseudo-Elements'
6770 elsif name.start_with?(':')
6871 'Selectors'
72+ elsif name.start_with?('display-')
73+ 'Display'
6974 else
7075 'Miscellaneous'
7176 end
7277 end
7378
7479 STATUSES = {
75− 'spec-Living' => 0,
76− 'spec-REC' => 1,
77− 'spec-CR' => 2,
78− 'spec-PR' => 3,
79− 'spec-LC' => 4,
80− 'spec-WD' => 5,
81− 'spec-ED' => 6
80+ 'spec-Living' => 0,
81+ 'spec-REC' => 1,
82+ 'spec-CR' => 2,
83+ 'spec-PR' => 3,
84+ 'spec-LC' => 4,
85+ 'spec-WD' => 5,
86+ 'spec-ED' => 6,
87+ 'spec-Obsolete' => 7
8288 }
8389
8490 PRIORITY_STATUSES = %w(spec-REC spec-CR)
@@ -86,6 +92,7 @@ module Docs · 1 unmodified line
8692
8793 def get_spec
8894 return unless table = at_css('#Specifications + table') || css('.standard-table').last
95+
8996 specs = table.css('tbody tr').to_a
9097 # [link, span]
9198 specs.map! { |node| [node.at_css('> td:nth-child(1) > a'), node.at_css('> td:nth-child(2) > span')] }
@@ -110,8 +117,8 @@ module Docs · 18 unmodified lines
110117 'shape' => [
111118 %w(rect() Syntax) ],
112119 'timing-function' => [
113− %w(cubic-bezier() The_cubic-bezier()_class_of_timing-functions),
114− %w(steps() The_steps()_class_of_timing-functions),
120+ %w(cubic-bezier()),
121+ %w(steps()),
115122 %w(linear linear),
116123 %w(ease ease),
117124 %w(ease-in ease-in),
lib/docs/filters/dom/clean_html.rb+1−1
@@ -30,7 +30,7 @@ module Docs · 29 unmodified lines
3030 end
3131
3232 # Remove <div> wrapping .overheadIndicator
33− css('div > .overheadIndicator:first-child:last-child').each do |node|
33+ css('div > .overheadIndicator:first-child:last-child', 'div > .blockIndicator:first-child:last-child').each do |node|
3434 node.parent.replace(node)
3535 end
3636
lib/docs/filters/dom/entries.rb+12−2
@@ -6,6 +6,7 @@ module Docs · 5 unmodified lines
66 'EXT_' => 'WebGL',
77 'OES_' => 'WebGL',
88 'WEBGL_' => 'WebGL',
9+ 'Sensor API' => 'Sensors',
910 'Ambient Light' => 'Ambient Light',
1011 'Audio' => 'Audio',
1112 'Battery Status' => 'Battery Status',
@@ -22,10 +23,12 @@ module Docs · 10 unmodified lines
2223 'Encrypted Media Extensions' => 'Encrypted Media',
2324 'Fetch' => 'Fetch',
2425 'File API' => 'File',
26+ 'Fullscreen' => 'Fullscreen',
2527 'Geolocation' => 'Geolocation',
2628 'Geometry' => 'Geometry',
2729 'High Resolution Time' => 'Performance',
2830 'Intersection' => 'Intersection Observer',
31+ 'Keyboard' => 'Keyboard',
2932 'Media Capabilities' => 'Media',
3033 'Media Capture' => 'Media',
3134 'Media Session' => 'Media',
@@ -35,6 +38,7 @@ module Docs · 3 unmodified lines
3538 'MIDI' => 'Audio',
3639 'Navigation Timing' => 'Performance',
3740 'Network Information' => 'Network Information',
41+ 'Orientation Sensor' => 'Sensors',
3842 'Payment' => 'Payments',
3943 'Performance Timeline' => 'Performance',
4044 'Pointer Events' => 'Pointer Events',
@@ -53,11 +57,13 @@ module Docs · 12 unmodified lines
5357 'Web App Manifest' => 'Web App Manifest',
5458 'Budget' => 'Budget',
5559 'Web Authentication' => 'Authentication',
60+ 'Web Locks' => 'Locks',
5661 'Web Workers' => 'Web Workers',
5762 'WebGL' => 'WebGL',
5863 'WebRTC' => 'WebRTC',
5964 'WebUSB' => 'WebUSB',
60− 'WebVR' => 'WebVR' }
65+ 'WebVR' => 'WebVR',
66+ 'WebVTT' => 'WebVTT' }
6167
6268 TYPE_BY_NAME_STARTS_WITH = {
6369 'AbortController' => 'Fetch',
@@ -89,10 +95,12 @@ module Docs · 25 unmodified lines
8995 'Fetch' => 'Fetch',
9096 'File' => 'File',
9197 'GlobalEventHandlers' => 'GlobalEventHandlers',
98+ 'HMDVR' => 'WebVR',
9299 'history' => 'History',
93100 'HTML Drag' => 'Drag & Drop',
94101 'HTML' => 'Elements',
95102 'IDB' => 'IndexedDB',
103+ 'Keyboard' => 'Keyboard',
96104 'location' => 'Location',
97105 'navigator' => 'Navigator',
98106 'MediaKeySession' => 'Encrypted Media',
@@ -122,6 +130,7 @@ module Docs · 23 unmodified lines
122130 'StyleSheet' => 'CSS',
123131 'Stylesheet' => 'CSS',
124132 'SVG' => 'SVG',
133+ 'TextTrack' => 'WebVTT',
125134 'TimeRanges' => 'Media',
126135 'timing' => 'Performance',
127136 'Timing' => 'Performance',
@@ -160,6 +169,7 @@ module Docs · 32 unmodified lines
160169 'timing' => 'Performance',
161170 'Timing' => 'Performance',
162171 'udio' => 'Audio',
172+ 'VRDevice' => 'WebVR',
163173 'WebGL' => 'WebGL',
164174 'WEBGL' => 'WebGL',
165175 'WebRTC' => 'WebRTC',
@@ -239,7 +249,7 @@ module Docs · 73 unmodified lines
239249
240250 def include_default_entry?
241251 return true if type == 'Console'
242− return true unless node = doc.at_css('.overheadIndicator')
252+ return true unless node = doc.at_css('.overheadIndicator, .blockIndicator')
243253 node = node.parent while node.parent != doc
244254 return true if node.previous_element.try(:name).in?(%w(h2 h3))
245255 content = node.content
lib/docs/filters/haskell/clean_html.rb+4−0
@@ -65,6 +65,10 @@ module Docs · 64 unmodified lines
6565 end
6666 end
6767
68+ css('pre code').each do |node|
69+ node.before(node.children).remove
70+ end
71+
6872 doc
6973 end
7074 end
lib/docs/filters/haskell/entries.rb+2−2
@@ -52,7 +52,7 @@ module Docs · 51 unmodified lines
5252 return [] if subpath.start_with?('users_guide')
5353 return [] if IGNORE_ENTRIES_PATHS.include?(subpath.split('/').last)
5454
55− css('#synopsis > ul > li').each_with_object [] do |node, entries|
55+ css('#synopsis > details > ul > li').each_with_object [] do |node, entries|
5656 link = node.at_css('a')
5757 name = node.content.strip
5858 name.remove! %r{\A(?:module|data|newtype|class|type family m|type)\s+}
@@ -75,7 +75,7 @@ module Docs · 16 unmodified lines
7575 end
7676
7777 def include_default_entry?
78− subpath.start_with?('users_guide') || at_css('#synopsis > ul > li')
78+ subpath.start_with?('users_guide') || at_css('#synopsis > details > ul > li')
7979 end
8080 end
8181 end
lib/docs/filters/html/entries.rb+1−1
@@ -28,7 +28,7 @@ module Docs · 27 unmodified lines
2828
2929 def include_default_entry?
3030 return false if %w(Element/Heading_Elements).include?(slug)
31− (node = doc.at_css '.overheadIndicator').nil? || node.content.exclude?('not on a standards track')
31+ (node = doc.at_css '.overheadIndicator, .blockIndicator').nil? || node.content.exclude?('not on a standards track')
3232 end
3333
3434 def additional_entries
lib/docs/filters/javascript/clean_html.rb+2−2
@@ -11,12 +11,12 @@ module Docs · 10 unmodified lines
1111
1212 def other
1313 # Remove "style" attribute
14− css('.inheritsbox', '.overheadIndicator').each do |node|
14+ css('.inheritsbox', '.overheadIndicator', '.blockIndicator').each do |node|
1515 node.remove_attribute 'style'
1616 end
1717
1818 # Remove <div> wrapping .overheadIndicator
19− css('div > .overheadIndicator:first-child:last-child').each do |node|
19+ css('div > .overheadIndicator:first-child:last-child', 'div > .blockIndicator:first-child:last-child').each do |node|
2020 node.parent.replace(node)
2121 end
2222 end
lib/docs/filters/javascript/entries.rb+1−1
@@ -88,7 +88,7 @@ module Docs · 87 unmodified lines
8888 end
8989
9090 def include_default_entry?
91− node = doc.at_css '.overheadIndicator, .warning'
91+ node = doc.at_css '.blockIndicator, .warning'
9292
9393 # Can't use :first-child because #doc is a DocumentFragment
9494 return true unless node && node.parent == doc && !node.previous_element
lib/docs/filters/mdn/clean_html.rb+90−0
@@ -14,6 +14,8 @@ module Docs · 13 unmodified lines
1414 '#Quick_Links',
1515 'hr']
1616
17+ BROWSER_UNNECESSARY_CLASS_REGEX = /\s*bc-browser[\w_-]+/
18+
1719 def call
1820 css(*REMOVE_NODES).remove
1921
@@ -61,6 +63,94 @@ module Docs · 41 unmodified lines
6163 node.previous_element << node
6264 end
6365
66+ # New compatibility tables
67+
68+ css('.bc-data #Legend + dl', '.bc-data #Legend', '.bc-data #Legend_2 + dl', '.bc-data #Legend_2', '.bc-browser-name').remove
69+
70+ css('abbr.only-icon[title="Full support"]',
71+ 'abbr.only-icon[title="Partial support"]',
72+ 'abbr.only-icon[title="No support"]',
73+ 'abbr.only-icon[title="See implementation notes"]').remove
74+
75+ css('.bc-data .ic-altname', '.bc-data .ic-deprecated', '.bc-data .ic-non-standard', '.bc-data .ic-experimental').each do |node|
76+ node.parent.remove
77+ end
78+
79+ css('abbr.only-icon').each do |node|
80+ node.replace(node.content)
81+ end
82+
83+ css('.bc-table .bc-platforms td', '.bc-table .bc-browsers td').each do |node|
84+ node.name = 'th'
85+ end
86+
87+ css('.bc-data').each do |node|
88+ link = node.at_css('.bc-github-link')
89+ prev = node.previous_element
90+ prev = prev.previous_element until prev.name == 'h2'
91+ prev.add_child(link)
92+
93+ node.before(node.children).remove
94+ end
95+
96+ css('.bc-table').each do |node|
97+ desktop_table = node
98+
99+ mobile_table = node.dup
100+ desktop_table.after(mobile_table)
101+
102+ if desktop_table.at_css('.bc-platform-server')
103+ server_table = node.dup
104+ mobile_table.after(server_table)
105+ end
106+
107+ desktop_columns = desktop_table.at_css('th.bc-platform-desktop')['colspan'].to_i
108+ mobile_columns = desktop_table.at_css('th.bc-platform-mobile')['colspan'].to_i
109+
110+ desktop_table.css('.bc-platform-mobile').remove
111+ desktop_table.css('.bc-platform-server').remove
112+ desktop_table.css('.bc-browsers th').to_a[(desktop_columns + 1)..-1].each(&:remove)
113+ desktop_table.css('tr:not(.bc-platforms):not(.bc-browsers)').each do |line|
114+ line.css('td').to_a[(desktop_columns)..-1].each(&:remove)
115+ end
116+
117+ mobile_table.css('.bc-platform-desktop').remove
118+ mobile_table.css('.bc-platform-server').remove
119+ mobile_table.css('.bc-browsers th').to_a[1..(desktop_columns)].each(&:remove)
120+ mobile_table.css('.bc-browsers th').to_a[(mobile_columns + 1)..-1].each(&:remove)
121+ mobile_table.css('tr:not(.bc-platforms):not(.bc-browsers)').each do |line|
122+ line.css('td').to_a[0..(desktop_columns - 1)].each(&:remove)
123+ line.css('td').to_a[(mobile_columns)..-1].each(&:remove)
124+ end
125+
126+ if server_table
127+ server_table.css('.bc-platform-desktop').remove
128+ server_table.css('.bc-platform-mobile').remove
129+ server_table.css('.bc-browsers th').to_a[1..(desktop_columns + mobile_columns)].each(&:remove)
130+ server_table.css('tr:not(.bc-platforms):not(.bc-browsers)').each do |line|
131+ line.css('td').to_a[0..(desktop_columns + mobile_columns - 1)].each(&:remove)
132+ end
133+ end
134+ end
135+
136+ # Reduce page size to make the offline bundle smaller.
137+ css('.bc-supports-unknown').remove_attr('class')
138+ css('td[class*="bc-platform"], th[class*="bc-platform"]').remove_attr('class')
139+ css('td[class*="bc-browser"], th[class*="bc-browser"]').each do |node|
140+ class_name = node['class']
141+ class_name.remove!(BROWSER_UNNECESSARY_CLASS_REGEX)
142+
143+ if class_name.present?
144+ node['class'] = class_name
145+ else
146+ node.remove_attribute('class')
147+ end
148+ end
149+
150+ css('abbr[title*="Compatibility unknown"]').each do |node|
151+ node.before(node.children).remove
152+ end
153+
64154 doc
65155 end
66156 end
lib/docs/filters/node/clean_html.rb+1−1
@@ -16,7 +16,7 @@ module Docs · 15 unmodified lines
1616
1717 css('pre').each do |node|
1818 if lang = node.at_css('code')['class']
19− node['data-language'] = lang.remove('lang-')
19+ node['data-language'] = lang.remove(%r{lang(uage)?-})
2020 end
2121
2222 node.content = node.content
lib/docs/filters/node/entries.rb+2−0
@@ -26,6 +26,7 @@ module Docs · 25 unmodified lines
2626
2727 def get_type
2828 type = at_css('h1').content.strip
29+ type.remove! %r{\[.*\]}
2930 REPLACE_TYPES[type] || "#{type.first.upcase}#{type[1..-1]}"
3031 end
3132
@@ -40,6 +41,7 @@ module Docs · 8 unmodified lines
4041
4142 klass = nil if node.name == 'h2'
4243 name = node.content.strip
44+ name.remove! %r{\s*\[src\]}
4345
4446 # Skip constructors
4547 if name.start_with? 'new '
lib/docs/filters/rdoc/clean_html.rb+4−2
@@ -37,8 +37,10 @@ module Docs · 36 unmodified lines
3737 end
3838
3939 # Add class to differentiate Ruby code from C code
40− css('.method-source-code > pre').each do |node|
41− node['class'] = node.at_css('.ruby-keyword') ? 'ruby' : 'c'
40+ css('.method-source-code').each do |node|
41+ node.parent.prepend_child(node)
42+ pre = node.at_css('pre')
43+ pre['class'] = pre.at_css('.ruby-keyword') ? 'ruby' : 'c'
4244 end
4345
4446 # Remove code highlighting
lib/docs/filters/react/entries.rb+6−2
@@ -6,9 +6,11 @@ module Docs · 5 unmodified lines
66 end
77
88 def get_type
9− link = at_css("nav a[href='#{result[:path].split('/').last}']")
9+ link = css("nav a[href='#{result[:path].split('/').last}']").last
1010 return 'Miscellaneous' unless link
11− link.ancestors('ul').last.previous_element.content
11+ type = link.ancestors('ul').last.previous_element.content
12+ type.remove! %r{\s*\(.*\)}
13+ type
1214 end
1315
1416 def additional_entries
@@ -25,6 +27,8 @@ module Docs · 10 unmodified lines
2527 'Reference: Component'
2628 elsif slug == 'react-api'
2729 'Reference: React'
30+ elsif slug == 'hooks-reference'
31+ 'Hooks'
2832 else
2933 'Reference'
3034 end
lib/docs/filters/redis/entries.rb+1−1
@@ -21,7 +21,7 @@ module Docs · 20 unmodified lines
2121 when 'PFADD' then 'HyperLogLog'
2222 when 'CLUSTER ADDSLOTS' then 'Cluster'
2323 when 'GEOADD' then 'Geo'
24− when 'XADD' then 'Stream'
24+ when 'XACK' then 'Stream'
2525 else 'Miscellaneous'
2626 end
2727 end
lib/docs/filters/rust/clean_html.rb+4−2
@@ -1,3 +1,5 @@
1+# frozen_string_literal: true
2+
13 module Docs
24 class Rust
35 class CleanHtmlFilter < Filter
@@ -74,10 +76,10 @@ module Docs · 70 unmodified lines
7476 node.remove
7577 end
7678
77− css('h2 .important-traits', 'h3 .important-traits', 'h4 .important-traits').each do |node|
79+ css('.important-traits').to_a.each_with_index do |node, index|
7880 content = node.at_css('.content.hidden .content')
7981 node.at_css('.content.hidden').replace(content) if content
80− node.parent.after(node)
82+ node.parent.after(node) if node.parent.name.in?(%(h2 h3 h4))
8183 end
8284
8385 css('code.content').each do |node|
lib/docs/filters/rust/entries.rb+5−6
@@ -43,13 +43,12 @@ module Docs · 42 unmodified lines
4343 end
4444 else
4545 css('.method')
46− .select {|node| !node.at_css('.fnname').nil?}
47− .map {|node|
48− name = node.at_css('.fnname').content
46+ .each_with_object({}) { |node, entries|
47+ name = node.at_css('.fnname').try(:content)
48+ next unless name
4949 name.prepend "#{self.name}::"
50− [name, node['id']]
51− }
52− .uniq {|item| item[0]}
50+ entries[name] ||= [name, node['id']]
51+ }.values
5352 end
5453 end
5554 end
lib/docs/filters/sqlite/entries.rb+2−1
@@ -34,7 +34,8 @@ module Docs · 33 unmodified lines
3434 'rtree' => 'R*Tree Module',
3535 'rbu' => 'RBU Extension',
3636 'limits' => 'Limits',
37− 'howtocorrupt' => 'How To Corrupt'
37+ 'howtocorrupt' => 'How To Corrupt',
38+ 'geopoly' => 'Geopoly'
3839 }
3940
4041 def get_type
lib/docs/scrapers/ansible.rb+21−1
@@ -15,8 +15,28 @@ module Docs · 14 unmodified lines
1515 Licensed under the GNU General Public License version 3.
1616 HTML
1717
18+ version '2.7' do
19+ self.release = '2.7.1'
20+ self.base_url = 'https://docs.ansible.com/ansible/2.7/'
21+
22+ options[:skip] = %w(
23+ installation_guide/index.html
24+ reference_appendices/glossary.html
25+ reference_appendices/faq.html
26+ reference_appendices/tower.html
27+ user_guide/quickstart.html
28+ modules/modules_by_category.html
29+ modules/list_of_all_modules.html)
30+
31+ options[:skip_patterns] = [
32+ /\Acommunity.*/i,
33+ /\Adev_guide.*/i,
34+ /\Aroadmap.*/i,
35+ ]
36+ end
37+
1838 version '2.6' do
19− self.release = '2.6.1'
39+ self.release = '2.6.7'
2040 self.base_url = 'https://docs.ansible.com/ansible/2.6/'
2141
2242 options[:skip] = %w(
lib/docs/scrapers/apache.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 self.name = 'Apache HTTP Server'
44 self.slug = 'apache_http_server'
55 self.type = 'apache'
6− self.release = '2.4.34'
6+ self.release = '2.4.37'
77 self.base_url = 'https://httpd.apache.org/docs/2.4/en/'
88 self.links = {
99 home: 'https://httpd.apache.org/'
lib/docs/scrapers/async.rb+2−2
@@ -1,7 +1,7 @@
11 module Docs
22 class Async < UrlScraper
33 self.type = 'async'
4− self.release = '2.6.0'
4+ self.release = '2.6.1'
55 self.base_url = 'https://caolan.github.io/async/'
66 self.root_path = 'docs.html'
77 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
1414 options[:skip_links] = true
1515
1616 options[:attribution] = <<-HTML
17− &copy; 2010&ndash;2017 Caolan McMahon<br>
17+ &copy; 2010&ndash;2018 Caolan McMahon<br>
1818 Licensed under the MIT License.
1919 HTML
2020 end
lib/docs/scrapers/c.rb+0−1
@@ -1,7 +1,6 @@
11 module Docs
22 class C < FileScraper
33 self.type = 'c'
4− self.dir = '/Users/Thibaut/DevDocs/Docs/c'
54 self.base_url = 'http://en.cppreference.com/w/c/'
65 self.root_path = 'header.html'
76
lib/docs/scrapers/codeception.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Codeception < UrlScraper
33 self.name = 'Codeception'
44 self.type = 'codeception'
5− self.release = '2.4.0'
5+ self.release = '2.5.1'
66 self.base_url = 'https://codeception.com/docs/'
77 self.root_path = 'index.html'
88 self.links = {
lib/docs/scrapers/codeceptjs.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 self.name = 'CodeceptJS'
44 self.type = 'simple'
55 self.root_path = 'index.html'
6− self.release = '1.3.1'
6+ self.release = '1.4.4'
77 self.base_url = 'https://codecept.io/'
88 self.links = {
99 home: 'https://codecept.io/',
lib/docs/scrapers/cordova.rb+6−1
@@ -24,10 +24,15 @@ module Docs · 23 unmodified lines
2424 end
2525
2626 options[:attribution] = <<-HTML
27− &copy; 2012&ndash;2017 The Apache Software Foundation<br>
27+ &copy; 2012&ndash;2018 The Apache Software Foundation<br>
2828 Licensed under the Apache License 2.0.
2929 HTML
3030
31+ version '8' do
32+ self.release = '8.1.2'
33+ self.base_url = 'https://cordova.apache.org/docs/en/8.x/'
34+ end
35+
3136 version '7' do
3237 self.release = '7.1.0'
3338 self.base_url = 'https://cordova.apache.org/docs/en/7.x/'
lib/docs/scrapers/cpp.rb+0−1
@@ -3,7 +3,6 @@ module Docs · 2 unmodified lines
33 self.name = 'C++'
44 self.slug = 'cpp'
55 self.type = 'c'
6− self.dir = '/Users/Thibaut/DevDocs/Docs/cpp'
76 self.base_url = 'http://en.cppreference.com/w/cpp/'
87 self.root_path = 'header.html'
98
lib/docs/scrapers/crystal.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Crystal < UrlScraper
33 self.type = 'crystal'
4− self.release = '0.26.0'
4+ self.release = '0.27.0'
55 self.base_url = 'https://crystal-lang.org/'
66 self.root_path = "api/#{release}/index.html"
77 self.initial_paths = %w(docs/index.html)
lib/docs/scrapers/d.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class D < UrlScraper
33 include MultipleBaseUrls
44
5− self.release = '2.081.0'
5+ self.release = '2.083.0'
66 self.type = 'd'
77 self.base_urls = ['https://dlang.org/phobos/', 'https://dlang.org/spec/']
88 self.root_path = 'index.html'
lib/docs/scrapers/d3.rb+1−1
@@ -17,7 +17,7 @@ module Docs · 16 unmodified lines
1717 HTML
1818
1919 version '5' do
20− self.release = '5.4.0'
20+ self.release = '5.7.0'
2121 self.base_url = 'https://github.com/d3/'
2222 self.root_path = 'd3/blob/master/API.md'
2323
lib/docs/scrapers/dart.rb+0−2
@@ -24,13 +24,11 @@ module Docs · 23 unmodified lines
2424
2525 version '2' do
2626 self.release = '2.0.0'
27− self.dir = '/Users/Thibaut/DevDocs/Docs/Dart2'
2827 self.base_url = "https://api.dartlang.org/stable/#{release}/"
2928 end
3029
3130 version '1' do
3231 self.release = '1.24.3'
33− self.dir = '/Users/Thibaut/DevDocs/Docs/Dart1'
3432 self.base_url = "https://api.dartlang.org/stable/#{release}/"
3533 end
3634 end
lib/docs/scrapers/django.rb+0−6
@@ -36,37 +36,31 @@ module Docs · 35 unmodified lines
3636
3737 version '2.1' do
3838 self.release = '2.1.0'
39− self.dir = '/Users/Thibaut/DevDocs/Docs/Django21'
4039 self.base_url = 'https://docs.djangoproject.com/en/2.1/'
4140 end
4241
4342 version '2.0' do
4443 self.release = '2.0.7'
45− self.dir = '/Users/Thibaut/DevDocs/Docs/Django20'
4644 self.base_url = 'https://docs.djangoproject.com/en/2.0/'
4745 end
4846
4947 version '1.11' do
5048 self.release = '1.11.9'
51− self.dir = '/Users/Thibaut/DevDocs/Docs/Django111'
5249 self.base_url = 'https://docs.djangoproject.com/en/1.11/'
5350 end
5451
5552 version '1.10' do
5653 self.release = '1.10.8'
57− self.dir = '/Users/Thibaut/DevDocs/Docs/Django110'
5854 self.base_url = 'https://docs.djangoproject.com/en/1.10/'
5955 end
6056
6157 version '1.9' do
6258 self.release = '1.9.13'
63− self.dir = '/Users/Thibaut/DevDocs/Docs/Django19'
6459 self.base_url = 'https://docs.djangoproject.com/en/1.9/'
6560 end
6661
6762 version '1.8' do
6863 self.release = '1.8.18'
69− self.dir = '/Users/Thibaut/DevDocs/Docs/Django18'
7064 self.base_url = 'https://docs.djangoproject.com/en/1.8/'
7165 end
7266 end
lib/docs/scrapers/erlang.rb+0−4
@@ -42,22 +42,18 @@ module Docs · 41 unmodified lines
4242
4343 version '21' do
4444 self.release = '21.0'
45− self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang21'
4645 end
4746
4847 version '20' do
4948 self.release = '20.3'
50− self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang20'
5149 end
5250
5351 version '19' do
5452 self.release = '19.3'
55− self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang19'
5653 end
5754
5855 version '18' do
5956 self.release = '18.3'
60− self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang18'
6157 end
6258 end
6359 end
lib/docs/scrapers/eslint.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Eslint < UrlScraper
33 self.name = 'ESLint'
44 self.type = 'simple'
5− self.release = '4.19.0'
5+ self.release = '5.8.0'
66 self.base_url = 'https://eslint.org/docs/'
77 self.root_path = 'user-guide/getting-started'
88 self.links = {
lib/docs/scrapers/flow.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Flow < UrlScraper
33 self.type = 'simple'
4− self.release = '0.79.1'
4+ self.release = '0.85.0'
55 self.base_url = 'https://flow.org/en/docs/'
66 self.links = {
77 home: 'https://flow.org/',
lib/docs/scrapers/git.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Git < UrlScraper
33 self.type = 'git'
4− self.release = '2.17.0'
4+ self.release = '2.19.1'
55 self.base_url = 'https://git-scm.com/docs'
66 self.initial_paths = %w(/git.html)
77 self.links = {
lib/docs/scrapers/gnu/gcc.rb+0−8
@@ -48,13 +48,11 @@ module Docs · 47 unmodified lines
4848
4949 version '7' do
5050 self.release = '7.3.0'
51− self.dir = '/Users/Thibaut/DevDocs/Docs/gcc7'
5251 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
5352 end
5453
5554 version '7 CPP' do
5655 self.release = '7.3.0'
57− self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp7'
5856 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
5957
6058 options[:replace_paths] = CPP_PATHS
@@ -62,7 +60,6 @@ module Docs · 1 unmodified line
6260
6361 version '6' do
6462 self.release = '6.4.0'
65− self.dir = '/Users/Thibaut/DevDocs/Docs/gcc6'
6663 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
6764
6865 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -70,7 +67,6 @@ module Docs · 1 unmodified line
7067
7168 version '6 CPP' do
7269 self.release = '6.4.0'
73− self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp6'
7470 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
7571
7672 options[:replace_paths] = CPP_PATHS
@@ -78,7 +74,6 @@ module Docs · 1 unmodified line
7874
7975 version '5' do
8076 self.release = '5.4.0'
81− self.dir = '/Users/Thibaut/DevDocs/Docs/gcc5'
8277 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
8378
8479 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -86,7 +81,6 @@ module Docs · 1 unmodified line
8681
8782 version '5 CPP' do
8883 self.release = '5.4.0'
89− self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp5'
9084 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
9185
9286 options[:replace_paths] = CPP_PATHS
@@ -94,7 +88,6 @@ module Docs · 1 unmodified line
9488
9589 version '4' do
9690 self.release = '4.9.3'
97− self.dir = '/Users/Thibaut/DevDocs/Docs/gcc4'
9891 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
9992
10093 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -102,7 +95,6 @@ module Docs · 1 unmodified line
10295
10396 version '4 CPP' do
10497 self.release = '4.9.3'
105− self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp4'
10698 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
10799
108100 options[:replace_paths] = CPP_PATHS
lib/docs/scrapers/gnu/gnu_fortran.rb+0−4
@@ -8,25 +8,21 @@ module Docs · 7 unmodified lines
88
99 version '7' do
1010 self.release = '7.3.0'
11− self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran7'
1211 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
1312 end
1413
1514 version '6' do
1615 self.release = '6.4.0'
17− self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran6'
1816 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
1917 end
2018
2119 version '5' do
2220 self.release = '5.4.0'
23− self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran5'
2421 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
2522 end
2623
2724 version '4' do
2825 self.release = '4.9.3'
29− self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran4'
3026 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
3127 end
3228 end
lib/docs/scrapers/go.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Go < UrlScraper
33 self.type = 'go'
4− self.release = '1.10.1'
4+ self.release = '1.11.2'
55 self.base_url = 'https://golang.org/pkg/'
66 self.links = {
77 home: 'https://golang.org/',
lib/docs/scrapers/godot.rb+1−1
@@ -29,7 +29,7 @@ module Docs · 28 unmodified lines
2929 end
3030
3131 version '3.0' do
32− self.release = '3.0'
32+ self.release = '3.0.6'
3333 self.base_url = "http://docs.godotengine.org/en/#{self.version}/"
3434 end
3535
lib/docs/scrapers/graphite.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Graphite < UrlScraper
33 self.type = 'graphite'
4− self.release = '1.1.3'
4+ self.release = '1.1.4'
55 self.base_url = 'https://graphite.readthedocs.io/en/latest/'
66 self.links = {
77 code: 'https://github.com/graphite-project/graphite-web'
lib/docs/scrapers/haskell.rb+1−1
@@ -57,7 +57,7 @@ module Docs · 56 unmodified lines
5757 end
5858
5959 version '8' do
60− self.release = '8.2.1'
60+ self.release = '8.6.1'
6161 self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/"
6262 end
6363
lib/docs/scrapers/homebrew.rb+2−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Homebrew < UrlScraper
33 self.name = 'Homebrew'
44 self.type = 'simple'
5− self.release = '1.4.2'
5+ self.release = '1.8.1'
66 self.base_url = 'https://docs.brew.sh/'
77 self.links = {
88 home: 'https://brew.sh',
@@ -13,8 +13,7 @@ module Docs · 4 unmodified lines
1313
1414 options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' }
1515
16− options[:skip_patterns] = [/maintainer/i, /core\-contributor/i]
17− options[:skip] = %w(Kickstarter-Supporters.html)
16+ options[:skip_patterns] = [/maintainer/i, /core\-contributor/i, /kickstarter/i]
1817
1918 options[:attribution] = <<-HTML
2019 &copy; 2009&ndash;present Homebrew contributors<br>
lib/docs/scrapers/jasmine.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Jasmine < UrlScraper
33 self.type = 'simple'
4− self.release = '3.2.1'
4+ self.release = '3.3.0'
55 self.base_url = 'https://jasmine.github.io/api/3.2/'
66 self.root_path = 'index.html'
77 self.links = {
lib/docs/scrapers/julia.rb+2−2
@@ -8,12 +8,12 @@ module Docs · 7 unmodified lines
88 options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
99
1010 options[:attribution] = <<-HTML
11− &copy; 2009&ndash;2016 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
11+ &copy; 2009&ndash;2018 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors<br>
1212 Licensed under the MIT License.
1313 HTML
1414
1515 version '1.0' do
16− self.release = '1.0.0'
16+ self.release = '1.0.1'
1717 self.base_url = "https://docs.julialang.org/en/v#{release}/"
1818 self.type = 'julia'
1919
lib/docs/scrapers/koa.rb+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 module Docs
44 class Koa < Github
55 self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'
6− self.release = '2.5.1'
6+ self.release = '2.6.1'
77
88 self.root_path = 'api/index.md'
99 self.initial_paths = %w[
lib/docs/scrapers/leaflet.rb+1−1
@@ -20,7 +20,7 @@ module Docs · 19 unmodified lines
2020 HTML
2121
2222 version '1.3' do
23− self.release = '1.3.0'
23+ self.release = '1.3.4'
2424 self.base_url = "https://leafletjs.com/reference-#{release}.html"
2525 end
2626
lib/docs/scrapers/matplotlib.rb+29−11
@@ -6,7 +6,7 @@ module Docs · 5 unmodified lines
66 self.type = 'sphinx'
77 self.root_path = 'index.html'
88 self.links = {
9− home: 'http://matplotlib.org/',
9+ home: 'https://matplotlib.org/',
1010 code: 'https://github.com/matplotlib/matplotlib'
1111 }
1212
@@ -16,34 +16,52 @@ module Docs · 3 unmodified lines
1616 options[:skip] = %w(api_changes.html tutorial.html faq.html)
1717
1818 options[:attribution] = <<-HTML
19− &copy; 2012&ndash;2017 Matplotlib Development Team. All rights reserved.<br>
19+ &copy; 2012&ndash;2018 Matplotlib Development Team. All rights reserved.<br>
2020 Licensed under the Matplotlib License Agreement.
2121 HTML
2222
23+ version '3.0' do
24+ self.release = '3.0.0'
25+ self.base_urls = [
26+ "https://matplotlib.org/#{release}/api/",
27+ "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
28+ "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
29+ ]
30+ end
31+
32+ version '2.2' do
33+ self.release = '2.2.3'
34+ self.base_urls = [
35+ "https://matplotlib.org/#{release}/api/",
36+ "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
37+ "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
38+ ]
39+ end
40+
2341 version '2.1' do
2442 self.release = '2.1.0'
2543 self.base_urls = [
26− "http://matplotlib.org/#{release}/api/",
27− "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
28− "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
44+ "https://matplotlib.org/#{release}/api/",
45+ "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
46+ "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
2947 ]
3048 end
3149
3250 version '2.0' do
3351 self.release = '2.0.2'
3452 self.base_urls = [
35− "http://matplotlib.org/#{release}/api/",
36− "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
37− "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
53+ "https://matplotlib.org/#{release}/api/",
54+ "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
55+ "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
3856 ]
3957 end
4058
4159 version '1.5' do
4260 self.release = '1.5.3'
4361 self.base_urls = [
44− "http://matplotlib.org/#{release}/api/",
45− "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
46− "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
62+ "https://matplotlib.org/#{release}/api/",
63+ "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
64+ "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
4765 ]
4866 end
4967 end
lib/docs/scrapers/mocha.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Mocha < UrlScraper
33 self.type = 'simple'
4− self.release = '5.0.1'
4+ self.release = '5.2.0'
55 self.base_url = 'https://mochajs.org/'
66 self.links = {
77 home: 'https://mochajs.org/',
lib/docs/scrapers/nginx.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Nginx < UrlScraper
33 self.name = 'nginx'
44 self.type = 'nginx'
5− self.release = '1.15.0'
5+ self.release = '1.15.5'
66 self.base_url = 'https://nginx.org/en/docs/'
77 self.links = {
88 home: 'https://nginx.org/',
lib/docs/scrapers/nim.rb+2−2
@@ -1,7 +1,7 @@
11 module Docs
22 class Nim < UrlScraper
33 self.type = 'simple'
4− self.release = '0.18.0'
4+ self.release = '0.19.0'
55 self.base_url = 'https://nim-lang.org/docs/'
66 self.root_path = 'overview.html'
77 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
1414 options[:skip] = %w(theindex.html docgen.txt)
1515
1616 options[:attribution] = <<-HTML
17− &copy; 2006&ndash;2017 Andreas Rumpf<br>
17+ &copy; 2006&ndash;2018 Andreas Rumpf<br>
1818 Licensed under the MIT License.
1919 HTML
2020 end
lib/docs/scrapers/node.rb+7−2
@@ -23,12 +23,17 @@ module Docs · 22 unmodified lines
2323 HTML
2424
2525 version do
26− self.release = '10.9.0'
26+ self.release = '11.1.0'
27+ self.base_url = 'https://nodejs.org/dist/latest-v11.x/docs/api/'
28+ end
29+
30+ version '10 LTS' do
31+ self.release = '10.13.0'
2732 self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/'
2833 end
2934
3035 version '8 LTS' do
31− self.release = '8.11.4'
36+ self.release = '8.12.0'
3237 self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'
3338 end
3439
lib/docs/scrapers/nokogiri2.rb+8−4
@@ -1,9 +1,13 @@
11 module Docs
22 class Nokogiri2 < Rdoc
3+ # Instructions:
4+ # 1. Download the latest release at https://github.com/sparklemotion/nokogiri/releases
5+ # 2. Run "bundle install && bundle exec rake docs" (in the Nokogiri directory)
6+ # 4. Copy the "doc" directory to "docs/nokgiri"
7+
38 self.name = 'Nokogiri'
49 self.slug = 'nokogiri'
5− self.release = '1.8.1'
6− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Nokogiri'
10+ self.release = '1.9.0'
711
812 html_filters.replace 'rdoc/entries', 'nokogiri2/entries'
913
@@ -11,8 +15,8 @@ module Docs · 1 unmodified line
1115 options[:only_patterns] = [/\ANokogiri/, /\AXSD/]
1216
1317 options[:attribution] = <<-HTML
14− &copy; 2008&ndash;2017 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo<br>
15− Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid<br>
18+ &copy; 2008&ndash;2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,<br>
19+ Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis<br>
1620 Licensed under the MIT License.
1721 HTML
1822 end
lib/docs/scrapers/numpy.rb+0−1
@@ -2,7 +2,6 @@ module Docs · 1 unmodified line
22 class Numpy < FileScraper
33 self.name = 'NumPy'
44 self.type = 'sphinx'
5− self.dir = '/Users/Thibaut/DevDocs/Docs/numpy/reference/'
65 self.root_path = 'index.html'
76 self.links = {
87 home: 'http://www.numpy.org/',
lib/docs/scrapers/openjdk.rb+2−3
@@ -1,11 +1,10 @@
11 module Docs
22 class Openjdk < FileScraper
3+ # Downloaded from packages.debian.org/sid/openjdk-8-doc
4+ # Extracting subdirectory /usr/share/doc/openjdk-8-jre-headless/api
35 self.name = 'OpenJDK'
46 self.type = 'openjdk'
57 self.root_path = 'overview-summary.html'
6− # Downloaded from packages.debian.org/sid/openjdk-8-doc
7− # Extracting subdirectory /usr/share/doc/openjdk-8-jre-headless/api
8− self.dir = '/Users/Thibaut/DevDocs/Docs/OpenJDK'
98
109 html_filters.insert_after 'internal_urls', 'openjdk/clean_urls'
1110 html_filters.push 'openjdk/entries', 'openjdk/clean_html'
lib/docs/scrapers/pandas.rb+5−0
@@ -20,6 +20,11 @@ module Docs · 19 unmodified lines
2020 Licensed under the 3-clause BSD License.
2121 HTML
2222
23+ version '0.23' do
24+ self.release = '0.23.4'
25+ self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/"
26+ end
27+
2328 version '0.22' do
2429 self.release = '0.22.0'
2530 self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/"
lib/docs/scrapers/perl.rb+0−1
@@ -2,7 +2,6 @@ module Docs · 1 unmodified line
22 class Perl < FileScraper
33 self.name = 'Perl'
44 self.type = 'perl'
5− self.dir = '/Users/Thibaut/DevDocs/Docs/Perl'
65 self.root_path = 'index.html'
76 self.links = {
87 home: 'https://www.perl.org/'
lib/docs/scrapers/phoenix.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Phoenix < UrlScraper
33 self.type = 'elixir'
4− self.release = '1.3.2'
4+ self.release = '1.3.4'
55 self.base_url = 'https://hexdocs.pm/'
66 self.root_path = 'phoenix/Phoenix.html'
77 self.initial_paths = %w(
lib/docs/scrapers/php.rb+2−3
@@ -1,5 +1,7 @@
11 module Docs
22 class Php < FileScraper
3+ # Downloaded from php.net/download-docs.php
4+
35 include FixInternalUrlsBehavior
46
57 self.name = 'PHP'
@@ -23,9 +25,6 @@ module Docs · 17 unmodified lines
2325 code: 'https://git.php.net/?p=php-src.git;a=summary'
2426 }
2527
26− # Downloaded from php.net/download-docs.php
27− self.dir = '/Users/Thibaut/DevDocs/Docs/PHP'
28−
2928 html_filters.push 'php/internal_urls', 'php/entries', 'php/clean_html', 'title'
3029 text_filters.push 'php/fix_urls'
3130
lib/docs/scrapers/puppeteer.rb+1−1
@@ -1,6 +1,6 @@
11 module Docs
22 class Puppeteer < Github
3− self.release = '1.8.0'
3+ self.release = '1.10.0'
44 self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md'
55 self.links = {
66 code: 'https://github.com/GoogleChrome/puppeteer'
lib/docs/scrapers/python.rb+4−8
@@ -23,33 +23,29 @@ module Docs · 22 unmodified lines
2323 Licensed under the PSF License.
2424 HTML
2525
26− version '3.7' do
26+ version '3.7' do # docs.python.org/3.7/download.html
2727 self.release = '3.7.0'
28− self.dir = '/Users/Thibaut/DevDocs/Docs/Python37' # docs.python.org/3.7/download.html
2928 self.base_url = 'https://docs.python.org/3.7/'
3029
3130 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
3231 end
3332
34− version '3.6' do
33+ version '3.6' do # docs.python.org/3.6/download.html
3534 self.release = '3.6.6'
36− self.dir = '/Users/Thibaut/DevDocs/Docs/Python36' # docs.python.org/3.6/download.html
3735 self.base_url = 'https://docs.python.org/3.6/'
3836
3937 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
4038 end
4139
42− version '3.5' do
40+ version '3.5' do # docs.python.org/3.5/download.html
4341 self.release = '3.5.3'
44− self.dir = '/Users/Thibaut/DevDocs/Docs/Python35' # docs.python.org/3.5/download.html
4542 self.base_url = 'https://docs.python.org/3.5/'
4643
4744 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
4845 end
4946
50− version '2.7' do
47+ version '2.7' do # docs.python.org/2.7/download.html
5148 self.release = '2.7.13'
52− self.dir = '/Users/Thibaut/DevDocs/Docs/Python27' # docs.python.org/2.7/download.html
5349 self.base_url = 'https://docs.python.org/2.7/'
5450
5551 html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'
lib/docs/scrapers/rdoc/minitest.rb+7−2
@@ -1,9 +1,14 @@
11 module Docs
22 class Minitest < Rdoc
3+ # Instructions:
4+ # 1. Run "gem update rdoc hoe"
5+ # 2. Download the source code at https://github.com/seattlerb/minitest
6+ # 3. Run "rake docs" (in the Minitest directory)
7+ # 4. Copy the "docs" directory to "docs/minitest"
8+
39 self.name = 'Ruby / Minitest'
410 self.slug = 'minitest'
5− self.release = '5.10.3'
6− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Minitest' # rake docs
11+ self.release = '5.11.3'
712 self.links = {
813 code: 'https://github.com/seattlerb/minitest'
914 }
lib/docs/scrapers/rdoc/rails.rb+10−3
@@ -1,10 +1,17 @@
11 module Docs
22 class Rails < Rdoc
3+ # Instructions:
4+ # 1. Download a release at https://github.com/rails/rails/releases
5+ # 2. Open "railties/lib/rails/api/task.rb" and comment out any code related to sdoc ("configure_sdoc")
6+ # 3. Run "bundle install --without db && bundle exec rake rdoc" (in the Rails directory)
7+ # 4. Run "cd guides && bundle exec rake guides:generate:html"
8+ # 5. Copy the "guides/output" directory to "html/guides"
9+ # 6. Copy the "html" directory to "docs/rails~[version]"
10+
311 include FixInternalUrlsBehavior
412
513 self.name = 'Ruby on Rails'
614 self.slug = 'rails'
7− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails'
815 self.initial_paths = %w(guides/index.html)
916 self.links = {
1017 home: 'http://rubyonrails.org/',
@@ -68,7 +75,7 @@ module Docs · 57 unmodified lines
6875 end
6976
7077 version '5.2' do
71− self.release = '5.2.0'
78+ self.release = '5.2.2'
7279 end
7380
7481 version '5.1' do
@@ -80,7 +87,7 @@ module Docs · 5 unmodified lines
8087 end
8188
8289 version '4.2' do
83− self.release = '4.2.10'
90+ self.release = '4.2.11'
8491 end
8592
8693 version '4.1' do
lib/docs/scrapers/rdoc/ruby.rb+8−19
@@ -1,16 +1,9 @@
11 module Docs
22 class Ruby < Rdoc
3− # Generated with:
4− # ./configure && make html
5− # or:
6− # rdoc \
7− # --root . \
8− # --page-dir doc \
9− # --encoding=UTF-8 \
10− # --visibility=public \
11− # --format=darkfish \
12− # --no-line-numbers \
13− # --op html .
3+ # Instructions:
4+ # 1. Download Ruby's source code
5+ # 2. Run "./configure && make html" (in the Ruby directory)
6+ # 3. Copy the ".ext/html" directory to "docs/ruby~[version]"
147
158 include FixInternalUrlsBehavior
169
@@ -77,23 +70,19 @@ module Docs · 60 unmodified lines
7770 HTML
7871
7972 version '2.5' do
80− self.release = '2.5.0'
81− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby25'
73+ self.release = '2.5.3'
8274 end
8375
8476 version '2.4' do
85− self.release = '2.4.3'
86− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby24'
77+ self.release = '2.4.5'
8778 end
8879
8980 version '2.3' do
90− self.release = '2.3.6'
91− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby23'
81+ self.release = '2.3.8'
9282 end
9383
9484 version '2.2' do
95− self.release = '2.2.9'
96− self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby22'
85+ self.release = '2.2.10'
9786 end
9887 end
9988 end
lib/docs/scrapers/react.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class React < UrlScraper
33 self.name = 'React'
44 self.type = 'simple'
5− self.release = '16.4.0'
5+ self.release = '16.6.0'
66 self.base_url = 'https://reactjs.org/docs/'
77 self.root_path = 'hello-world.html'
88 self.links = {
lib/docs/scrapers/redis.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Redis < UrlScraper
33 self.type = 'redis'
4− self.release = '4.0.11'
4+ self.release = '5.0.0'
55 self.base_url = 'https://redis.io/commands'
66 self.links = {
77 home: 'https://redis.io/',
lib/docs/scrapers/rust.rb+4−1
@@ -1,7 +1,9 @@
1+# frozen_string_literal: true
2+
13 module Docs
24 class Rust < UrlScraper
35 self.type = 'rust'
4− self.release = '1.29.1'
6+ self.release = '1.30.1'
57 self.base_url = 'https://doc.rust-lang.org/'
68 self.root_path = 'book/second-edition/index.html'
79 self.initial_paths = %w(
@@ -28,6 +30,7 @@ module Docs · 20 unmodified lines
2830 options[:fix_urls] = ->(url) do
2931 url.sub! %r{(#{Rust.base_url}.+/)\z}, '\1index.html'
3032 url.sub! '/unicode/u_str', '/unicode/str/'
33+ url.sub! '/std/std/', '/std/'
3134 url
3235 end
3336
lib/docs/scrapers/scikit_image.rb+2−2
@@ -3,8 +3,8 @@ module Docs · 2 unmodified lines
33 self.name = 'scikit-image'
44 self.slug = 'scikit_image'
55 self.type = 'sphinx'
6− self.release = '0.13.1'
7− self.base_url = 'http://scikit-image.org/docs/0.13.x/'
6+ self.release = '0.14.1'
7+ self.base_url = 'http://scikit-image.org/docs/0.14.x/'
88 self.links = {
99 home: 'http://scikit-image.org/',
1010 code: 'https://github.com/scikit-image/scikit-image'
lib/docs/scrapers/scikit_learn.rb+2−2
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 self.name = 'scikit-learn'
44 self.slug = 'scikit_learn'
55 self.type = 'sphinx'
6− self.release = '0.19.1'
6+ self.release = '0.20.0'
77 self.base_url = 'http://scikit-learn.org/stable/'
88 self.root_path = 'documentation.html'
99 self.force_gzip = true
@@ -21,7 +21,7 @@ module Docs · 11 unmodified lines
2121 options[:max_image_size] = 256_000
2222
2323 options[:attribution] = <<-HTML
24− &copy; 2007&ndash;2017 The scikit-learn developers<br>
24+ &copy; 2007&ndash;2018 The scikit-learn developers<br>
2525 Licensed under the 3-clause BSD License.
2626 HTML
2727
lib/docs/scrapers/sinon.rb+13−8
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44 self.slug = 'sinon'
55 self.type = 'sinon'
66 self.links = {
7− home: 'http://sinonjs.org/',
7+ home: 'https://sinonjs.org/',
88 code: 'https://github.com/sinonjs/sinon'
99 }
1010
@@ -18,34 +18,39 @@ module Docs · 7 unmodified lines
1818 Licensed under the BSD License.
1919 HTML
2020
21+ version '7' do
22+ self.release = '7.1.1'
23+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
24+ end
25+
2126 version '6' do
22− self.release = '6.1.3'
23− self.base_url = "http://sinonjs.org/releases/v#{release}/"
27+ self.release = '6.3.5'
28+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
2429 end
2530
2631 version '5' do
2732 self.release = '5.1.0'
28− self.base_url = "http://sinonjs.org/releases/v#{release}/"
33+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
2934 end
3035
3136 version '4' do
3237 self.release = '4.5.0'
33− self.base_url = "http://sinonjs.org/releases/v#{release}/"
38+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
3439 end
3540
3641 version '3' do
3742 self.release = '3.3.0'
38− self.base_url = "http://sinonjs.org/releases/v#{release}/"
43+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
3944 end
4045
4146 version '2' do
4247 self.release = '2.4.1'
43− self.base_url = "http://sinonjs.org/releases/v#{release}/"
48+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
4449 end
4550
4651 version '1' do
4752 self.release = '1.17.7'
48− self.base_url = "http://sinonjs.org/releases/v#{release}/"
53+ self.base_url = "https://sinonjs.org/releases/v#{release}/"
4954 end
5055 end
5156 end
lib/docs/scrapers/sqlite.rb+1−2
@@ -2,8 +2,7 @@ module Docs · 1 unmodified line
22 class Sqlite < FileScraper
33 self.name = 'SQLite'
44 self.type = 'sqlite'
5− self.release = '3.23.1'
6− self.dir = '/Users/Thibaut/DevDocs/Docs/sqlite/'
5+ self.release = '3.25.2'
76 self.base_url = 'https://sqlite.org/'
87 self.root_path = 'docs.html'
98 self.initial_paths = %w(keyword_index.html)
lib/docs/scrapers/statsmodels.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Statsmodels < UrlScraper
33 self.type = 'sphinx'
4− self.release = '0.8.0'
4+ self.release = '0.9.0'
55 self.base_url = 'http://www.statsmodels.org/stable/'
66 self.root_path = 'index.html'
77 self.links = {
lib/docs/scrapers/symfony.rb+13−8
@@ -26,44 +26,49 @@ module Docs · 25 unmodified lines
2626 Licensed under the MIT License.
2727 HTML
2828
29+ version '4.1' do
30+ self.release = '4.1.7'
31+ self.base_url = "https://api.symfony.com/#{version}/"
32+ end
33+
2934 version '4.0' do
3035 self.release = '4.0.3'
31− self.base_url = "http://api.symfony.com/#{version}/"
36+ self.base_url = "https://api.symfony.com/#{version}/"
3237 end
3338
3439 version '3.4' do
3540 self.release = '3.4.3'
36− self.base_url = "http://api.symfony.com/#{version}/"
41+ self.base_url = "https://api.symfony.com/#{version}/"
3742 end
3843
3944 version '3.3' do
4045 self.release = '3.3.15'
41− self.base_url = "http://api.symfony.com/#{version}/"
46+ self.base_url = "https://api.symfony.com/#{version}/"
4247 end
4348
4449 version '3.2' do
4550 self.release = '3.2.13'
46− self.base_url = "http://api.symfony.com/#{version}/"
51+ self.base_url = "https://api.symfony.com/#{version}/"
4752 end
4853
4954 version '3.1' do
5055 self.release = '3.1.8'
51− self.base_url = "http://api.symfony.com/#{version}/"
56+ self.base_url = "https://api.symfony.com/#{version}/"
5257 end
5358
5459 version '3.0' do
5560 self.release = '3.0.1'
56− self.base_url = "http://api.symfony.com/#{version}/"
61+ self.base_url = "https://api.symfony.com/#{version}/"
5762 end
5863
5964 version '2.8' do
6065 self.release = '2.8.28'
61− self.base_url = "http://api.symfony.com/#{version}/"
66+ self.base_url = "https://api.symfony.com/#{version}/"
6267 end
6368
6469 version '2.7' do
6570 self.release = '2.7.35'
66− self.base_url = "http://api.symfony.com/#{version}/"
71+ self.base_url = "https://api.symfony.com/#{version}/"
6772 end
6873 end
6974 end
lib/docs/scrapers/twig.rb+6−6
@@ -4,14 +4,14 @@ module Docs · 3 unmodified lines
44 self.root_path = 'index.html'
55 self.initial_paths = %w(extensions/index.html)
66 self.links = {
7− home: 'https://twig.sensiolabs.org/',
7+ home: 'https://twig.symfony.com/',
88 code: 'https://github.com/twigphp/Twig'
99 }
1010
1111 options[:attribution] = <<-HTML
12− &copy; 2009&ndash;2017 by the Twig Team<br>
12+ &copy; 2009&ndash;2018 by the Twig Team<br>
1313 Licensed under the three clause BSD license.<br>
14− The Twig logo is &copy; 2010&ndash;2017 SensioLabs
14+ The Twig logo is &copy; 2010&ndash;2018 Symfony
1515 HTML
1616
1717 html_filters.push 'twig/clean_html', 'twig/entries'
@@ -20,13 +20,13 @@ module Docs · 2 unmodified lines
2020 options[:skip] = %w(deprecated.html advanced_legacy.html)
2121
2222 version '2' do
23− self.release = '2.4.3'
24− self.base_url = 'https://twig.sensiolabs.org/doc/2.x/'
23+ self.release = '2.5.0'
24+ self.base_url = 'https://twig.symfony.com/doc/2.x/'
2525 end
2626
2727 version '1' do
2828 self.release = '1.34.3'
29− self.base_url = 'https://twig.sensiolabs.org/doc/1.x/'
29+ self.base_url = 'https://twig.symfony.com/doc/1.x/'
3030 end
3131 end
3232 end
lib/docs/scrapers/typescript.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Typescript < UrlScraper
33 self.name = 'TypeScript'
44 self.type = 'simple'
5− self.release = '3.0.1'
5+ self.release = '3.1.6'
66 self.base_url = 'https://www.typescriptlang.org/docs/'
77 self.root_path = 'tutorial.html'
88 self.links = {
lib/docs/scrapers/underscore.rb+4−4
@@ -3,10 +3,10 @@ module Docs · 2 unmodified lines
33 self.name = 'Underscore.js'
44 self.slug = 'underscore'
55 self.type = 'underscore'
6− self.release = '1.9.0'
7− self.base_url = 'http://underscorejs.org'
6+ self.release = '1.9.1'
7+ self.base_url = 'https://underscorejs.org'
88 self.links = {
9− home: 'http://underscorejs.org',
9+ home: 'https://underscorejs.org',
1010 code: 'https://github.com/jashkenas/underscore'
1111 }
1212
@@ -17,7 +17,7 @@ module Docs · 4 unmodified lines
1717 options[:skip_links] = true
1818
1919 options[:attribution] = <<-HTML
20− &copy; 2009&ndash;2017 Jeremy Ashkenas, DocumentCloud and Investigative Reporters &amp; Editors<br>
20+ &copy; 2009&ndash;2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters &amp; Editors<br>
2121 Licensed under the MIT License.
2222 HTML
2323 end
lib/docs/scrapers/vagrant.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Vagrant < UrlScraper
33 self.name = 'Vagrant'
44 self.type = 'simple'
5− self.release = '2.1.1'
5+ self.release = '2.2.0'
66 self.base_url = 'https://www.vagrantup.com/docs/'
77 self.root_path = 'index.html'
88 self.links = {
lib/docs/scrapers/yarn.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Yarn < UrlScraper
33 self.type = 'simple'
4− self.release = '1.9.4'
4+ self.release = '1.12.1'
55 self.base_url = 'https://yarnpkg.com/en/docs/'
66 self.links = {
77 home: 'https://yarnpkg.com/',
lib/docs/subscribers/requester_subscriber.rb+13−0
@@ -0,0 +1,13 @@
1+# frozen_string_literal: true
2+
3+module Docs
4+ class RequesterSubscriber < Subscriber
5+ self.namespace = 'requester'
6+
7+ def handle_response(event)
8+ if event.duration > 10_000
9+ log "WARN: #{format_url event.payload[:url]} was slow to process (#{(event.duration / 1000).round}s)"
10+ end
11+ end
12+ end
13+end