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
95 false95 false
96 end96 end
97 end97 end
98 rescue Docs::SetupError => error
99 puts "ERROR: #{error.message}"
100 false
98 end101 end
99 102
100 def store_pages(store)103 def store_pages(store)
@@ -118,6 +121,9 @@ module Docs · 17 unmodified lines
118 false121 false
119 end122 end
120 end123 end
124 rescue Docs::SetupError => error
125 puts "ERROR: #{error.message}"
126 false
121 end127 end
122 128
123 private129 private
lib/docs/core/requester.rb+8−4
@@ -1,5 +1,7 @@
1module Docs1module Docs
2 class Requester < Typhoeus::Hydra2 class Requester < Typhoeus::Hydra
3 include Instrumentable
4
3 attr_reader :request_options5 attr_reader :request_options
4 6
5 def self.run(urls, options = {}, &block)7 def self.run(urls, options = {}, &block)
@@ -20,7 +22,7 @@ module Docs · 14 unmodified lines
20 def initialize(options = {})22 def initialize(options = {})
21 @request_options = options.extract!(:request_options)[:request_options].try(:dup) || {}23 @request_options = options.extract!(:request_options)[:request_options].try(:dup) || {}
22 options[:max_concurrency] ||= 2024 options[:max_concurrency] ||= 20
23 options[:pipelining] = false25 options[:pipelining] = 0
24 super26 super
25 end27 end
26 28
@@ -52,9 +54,11 @@ module Docs · 25 unmodified lines
52 end54 end
53 55
54 def handle_response(response)56 def handle_response(response)
55 on_response.each do |callback|57 instrument 'handle_response.requester', url: response.url do
56 result = callback.call(response)58 on_response.each do |callback|
57 result.each { |url| request(url) } if result.is_a? Array59 result = callback.call(response)
60 result.each { |url| request(url) } if result.is_a?(Array)
61 end
58 end62 end
59 end63 end
60 end64 end
lib/docs/core/scrapers/file_scraper.rb+18−7
@@ -1,14 +1,13 @@
1module Docs1module Docs
2 class FileScraper < Scraper2 class FileScraper < Scraper
3 SOURCE_DIRECTORY = File.expand_path '../../../../../docs', __FILE__
4
3 Response = Struct.new :body, :url5 Response = Struct.new :body, :url
4 6
5 class << self7 class << self
6 attr_accessor :dir
7
8 def inherited(subclass)8 def inherited(subclass)
9 super9 super
10 subclass.base_url = base_url10 subclass.base_url = base_url
11 subclass.dir = dir
12 end11 end
13 end12 end
14 13
@@ -16,13 +15,25 @@ module Docs · 1 unmodified line
16 15
17 html_filters.push 'clean_local_urls'16 html_filters.push 'clean_local_urls'
18 17
18 def source_directory
19 @source_directory ||= File.join(SOURCE_DIRECTORY, self.class.path)
20 end
21
19 private22 private
20 23
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
21 def request_one(url)30 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)
23 end33 end
24 34
25 def request_all(urls)35 def request_all(urls)
36 assert_source_directory_exists
26 queue = [urls].flatten37 queue = [urls].flatten
27 until queue.empty?38 until queue.empty?
28 result = yield request_one(queue.shift)39 result = yield request_one(queue.shift)
@@ -34,12 +45,12 @@ module Docs · 5 unmodified lines
34 response.body.present?45 response.body.present?
35 end46 end
36 47
37 def file_path_for(url)48 def url_to_path(url)
38 File.join self.class.dir, url.remove(base_url.to_s)49 url.remove(base_url.to_s)
39 end50 end
40 51
41 def read_file(path)52 def read_file(path)
42 File.read(path)53 File.read(File.join(source_directory, path))
43 rescue54 rescue
44 instrument 'warn.doc', msg: "Failed to open file: #{path}"55 instrument 'warn.doc', msg: "Failed to open file: #{path}"
45 nil56 nil
lib/docs/core/url.rb+1−1
@@ -72,7 +72,7 @@ module Docs · 71 unmodified lines
72 72
73 if base == dest73 if base == dest
74 ''74 ''
75 elsif dest.start_with? File.join(base, '')75 elsif dest.start_with?(::File.join(base, ''))
76 url.path[(path.length)..-1]76 url.path[(path.length)..-1]
77 end77 end
78 end78 end
lib/docs/filters/codeceptjs/entries.rb+2−2
@@ -20,8 +20,8 @@ module Docs · 19 unmodified lines
20 def additional_entries20 def additional_entries
21 return [] unless subpath.start_with?('helpers') && subpath != 'helpers/'21 return [] unless subpath.start_with?('helpers') && subpath != 'helpers/'
22 22
23 css('h2').each_with_object [] do |node, entries|23 css('h2, h3').each_with_object [] do |node, entries|
24 next if node['id'] == 'access-from-helpers'24 next if node['id'] == 'access-from-helpers' || node.content !~ /\s*[a-z_]/
25 entries << ["#{node.content} (#{name})", node['id']]25 entries << ["#{node.content} (#{name})", node['id']]
26 end26 end
27 end27 end
lib/docs/filters/cordova/clean_html.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Cordova2 class Cordova
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 @doc = at_css('.page-content > div')5 @doc = at_css('#page-toc-source') || at_css('.page-content > div')
6 6
7 at_css('h1').content = 'Apache Cordova' if root_page?7 at_css('h1').content = 'Apache Cordova' if root_page?
8 8
lib/docs/filters/cpp/entries.rb+2−0
@@ -31,6 +31,8 @@ module Docs · 30 unmodified lines
31 'Keywords'31 'Keywords'
32 elsif subpath.start_with?('experimental')32 elsif subpath.start_with?('experimental')
33 'Experimental libraries'33 'Experimental libraries'
34 elsif subpath.start_with?('language/')
35 'Language'
34 elsif type = at_css('.t-navbar > div:nth-child(4) > :first-child').try(:content)36 elsif type = at_css('.t-navbar > div:nth-child(4) > :first-child').try(:content)
35 type.strip!37 type.strip!
36 type.remove! ' library'38 type.remove! ' library'
lib/docs/filters/css/entries.rb+17−10
@@ -6,13 +6,16 @@ module Docs · 5 unmodified lines
6 'CSS_Background_and_Borders' => 'Backgrounds & Borders',6 'CSS_Background_and_Borders' => 'Backgrounds & Borders',
7 'CSS_Columns' => 'Multi-column Layout',7 'CSS_Columns' => 'Multi-column Layout',
8 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout',8 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout',
9 'CSS_Fonts' => 'Fonts',
9 'CSS_Grid_Layout' => 'Grid Layout',10 'CSS_Grid_Layout' => 'Grid Layout',
10 'CSS_Images' => 'Images',11 'CSS_Images' => 'Images',
11 'CSS_Lists_and_Counters' => 'Lists',12 'CSS_Lists_and_Counters' => 'Lists',
12 'CSS_Transforms' => 'Transforms',13 'CSS_Transforms' => 'Transforms',
13 'Media_Queries' => 'Media Queries',14 'Media_Queries' => 'Media Queries',
15 'filter-function' => 'Filter Effects',
14 'transform-function' => 'Transforms',16 'transform-function' => 'Transforms',
15 '@media' => 'Media Queries',17 '@media' => 'Media Queries',
18 'overscroll' => 'Overscroll',
16 'text-size-adjust' => 'Miscellaneous',19 'text-size-adjust' => 'Miscellaneous',
17 'resolved_value' => 'Miscellaneous',20 'resolved_value' => 'Miscellaneous',
18 'touch-action' => 'Miscellaneous',21 'touch-action' => 'Miscellaneous',
@@ -42,7 +45,7 @@ module Docs · 23 unmodified lines
42 end45 end
43 46
44 def get_type47 def get_type
45 if slug.include?('-webkit') || slug.include?('-moz')48 if slug.include?('-webkit') || slug.include?('-moz') || slug.include?('-ms')
46 'Extensions'49 'Extensions'
47 elsif type = TYPE_BY_PATH[slug.split('/').first]50 elsif type = TYPE_BY_PATH[slug.split('/').first]
48 type51 type
@@ -66,19 +69,22 @@ module Docs · 17 unmodified lines
66 'Pseudo-Elements'69 'Pseudo-Elements'
67 elsif name.start_with?(':')70 elsif name.start_with?(':')
68 'Selectors'71 'Selectors'
72 elsif name.start_with?('display-')
73 'Display'
69 else74 else
70 'Miscellaneous'75 'Miscellaneous'
71 end76 end
72 end77 end
73 78
74 STATUSES = {79 STATUSES = {
75 'spec-Living' => 0,80 'spec-Living' => 0,
76 'spec-REC' => 1,81 'spec-REC' => 1,
77 'spec-CR' => 2,82 'spec-CR' => 2,
78 'spec-PR' => 3,83 'spec-PR' => 3,
79 'spec-LC' => 4,84 'spec-LC' => 4,
80 'spec-WD' => 5,85 'spec-WD' => 5,
81 'spec-ED' => 686 'spec-ED' => 6,
87 'spec-Obsolete' => 7
82 }88 }
83 89
84 PRIORITY_STATUSES = %w(spec-REC spec-CR)90 PRIORITY_STATUSES = %w(spec-REC spec-CR)
@@ -86,6 +92,7 @@ module Docs · 1 unmodified line
86 92
87 def get_spec93 def get_spec
88 return unless table = at_css('#Specifications + table') || css('.standard-table').last94 return unless table = at_css('#Specifications + table') || css('.standard-table').last
95
89 specs = table.css('tbody tr').to_a96 specs = table.css('tbody tr').to_a
90 # [link, span]97 # [link, span]
91 specs.map! { |node| [node.at_css('> td:nth-child(1) > a'), node.at_css('> td:nth-child(2) > span')] }98 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
110 'shape' => [117 'shape' => [
111 %w(rect() Syntax) ],118 %w(rect() Syntax) ],
112 'timing-function' => [119 'timing-function' => [
113 %w(cubic-bezier() The_cubic-bezier()_class_of_timing-functions),120 %w(cubic-bezier()),
114 %w(steps() The_steps()_class_of_timing-functions),121 %w(steps()),
115 %w(linear linear),122 %w(linear linear),
116 %w(ease ease),123 %w(ease ease),
117 %w(ease-in ease-in),124 %w(ease-in ease-in),
lib/docs/filters/dom/clean_html.rb+1−1
@@ -30,7 +30,7 @@ module Docs · 29 unmodified lines
30 end30 end
31 31
32 # Remove <div> wrapping .overheadIndicator32 # 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|
34 node.parent.replace(node)34 node.parent.replace(node)
35 end35 end
36 36
lib/docs/filters/dom/entries.rb+12−2
@@ -6,6 +6,7 @@ module Docs · 5 unmodified lines
6 'EXT_' => 'WebGL',6 'EXT_' => 'WebGL',
7 'OES_' => 'WebGL',7 'OES_' => 'WebGL',
8 'WEBGL_' => 'WebGL',8 'WEBGL_' => 'WebGL',
9 'Sensor API' => 'Sensors',
9 'Ambient Light' => 'Ambient Light',10 'Ambient Light' => 'Ambient Light',
10 'Audio' => 'Audio',11 'Audio' => 'Audio',
11 'Battery Status' => 'Battery Status',12 'Battery Status' => 'Battery Status',
@@ -22,10 +23,12 @@ module Docs · 10 unmodified lines
22 'Encrypted Media Extensions' => 'Encrypted Media',23 'Encrypted Media Extensions' => 'Encrypted Media',
23 'Fetch' => 'Fetch',24 'Fetch' => 'Fetch',
24 'File API' => 'File',25 'File API' => 'File',
26 'Fullscreen' => 'Fullscreen',
25 'Geolocation' => 'Geolocation',27 'Geolocation' => 'Geolocation',
26 'Geometry' => 'Geometry',28 'Geometry' => 'Geometry',
27 'High Resolution Time' => 'Performance',29 'High Resolution Time' => 'Performance',
28 'Intersection' => 'Intersection Observer',30 'Intersection' => 'Intersection Observer',
31 'Keyboard' => 'Keyboard',
29 'Media Capabilities' => 'Media',32 'Media Capabilities' => 'Media',
30 'Media Capture' => 'Media',33 'Media Capture' => 'Media',
31 'Media Session' => 'Media',34 'Media Session' => 'Media',
@@ -35,6 +38,7 @@ module Docs · 3 unmodified lines
35 'MIDI' => 'Audio',38 'MIDI' => 'Audio',
36 'Navigation Timing' => 'Performance',39 'Navigation Timing' => 'Performance',
37 'Network Information' => 'Network Information',40 'Network Information' => 'Network Information',
41 'Orientation Sensor' => 'Sensors',
38 'Payment' => 'Payments',42 'Payment' => 'Payments',
39 'Performance Timeline' => 'Performance',43 'Performance Timeline' => 'Performance',
40 'Pointer Events' => 'Pointer Events',44 'Pointer Events' => 'Pointer Events',
@@ -53,11 +57,13 @@ module Docs · 12 unmodified lines
53 'Web App Manifest' => 'Web App Manifest',57 'Web App Manifest' => 'Web App Manifest',
54 'Budget' => 'Budget',58 'Budget' => 'Budget',
55 'Web Authentication' => 'Authentication',59 'Web Authentication' => 'Authentication',
60 'Web Locks' => 'Locks',
56 'Web Workers' => 'Web Workers',61 'Web Workers' => 'Web Workers',
57 'WebGL' => 'WebGL',62 'WebGL' => 'WebGL',
58 'WebRTC' => 'WebRTC',63 'WebRTC' => 'WebRTC',
59 'WebUSB' => 'WebUSB',64 'WebUSB' => 'WebUSB',
60 'WebVR' => 'WebVR' }65 'WebVR' => 'WebVR',
66 'WebVTT' => 'WebVTT' }
61 67
62 TYPE_BY_NAME_STARTS_WITH = {68 TYPE_BY_NAME_STARTS_WITH = {
63 'AbortController' => 'Fetch',69 'AbortController' => 'Fetch',
@@ -89,10 +95,12 @@ module Docs · 25 unmodified lines
89 'Fetch' => 'Fetch',95 'Fetch' => 'Fetch',
90 'File' => 'File',96 'File' => 'File',
91 'GlobalEventHandlers' => 'GlobalEventHandlers',97 'GlobalEventHandlers' => 'GlobalEventHandlers',
98 'HMDVR' => 'WebVR',
92 'history' => 'History',99 'history' => 'History',
93 'HTML Drag' => 'Drag & Drop',100 'HTML Drag' => 'Drag & Drop',
94 'HTML' => 'Elements',101 'HTML' => 'Elements',
95 'IDB' => 'IndexedDB',102 'IDB' => 'IndexedDB',
103 'Keyboard' => 'Keyboard',
96 'location' => 'Location',104 'location' => 'Location',
97 'navigator' => 'Navigator',105 'navigator' => 'Navigator',
98 'MediaKeySession' => 'Encrypted Media',106 'MediaKeySession' => 'Encrypted Media',
@@ -122,6 +130,7 @@ module Docs · 23 unmodified lines
122 'StyleSheet' => 'CSS',130 'StyleSheet' => 'CSS',
123 'Stylesheet' => 'CSS',131 'Stylesheet' => 'CSS',
124 'SVG' => 'SVG',132 'SVG' => 'SVG',
133 'TextTrack' => 'WebVTT',
125 'TimeRanges' => 'Media',134 'TimeRanges' => 'Media',
126 'timing' => 'Performance',135 'timing' => 'Performance',
127 'Timing' => 'Performance',136 'Timing' => 'Performance',
@@ -160,6 +169,7 @@ module Docs · 32 unmodified lines
160 'timing' => 'Performance',169 'timing' => 'Performance',
161 'Timing' => 'Performance',170 'Timing' => 'Performance',
162 'udio' => 'Audio',171 'udio' => 'Audio',
172 'VRDevice' => 'WebVR',
163 'WebGL' => 'WebGL',173 'WebGL' => 'WebGL',
164 'WEBGL' => 'WebGL',174 'WEBGL' => 'WebGL',
165 'WebRTC' => 'WebRTC',175 'WebRTC' => 'WebRTC',
@@ -239,7 +249,7 @@ module Docs · 73 unmodified lines
239 249
240 def include_default_entry?250 def include_default_entry?
241 return true if type == 'Console'251 return true if type == 'Console'
242 return true unless node = doc.at_css('.overheadIndicator')252 return true unless node = doc.at_css('.overheadIndicator, .blockIndicator')
243 node = node.parent while node.parent != doc253 node = node.parent while node.parent != doc
244 return true if node.previous_element.try(:name).in?(%w(h2 h3))254 return true if node.previous_element.try(:name).in?(%w(h2 h3))
245 content = node.content255 content = node.content
lib/docs/filters/haskell/clean_html.rb+4−0
@@ -65,6 +65,10 @@ module Docs · 64 unmodified lines
65 end65 end
66 end66 end
67 67
68 css('pre code').each do |node|
69 node.before(node.children).remove
70 end
71
68 doc72 doc
69 end73 end
70 end74 end
lib/docs/filters/haskell/entries.rb+2−2
@@ -52,7 +52,7 @@ module Docs · 51 unmodified lines
52 return [] if subpath.start_with?('users_guide')52 return [] if subpath.start_with?('users_guide')
53 return [] if IGNORE_ENTRIES_PATHS.include?(subpath.split('/').last)53 return [] if IGNORE_ENTRIES_PATHS.include?(subpath.split('/').last)
54 54
55 css('#synopsis > ul > li').each_with_object [] do |node, entries|55 css('#synopsis > details > ul > li').each_with_object [] do |node, entries|
56 link = node.at_css('a')56 link = node.at_css('a')
57 name = node.content.strip57 name = node.content.strip
58 name.remove! %r{\A(?:module|data|newtype|class|type family m|type)\s+}58 name.remove! %r{\A(?:module|data|newtype|class|type family m|type)\s+}
@@ -75,7 +75,7 @@ module Docs · 16 unmodified lines
75 end75 end
76 76
77 def include_default_entry?77 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')
79 end79 end
80 end80 end
81 end81 end
lib/docs/filters/html/entries.rb+1−1
@@ -28,7 +28,7 @@ module Docs · 27 unmodified lines
28 28
29 def include_default_entry?29 def include_default_entry?
30 return false if %w(Element/Heading_Elements).include?(slug)30 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')
32 end32 end
33 33
34 def additional_entries34 def additional_entries
lib/docs/filters/javascript/clean_html.rb+2−2
@@ -11,12 +11,12 @@ module Docs · 10 unmodified lines
11 11
12 def other12 def other
13 # Remove "style" attribute13 # Remove "style" attribute
14 css('.inheritsbox', '.overheadIndicator').each do |node|14 css('.inheritsbox', '.overheadIndicator', '.blockIndicator').each do |node|
15 node.remove_attribute 'style'15 node.remove_attribute 'style'
16 end16 end
17 17
18 # Remove <div> wrapping .overheadIndicator18 # 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|
20 node.parent.replace(node)20 node.parent.replace(node)
21 end21 end
22 end22 end
lib/docs/filters/javascript/entries.rb+1−1
@@ -88,7 +88,7 @@ module Docs · 87 unmodified lines
88 end88 end
89 89
90 def include_default_entry?90 def include_default_entry?
91 node = doc.at_css '.overheadIndicator, .warning'91 node = doc.at_css '.blockIndicator, .warning'
92 92
93 # Can't use :first-child because #doc is a DocumentFragment93 # Can't use :first-child because #doc is a DocumentFragment
94 return true unless node && node.parent == doc && !node.previous_element94 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
14 '#Quick_Links',14 '#Quick_Links',
15 'hr']15 'hr']
16 16
17 BROWSER_UNNECESSARY_CLASS_REGEX = /\s*bc-browser[\w_-]+/
18
17 def call19 def call
18 css(*REMOVE_NODES).remove20 css(*REMOVE_NODES).remove
19 21
@@ -61,6 +63,94 @@ module Docs · 41 unmodified lines
61 node.previous_element << node63 node.previous_element << node
62 end64 end
63 65
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
64 doc154 doc
65 end155 end
66 end156 end
lib/docs/filters/node/clean_html.rb+1−1
@@ -16,7 +16,7 @@ module Docs · 15 unmodified lines
16 16
17 css('pre').each do |node|17 css('pre').each do |node|
18 if lang = node.at_css('code')['class']18 if lang = node.at_css('code')['class']
19 node['data-language'] = lang.remove('lang-')19 node['data-language'] = lang.remove(%r{lang(uage)?-})
20 end20 end
21 21
22 node.content = node.content22 node.content = node.content
lib/docs/filters/node/entries.rb+2−0
@@ -26,6 +26,7 @@ module Docs · 25 unmodified lines
26 26
27 def get_type27 def get_type
28 type = at_css('h1').content.strip28 type = at_css('h1').content.strip
29 type.remove! %r{\[.*\]}
29 REPLACE_TYPES[type] || "#{type.first.upcase}#{type[1..-1]}"30 REPLACE_TYPES[type] || "#{type.first.upcase}#{type[1..-1]}"
30 end31 end
31 32
@@ -40,6 +41,7 @@ module Docs · 8 unmodified lines
40 41
41 klass = nil if node.name == 'h2'42 klass = nil if node.name == 'h2'
42 name = node.content.strip43 name = node.content.strip
44 name.remove! %r{\s*\[src\]}
43 45
44 # Skip constructors46 # Skip constructors
45 if name.start_with? 'new '47 if name.start_with? 'new '
lib/docs/filters/rdoc/clean_html.rb+4−2
@@ -37,8 +37,10 @@ module Docs · 36 unmodified lines
37 end37 end
38 38
39 # Add class to differentiate Ruby code from C code39 # Add class to differentiate Ruby code from C code
40 css('.method-source-code > pre').each do |node|40 css('.method-source-code').each do |node|
41 node['class'] = node.at_css('.ruby-keyword') ? 'ruby' : 'c'41 node.parent.prepend_child(node)
42 pre = node.at_css('pre')
43 pre['class'] = pre.at_css('.ruby-keyword') ? 'ruby' : 'c'
42 end44 end
43 45
44 # Remove code highlighting46 # Remove code highlighting
lib/docs/filters/react/entries.rb+6−2
@@ -6,9 +6,11 @@ module Docs · 5 unmodified lines
6 end6 end
7 7
8 def get_type8 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
10 return 'Miscellaneous' unless link10 return 'Miscellaneous' unless link
11 link.ancestors('ul').last.previous_element.content11 type = link.ancestors('ul').last.previous_element.content
12 type.remove! %r{\s*\(.*\)}
13 type
12 end14 end
13 15
14 def additional_entries16 def additional_entries
@@ -25,6 +27,8 @@ module Docs · 10 unmodified lines
25 'Reference: Component'27 'Reference: Component'
26 elsif slug == 'react-api'28 elsif slug == 'react-api'
27 'Reference: React'29 'Reference: React'
30 elsif slug == 'hooks-reference'
31 'Hooks'
28 else32 else
29 'Reference'33 'Reference'
30 end34 end
lib/docs/filters/redis/entries.rb+1−1
@@ -21,7 +21,7 @@ module Docs · 20 unmodified lines
21 when 'PFADD' then 'HyperLogLog'21 when 'PFADD' then 'HyperLogLog'
22 when 'CLUSTER ADDSLOTS' then 'Cluster'22 when 'CLUSTER ADDSLOTS' then 'Cluster'
23 when 'GEOADD' then 'Geo'23 when 'GEOADD' then 'Geo'
24 when 'XADD' then 'Stream'24 when 'XACK' then 'Stream'
25 else 'Miscellaneous'25 else 'Miscellaneous'
26 end26 end
27 end27 end
lib/docs/filters/rust/clean_html.rb+4−2
@@ -1,3 +1,5 @@
1# frozen_string_literal: true
2
1module Docs3module Docs
2 class Rust4 class Rust
3 class CleanHtmlFilter < Filter5 class CleanHtmlFilter < Filter
@@ -74,10 +76,10 @@ module Docs · 70 unmodified lines
74 node.remove76 node.remove
75 end77 end
76 78
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|
78 content = node.at_css('.content.hidden .content')80 content = node.at_css('.content.hidden .content')
79 node.at_css('.content.hidden').replace(content) if content81 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))
81 end83 end
82 84
83 css('code.content').each do |node|85 css('code.content').each do |node|
lib/docs/filters/rust/entries.rb+5−6
@@ -43,13 +43,12 @@ module Docs · 42 unmodified lines
43 end43 end
44 else44 else
45 css('.method')45 css('.method')
46 .select {|node| !node.at_css('.fnname').nil?}46 .each_with_object({}) { |node, entries|
47 .map {|node|47 name = node.at_css('.fnname').try(:content)
48 name = node.at_css('.fnname').content48 next unless name
49 name.prepend "#{self.name}::"49 name.prepend "#{self.name}::"
50 [name, node['id']]50 entries[name] ||= [name, node['id']]
51 }51 }.values
52 .uniq {|item| item[0]}
53 end52 end
54 end53 end
55 end54 end
lib/docs/filters/sqlite/entries.rb+2−1
@@ -34,7 +34,8 @@ module Docs · 33 unmodified lines
34 'rtree' => 'R*Tree Module',34 'rtree' => 'R*Tree Module',
35 'rbu' => 'RBU Extension',35 'rbu' => 'RBU Extension',
36 'limits' => 'Limits',36 'limits' => 'Limits',
37 'howtocorrupt' => 'How To Corrupt'37 'howtocorrupt' => 'How To Corrupt',
38 'geopoly' => 'Geopoly'
38 }39 }
39 40
40 def get_type41 def get_type
lib/docs/scrapers/ansible.rb+21−1
@@ -15,8 +15,28 @@ module Docs · 14 unmodified lines
15 Licensed under the GNU General Public License version 3.15 Licensed under the GNU General Public License version 3.
16 HTML16 HTML
17 17
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
18 version '2.6' do38 version '2.6' do
19 self.release = '2.6.1'39 self.release = '2.6.7'
20 self.base_url = 'https://docs.ansible.com/ansible/2.6/'40 self.base_url = 'https://docs.ansible.com/ansible/2.6/'
21 41
22 options[:skip] = %w(42 options[:skip] = %w(
lib/docs/scrapers/apache.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 self.name = 'Apache HTTP Server'3 self.name = 'Apache HTTP Server'
4 self.slug = 'apache_http_server'4 self.slug = 'apache_http_server'
5 self.type = 'apache'5 self.type = 'apache'
6 self.release = '2.4.34'6 self.release = '2.4.37'
7 self.base_url = 'https://httpd.apache.org/docs/2.4/en/'7 self.base_url = 'https://httpd.apache.org/docs/2.4/en/'
8 self.links = {8 self.links = {
9 home: 'https://httpd.apache.org/'9 home: 'https://httpd.apache.org/'
lib/docs/scrapers/async.rb+2−2
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Async < UrlScraper2 class Async < UrlScraper
3 self.type = 'async'3 self.type = 'async'
4 self.release = '2.6.0'4 self.release = '2.6.1'
5 self.base_url = 'https://caolan.github.io/async/'5 self.base_url = 'https://caolan.github.io/async/'
6 self.root_path = 'docs.html'6 self.root_path = 'docs.html'
7 self.links = {7 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
14 options[:skip_links] = true14 options[:skip_links] = true
15 15
16 options[:attribution] = <<-HTML16 options[:attribution] = <<-HTML
17 &copy; 2010&ndash;2017 Caolan McMahon<br>17 &copy; 2010&ndash;2018 Caolan McMahon<br>
18 Licensed under the MIT License.18 Licensed under the MIT License.
19 HTML19 HTML
20 end20 end
lib/docs/scrapers/c.rb+0−1
@@ -1,7 +1,6 @@
1module Docs1module Docs
2 class C < FileScraper2 class C < FileScraper
3 self.type = 'c'3 self.type = 'c'
4 self.dir = '/Users/Thibaut/DevDocs/Docs/c'
5 self.base_url = 'http://en.cppreference.com/w/c/'4 self.base_url = 'http://en.cppreference.com/w/c/'
6 self.root_path = 'header.html'5 self.root_path = 'header.html'
7 6
lib/docs/scrapers/codeception.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Codeception < UrlScraper2 class Codeception < UrlScraper
3 self.name = 'Codeception'3 self.name = 'Codeception'
4 self.type = 'codeception'4 self.type = 'codeception'
5 self.release = '2.4.0'5 self.release = '2.5.1'
6 self.base_url = 'https://codeception.com/docs/'6 self.base_url = 'https://codeception.com/docs/'
7 self.root_path = 'index.html'7 self.root_path = 'index.html'
8 self.links = {8 self.links = {
lib/docs/scrapers/codeceptjs.rb+1−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 self.name = 'CodeceptJS'3 self.name = 'CodeceptJS'
4 self.type = 'simple'4 self.type = 'simple'
5 self.root_path = 'index.html'5 self.root_path = 'index.html'
6 self.release = '1.3.1'6 self.release = '1.4.4'
7 self.base_url = 'https://codecept.io/'7 self.base_url = 'https://codecept.io/'
8 self.links = {8 self.links = {
9 home: 'https://codecept.io/',9 home: 'https://codecept.io/',
lib/docs/scrapers/cordova.rb+6−1
@@ -24,10 +24,15 @@ module Docs · 23 unmodified lines
24 end24 end
25 25
26 options[:attribution] = <<-HTML26 options[:attribution] = <<-HTML
27 &copy; 2012&ndash;2017 The Apache Software Foundation<br>27 &copy; 2012&ndash;2018 The Apache Software Foundation<br>
28 Licensed under the Apache License 2.0.28 Licensed under the Apache License 2.0.
29 HTML29 HTML
30 30
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
31 version '7' do36 version '7' do
32 self.release = '7.1.0'37 self.release = '7.1.0'
33 self.base_url = 'https://cordova.apache.org/docs/en/7.x/'38 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
3 self.name = 'C++'3 self.name = 'C++'
4 self.slug = 'cpp'4 self.slug = 'cpp'
5 self.type = 'c'5 self.type = 'c'
6 self.dir = '/Users/Thibaut/DevDocs/Docs/cpp'
7 self.base_url = 'http://en.cppreference.com/w/cpp/'6 self.base_url = 'http://en.cppreference.com/w/cpp/'
8 self.root_path = 'header.html'7 self.root_path = 'header.html'
9 8
lib/docs/scrapers/crystal.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Crystal < UrlScraper2 class Crystal < UrlScraper
3 self.type = 'crystal'3 self.type = 'crystal'
4 self.release = '0.26.0'4 self.release = '0.27.0'
5 self.base_url = 'https://crystal-lang.org/'5 self.base_url = 'https://crystal-lang.org/'
6 self.root_path = "api/#{release}/index.html"6 self.root_path = "api/#{release}/index.html"
7 self.initial_paths = %w(docs/index.html)7 self.initial_paths = %w(docs/index.html)
lib/docs/scrapers/d.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class D < UrlScraper2 class D < UrlScraper
3 include MultipleBaseUrls3 include MultipleBaseUrls
4 4
5 self.release = '2.081.0'5 self.release = '2.083.0'
6 self.type = 'd'6 self.type = 'd'
7 self.base_urls = ['https://dlang.org/phobos/', 'https://dlang.org/spec/']7 self.base_urls = ['https://dlang.org/phobos/', 'https://dlang.org/spec/']
8 self.root_path = 'index.html'8 self.root_path = 'index.html'
lib/docs/scrapers/d3.rb+1−1
@@ -17,7 +17,7 @@ module Docs · 16 unmodified lines
17 HTML17 HTML
18 18
19 version '5' do19 version '5' do
20 self.release = '5.4.0'20 self.release = '5.7.0'
21 self.base_url = 'https://github.com/d3/'21 self.base_url = 'https://github.com/d3/'
22 self.root_path = 'd3/blob/master/API.md'22 self.root_path = 'd3/blob/master/API.md'
23 23
lib/docs/scrapers/dart.rb+0−2
@@ -24,13 +24,11 @@ module Docs · 23 unmodified lines
24 24
25 version '2' do25 version '2' do
26 self.release = '2.0.0'26 self.release = '2.0.0'
27 self.dir = '/Users/Thibaut/DevDocs/Docs/Dart2'
28 self.base_url = "https://api.dartlang.org/stable/#{release}/"27 self.base_url = "https://api.dartlang.org/stable/#{release}/"
29 end28 end
30 29
31 version '1' do30 version '1' do
32 self.release = '1.24.3'31 self.release = '1.24.3'
33 self.dir = '/Users/Thibaut/DevDocs/Docs/Dart1'
34 self.base_url = "https://api.dartlang.org/stable/#{release}/"32 self.base_url = "https://api.dartlang.org/stable/#{release}/"
35 end33 end
36 end34 end
lib/docs/scrapers/django.rb+0−6
@@ -36,37 +36,31 @@ module Docs · 35 unmodified lines
36 36
37 version '2.1' do37 version '2.1' do
38 self.release = '2.1.0'38 self.release = '2.1.0'
39 self.dir = '/Users/Thibaut/DevDocs/Docs/Django21'
40 self.base_url = 'https://docs.djangoproject.com/en/2.1/'39 self.base_url = 'https://docs.djangoproject.com/en/2.1/'
41 end40 end
42 41
43 version '2.0' do42 version '2.0' do
44 self.release = '2.0.7'43 self.release = '2.0.7'
45 self.dir = '/Users/Thibaut/DevDocs/Docs/Django20'
46 self.base_url = 'https://docs.djangoproject.com/en/2.0/'44 self.base_url = 'https://docs.djangoproject.com/en/2.0/'
47 end45 end
48 46
49 version '1.11' do47 version '1.11' do
50 self.release = '1.11.9'48 self.release = '1.11.9'
51 self.dir = '/Users/Thibaut/DevDocs/Docs/Django111'
52 self.base_url = 'https://docs.djangoproject.com/en/1.11/'49 self.base_url = 'https://docs.djangoproject.com/en/1.11/'
53 end50 end
54 51
55 version '1.10' do52 version '1.10' do
56 self.release = '1.10.8'53 self.release = '1.10.8'
57 self.dir = '/Users/Thibaut/DevDocs/Docs/Django110'
58 self.base_url = 'https://docs.djangoproject.com/en/1.10/'54 self.base_url = 'https://docs.djangoproject.com/en/1.10/'
59 end55 end
60 56
61 version '1.9' do57 version '1.9' do
62 self.release = '1.9.13'58 self.release = '1.9.13'
63 self.dir = '/Users/Thibaut/DevDocs/Docs/Django19'
64 self.base_url = 'https://docs.djangoproject.com/en/1.9/'59 self.base_url = 'https://docs.djangoproject.com/en/1.9/'
65 end60 end
66 61
67 version '1.8' do62 version '1.8' do
68 self.release = '1.8.18'63 self.release = '1.8.18'
69 self.dir = '/Users/Thibaut/DevDocs/Docs/Django18'
70 self.base_url = 'https://docs.djangoproject.com/en/1.8/'64 self.base_url = 'https://docs.djangoproject.com/en/1.8/'
71 end65 end
72 end66 end
lib/docs/scrapers/erlang.rb+0−4
@@ -42,22 +42,18 @@ module Docs · 41 unmodified lines
42 42
43 version '21' do43 version '21' do
44 self.release = '21.0'44 self.release = '21.0'
45 self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang21'
46 end45 end
47 46
48 version '20' do47 version '20' do
49 self.release = '20.3'48 self.release = '20.3'
50 self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang20'
51 end49 end
52 50
53 version '19' do51 version '19' do
54 self.release = '19.3'52 self.release = '19.3'
55 self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang19'
56 end53 end
57 54
58 version '18' do55 version '18' do
59 self.release = '18.3'56 self.release = '18.3'
60 self.dir = '/Users/Thibaut/DevDocs/Docs/Erlang18'
61 end57 end
62 end58 end
63end59end
lib/docs/scrapers/eslint.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Eslint < UrlScraper2 class Eslint < UrlScraper
3 self.name = 'ESLint'3 self.name = 'ESLint'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '4.19.0'5 self.release = '5.8.0'
6 self.base_url = 'https://eslint.org/docs/'6 self.base_url = 'https://eslint.org/docs/'
7 self.root_path = 'user-guide/getting-started'7 self.root_path = 'user-guide/getting-started'
8 self.links = {8 self.links = {
lib/docs/scrapers/flow.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Flow < UrlScraper2 class Flow < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '0.79.1'4 self.release = '0.85.0'
5 self.base_url = 'https://flow.org/en/docs/'5 self.base_url = 'https://flow.org/en/docs/'
6 self.links = {6 self.links = {
7 home: 'https://flow.org/',7 home: 'https://flow.org/',
lib/docs/scrapers/git.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Git < UrlScraper2 class Git < UrlScraper
3 self.type = 'git'3 self.type = 'git'
4 self.release = '2.17.0'4 self.release = '2.19.1'
5 self.base_url = 'https://git-scm.com/docs'5 self.base_url = 'https://git-scm.com/docs'
6 self.initial_paths = %w(/git.html)6 self.initial_paths = %w(/git.html)
7 self.links = {7 self.links = {
lib/docs/scrapers/gnu/gcc.rb+0−8
@@ -48,13 +48,11 @@ module Docs · 47 unmodified lines
48 48
49 version '7' do49 version '7' do
50 self.release = '7.3.0'50 self.release = '7.3.0'
51 self.dir = '/Users/Thibaut/DevDocs/Docs/gcc7'
52 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"51 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
53 end52 end
54 53
55 version '7 CPP' do54 version '7 CPP' do
56 self.release = '7.3.0'55 self.release = '7.3.0'
57 self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp7'
58 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"56 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
59 57
60 options[:replace_paths] = CPP_PATHS58 options[:replace_paths] = CPP_PATHS
@@ -62,7 +60,6 @@ module Docs · 1 unmodified line
62 60
63 version '6' do61 version '6' do
64 self.release = '6.4.0'62 self.release = '6.4.0'
65 self.dir = '/Users/Thibaut/DevDocs/Docs/gcc6'
66 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"63 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
67 64
68 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'65 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -70,7 +67,6 @@ module Docs · 1 unmodified line
70 67
71 version '6 CPP' do68 version '6 CPP' do
72 self.release = '6.4.0'69 self.release = '6.4.0'
73 self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp6'
74 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"70 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
75 71
76 options[:replace_paths] = CPP_PATHS72 options[:replace_paths] = CPP_PATHS
@@ -78,7 +74,6 @@ module Docs · 1 unmodified line
78 74
79 version '5' do75 version '5' do
80 self.release = '5.4.0'76 self.release = '5.4.0'
81 self.dir = '/Users/Thibaut/DevDocs/Docs/gcc5'
82 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"77 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
83 78
84 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'79 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -86,7 +81,6 @@ module Docs · 1 unmodified line
86 81
87 version '5 CPP' do82 version '5 CPP' do
88 self.release = '5.4.0'83 self.release = '5.4.0'
89 self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp5'
90 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"84 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
91 85
92 options[:replace_paths] = CPP_PATHS86 options[:replace_paths] = CPP_PATHS
@@ -94,7 +88,6 @@ module Docs · 1 unmodified line
94 88
95 version '4' do89 version '4' do
96 self.release = '4.9.3'90 self.release = '4.9.3'
97 self.dir = '/Users/Thibaut/DevDocs/Docs/gcc4'
98 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"91 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
99 92
100 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'93 options[:root_title] = 'Using the GNU Compiler Collection (GCC)'
@@ -102,7 +95,6 @@ module Docs · 1 unmodified line
102 95
103 version '4 CPP' do96 version '4 CPP' do
104 self.release = '4.9.3'97 self.release = '4.9.3'
105 self.dir = '/Users/Thibaut/DevDocs/Docs/gcpp4'
106 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"98 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
107 99
108 options[:replace_paths] = CPP_PATHS100 options[:replace_paths] = CPP_PATHS
lib/docs/scrapers/gnu/gnu_fortran.rb+0−4
@@ -8,25 +8,21 @@ module Docs · 7 unmodified lines
8 8
9 version '7' do9 version '7' do
10 self.release = '7.3.0'10 self.release = '7.3.0'
11 self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran7'
12 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"11 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
13 end12 end
14 13
15 version '6' do14 version '6' do
16 self.release = '6.4.0'15 self.release = '6.4.0'
17 self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran6'
18 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"16 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
19 end17 end
20 18
21 version '5' do19 version '5' do
22 self.release = '5.4.0'20 self.release = '5.4.0'
23 self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran5'
24 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"21 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
25 end22 end
26 23
27 version '4' do24 version '4' do
28 self.release = '4.9.3'25 self.release = '4.9.3'
29 self.dir = '/Users/Thibaut/DevDocs/Docs/gfortran4'
30 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"26 self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
31 end27 end
32 end28 end
lib/docs/scrapers/go.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Go < UrlScraper2 class Go < UrlScraper
3 self.type = 'go'3 self.type = 'go'
4 self.release = '1.10.1'4 self.release = '1.11.2'
5 self.base_url = 'https://golang.org/pkg/'5 self.base_url = 'https://golang.org/pkg/'
6 self.links = {6 self.links = {
7 home: 'https://golang.org/',7 home: 'https://golang.org/',
lib/docs/scrapers/godot.rb+1−1
@@ -29,7 +29,7 @@ module Docs · 28 unmodified lines
29 end29 end
30 30
31 version '3.0' do31 version '3.0' do
32 self.release = '3.0'32 self.release = '3.0.6'
33 self.base_url = "http://docs.godotengine.org/en/#{self.version}/"33 self.base_url = "http://docs.godotengine.org/en/#{self.version}/"
34 end34 end
35 35
lib/docs/scrapers/graphite.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Graphite < UrlScraper2 class Graphite < UrlScraper
3 self.type = 'graphite'3 self.type = 'graphite'
4 self.release = '1.1.3'4 self.release = '1.1.4'
5 self.base_url = 'https://graphite.readthedocs.io/en/latest/'5 self.base_url = 'https://graphite.readthedocs.io/en/latest/'
6 self.links = {6 self.links = {
7 code: 'https://github.com/graphite-project/graphite-web'7 code: 'https://github.com/graphite-project/graphite-web'
lib/docs/scrapers/haskell.rb+1−1
@@ -57,7 +57,7 @@ module Docs · 56 unmodified lines
57 end57 end
58 58
59 version '8' do59 version '8' do
60 self.release = '8.2.1'60 self.release = '8.6.1'
61 self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/"61 self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/"
62 end62 end
63 63
lib/docs/scrapers/homebrew.rb+2−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Homebrew < UrlScraper2 class Homebrew < UrlScraper
3 self.name = 'Homebrew'3 self.name = 'Homebrew'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '1.4.2'5 self.release = '1.8.1'
6 self.base_url = 'https://docs.brew.sh/'6 self.base_url = 'https://docs.brew.sh/'
7 self.links = {7 self.links = {
8 home: 'https://brew.sh',8 home: 'https://brew.sh',
@@ -13,8 +13,7 @@ module Docs · 4 unmodified lines
13 13
14 options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' }14 options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' }
15 15
16 options[:skip_patterns] = [/maintainer/i, /core\-contributor/i]16 options[:skip_patterns] = [/maintainer/i, /core\-contributor/i, /kickstarter/i]
17 options[:skip] = %w(Kickstarter-Supporters.html)
18 17
19 options[:attribution] = <<-HTML18 options[:attribution] = <<-HTML
20 &copy; 2009&ndash;present Homebrew contributors<br>19 &copy; 2009&ndash;present Homebrew contributors<br>
lib/docs/scrapers/jasmine.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Jasmine < UrlScraper2 class Jasmine < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '3.2.1'4 self.release = '3.3.0'
5 self.base_url = 'https://jasmine.github.io/api/3.2/'5 self.base_url = 'https://jasmine.github.io/api/3.2/'
6 self.root_path = 'index.html'6 self.root_path = 'index.html'
7 self.links = {7 self.links = {
lib/docs/scrapers/julia.rb+2−2
@@ -8,12 +8,12 @@ module Docs · 7 unmodified lines
8 options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]8 options[:only_patterns] = [/\Amanual\//, /\Astdlib\//]
9 9
10 options[:attribution] = <<-HTML10 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>
12 Licensed under the MIT License.12 Licensed under the MIT License.
13 HTML13 HTML
14 14
15 version '1.0' do15 version '1.0' do
16 self.release = '1.0.0'16 self.release = '1.0.1'
17 self.base_url = "https://docs.julialang.org/en/v#{release}/"17 self.base_url = "https://docs.julialang.org/en/v#{release}/"
18 self.type = 'julia'18 self.type = 'julia'
19 19
lib/docs/scrapers/koa.rb+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3module Docs3module Docs
4 class Koa < Github4 class Koa < Github
5 self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'5 self.base_url = 'https://github.com/koajs/koa/blob/master/docs/'
6 self.release = '2.5.1'6 self.release = '2.6.1'
7 7
8 self.root_path = 'api/index.md'8 self.root_path = 'api/index.md'
9 self.initial_paths = %w[9 self.initial_paths = %w[
lib/docs/scrapers/leaflet.rb+1−1
@@ -20,7 +20,7 @@ module Docs · 19 unmodified lines
20 HTML20 HTML
21 21
22 version '1.3' do22 version '1.3' do
23 self.release = '1.3.0'23 self.release = '1.3.4'
24 self.base_url = "https://leafletjs.com/reference-#{release}.html"24 self.base_url = "https://leafletjs.com/reference-#{release}.html"
25 end25 end
26 26
lib/docs/scrapers/matplotlib.rb+29−11
@@ -6,7 +6,7 @@ module Docs · 5 unmodified lines
6 self.type = 'sphinx'6 self.type = 'sphinx'
7 self.root_path = 'index.html'7 self.root_path = 'index.html'
8 self.links = {8 self.links = {
9 home: 'http://matplotlib.org/',9 home: 'https://matplotlib.org/',
10 code: 'https://github.com/matplotlib/matplotlib'10 code: 'https://github.com/matplotlib/matplotlib'
11 }11 }
12 12
@@ -16,34 +16,52 @@ module Docs · 3 unmodified lines
16 options[:skip] = %w(api_changes.html tutorial.html faq.html)16 options[:skip] = %w(api_changes.html tutorial.html faq.html)
17 17
18 options[:attribution] = <<-HTML18 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>
20 Licensed under the Matplotlib License Agreement.20 Licensed under the Matplotlib License Agreement.
21 HTML21 HTML
22 22
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
23 version '2.1' do41 version '2.1' do
24 self.release = '2.1.0'42 self.release = '2.1.0'
25 self.base_urls = [43 self.base_urls = [
26 "http://matplotlib.org/#{release}/api/",44 "https://matplotlib.org/#{release}/api/",
27 "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",45 "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
28 "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"46 "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
29 ]47 ]
30 end48 end
31 49
32 version '2.0' do50 version '2.0' do
33 self.release = '2.0.2'51 self.release = '2.0.2'
34 self.base_urls = [52 self.base_urls = [
35 "http://matplotlib.org/#{release}/api/",53 "https://matplotlib.org/#{release}/api/",
36 "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",54 "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
37 "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"55 "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
38 ]56 ]
39 end57 end
40 58
41 version '1.5' do59 version '1.5' do
42 self.release = '1.5.3'60 self.release = '1.5.3'
43 self.base_urls = [61 self.base_urls = [
44 "http://matplotlib.org/#{release}/api/",62 "https://matplotlib.org/#{release}/api/",
45 "http://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",63 "https://matplotlib.org/#{release}/mpl_toolkits/mplot3d/",
46 "http://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"64 "https://matplotlib.org/#{release}/mpl_toolkits/axes_grid/api/"
47 ]65 ]
48 end66 end
49 end67 end
lib/docs/scrapers/mocha.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Mocha < UrlScraper2 class Mocha < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '5.0.1'4 self.release = '5.2.0'
5 self.base_url = 'https://mochajs.org/'5 self.base_url = 'https://mochajs.org/'
6 self.links = {6 self.links = {
7 home: 'https://mochajs.org/',7 home: 'https://mochajs.org/',
lib/docs/scrapers/nginx.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Nginx < UrlScraper2 class Nginx < UrlScraper
3 self.name = 'nginx'3 self.name = 'nginx'
4 self.type = 'nginx'4 self.type = 'nginx'
5 self.release = '1.15.0'5 self.release = '1.15.5'
6 self.base_url = 'https://nginx.org/en/docs/'6 self.base_url = 'https://nginx.org/en/docs/'
7 self.links = {7 self.links = {
8 home: 'https://nginx.org/',8 home: 'https://nginx.org/',
lib/docs/scrapers/nim.rb+2−2
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Nim < UrlScraper2 class Nim < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '0.18.0'4 self.release = '0.19.0'
5 self.base_url = 'https://nim-lang.org/docs/'5 self.base_url = 'https://nim-lang.org/docs/'
6 self.root_path = 'overview.html'6 self.root_path = 'overview.html'
7 self.links = {7 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
14 options[:skip] = %w(theindex.html docgen.txt)14 options[:skip] = %w(theindex.html docgen.txt)
15 15
16 options[:attribution] = <<-HTML16 options[:attribution] = <<-HTML
17 &copy; 2006&ndash;2017 Andreas Rumpf<br>17 &copy; 2006&ndash;2018 Andreas Rumpf<br>
18 Licensed under the MIT License.18 Licensed under the MIT License.
19 HTML19 HTML
20 end20 end
lib/docs/scrapers/node.rb+7−2
@@ -23,12 +23,17 @@ module Docs · 22 unmodified lines
23 HTML23 HTML
24 24
25 version do25 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'
27 self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/'32 self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/'
28 end33 end
29 34
30 version '8 LTS' do35 version '8 LTS' do
31 self.release = '8.11.4'36 self.release = '8.12.0'
32 self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'37 self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'
33 end38 end
34 39
lib/docs/scrapers/nokogiri2.rb+8−4
@@ -1,9 +1,13 @@
1module Docs1module Docs
2 class Nokogiri2 < Rdoc2 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
3 self.name = 'Nokogiri'8 self.name = 'Nokogiri'
4 self.slug = 'nokogiri'9 self.slug = 'nokogiri'
5 self.release = '1.8.1'10 self.release = '1.9.0'
6 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Nokogiri'
7 11
8 html_filters.replace 'rdoc/entries', 'nokogiri2/entries'12 html_filters.replace 'rdoc/entries', 'nokogiri2/entries'
9 13
@@ -11,8 +15,8 @@ module Docs · 1 unmodified line
11 options[:only_patterns] = [/\ANokogiri/, /\AXSD/]15 options[:only_patterns] = [/\ANokogiri/, /\AXSD/]
12 16
13 options[:attribution] = <<-HTML17 options[:attribution] = <<-HTML
14 &copy; 2008&ndash;2017 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo<br>18 &copy; 2008&ndash;2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,<br>
15 Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid<br>19 Patrick Mahoney, Yoko Harada, Akinori Musha, John Shahid, Lars Kanis<br>
16 Licensed under the MIT License.20 Licensed under the MIT License.
17 HTML21 HTML
18 end22 end
lib/docs/scrapers/numpy.rb+0−1
@@ -2,7 +2,6 @@ module Docs · 1 unmodified line
2 class Numpy < FileScraper2 class Numpy < FileScraper
3 self.name = 'NumPy'3 self.name = 'NumPy'
4 self.type = 'sphinx'4 self.type = 'sphinx'
5 self.dir = '/Users/Thibaut/DevDocs/Docs/numpy/reference/'
6 self.root_path = 'index.html'5 self.root_path = 'index.html'
7 self.links = {6 self.links = {
8 home: 'http://www.numpy.org/',7 home: 'http://www.numpy.org/',
lib/docs/scrapers/openjdk.rb+2−3
@@ -1,11 +1,10 @@
1module Docs1module Docs
2 class Openjdk < FileScraper2 class Openjdk < FileScraper
3 # Downloaded from packages.debian.org/sid/openjdk-8-doc
4 # Extracting subdirectory /usr/share/doc/openjdk-8-jre-headless/api
3 self.name = 'OpenJDK'5 self.name = 'OpenJDK'
4 self.type = 'openjdk'6 self.type = 'openjdk'
5 self.root_path = 'overview-summary.html'7 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'
9 8
10 html_filters.insert_after 'internal_urls', 'openjdk/clean_urls'9 html_filters.insert_after 'internal_urls', 'openjdk/clean_urls'
11 html_filters.push 'openjdk/entries', 'openjdk/clean_html'10 html_filters.push 'openjdk/entries', 'openjdk/clean_html'
lib/docs/scrapers/pandas.rb+5−0
@@ -20,6 +20,11 @@ module Docs · 19 unmodified lines
20 Licensed under the 3-clause BSD License.20 Licensed under the 3-clause BSD License.
21 HTML21 HTML
22 22
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
23 version '0.22' do28 version '0.22' do
24 self.release = '0.22.0'29 self.release = '0.22.0'
25 self.base_url = "http://pandas.pydata.org/pandas-docs/version/#{self.release}/"30 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
2 class Perl < FileScraper2 class Perl < FileScraper
3 self.name = 'Perl'3 self.name = 'Perl'
4 self.type = 'perl'4 self.type = 'perl'
5 self.dir = '/Users/Thibaut/DevDocs/Docs/Perl'
6 self.root_path = 'index.html'5 self.root_path = 'index.html'
7 self.links = {6 self.links = {
8 home: 'https://www.perl.org/'7 home: 'https://www.perl.org/'
lib/docs/scrapers/phoenix.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Phoenix < UrlScraper2 class Phoenix < UrlScraper
3 self.type = 'elixir'3 self.type = 'elixir'
4 self.release = '1.3.2'4 self.release = '1.3.4'
5 self.base_url = 'https://hexdocs.pm/'5 self.base_url = 'https://hexdocs.pm/'
6 self.root_path = 'phoenix/Phoenix.html'6 self.root_path = 'phoenix/Phoenix.html'
7 self.initial_paths = %w(7 self.initial_paths = %w(
lib/docs/scrapers/php.rb+2−3
@@ -1,5 +1,7 @@
1module Docs1module Docs
2 class Php < FileScraper2 class Php < FileScraper
3 # Downloaded from php.net/download-docs.php
4
3 include FixInternalUrlsBehavior5 include FixInternalUrlsBehavior
4 6
5 self.name = 'PHP'7 self.name = 'PHP'
@@ -23,9 +25,6 @@ module Docs · 17 unmodified lines
23 code: 'https://git.php.net/?p=php-src.git;a=summary'25 code: 'https://git.php.net/?p=php-src.git;a=summary'
24 }26 }
25 27
26 # Downloaded from php.net/download-docs.php
27 self.dir = '/Users/Thibaut/DevDocs/Docs/PHP'
28
29 html_filters.push 'php/internal_urls', 'php/entries', 'php/clean_html', 'title'28 html_filters.push 'php/internal_urls', 'php/entries', 'php/clean_html', 'title'
30 text_filters.push 'php/fix_urls'29 text_filters.push 'php/fix_urls'
31 30
lib/docs/scrapers/puppeteer.rb+1−1
@@ -1,6 +1,6 @@
1module Docs1module Docs
2 class Puppeteer < Github2 class Puppeteer < Github
3 self.release = '1.8.0'3 self.release = '1.10.0'
4 self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md'4 self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.0/docs/api.md'
5 self.links = {5 self.links = {
6 code: 'https://github.com/GoogleChrome/puppeteer'6 code: 'https://github.com/GoogleChrome/puppeteer'
lib/docs/scrapers/python.rb+4−8
@@ -23,33 +23,29 @@ module Docs · 22 unmodified lines
23 Licensed under the PSF License.23 Licensed under the PSF License.
24 HTML24 HTML
25 25
26 version '3.7' do26 version '3.7' do # docs.python.org/3.7/download.html
27 self.release = '3.7.0'27 self.release = '3.7.0'
28 self.dir = '/Users/Thibaut/DevDocs/Docs/Python37' # docs.python.org/3.7/download.html
29 self.base_url = 'https://docs.python.org/3.7/'28 self.base_url = 'https://docs.python.org/3.7/'
30 29
31 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'30 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
32 end31 end
33 32
34 version '3.6' do33 version '3.6' do # docs.python.org/3.6/download.html
35 self.release = '3.6.6'34 self.release = '3.6.6'
36 self.dir = '/Users/Thibaut/DevDocs/Docs/Python36' # docs.python.org/3.6/download.html
37 self.base_url = 'https://docs.python.org/3.6/'35 self.base_url = 'https://docs.python.org/3.6/'
38 36
39 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'37 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
40 end38 end
41 39
42 version '3.5' do40 version '3.5' do # docs.python.org/3.5/download.html
43 self.release = '3.5.3'41 self.release = '3.5.3'
44 self.dir = '/Users/Thibaut/DevDocs/Docs/Python35' # docs.python.org/3.5/download.html
45 self.base_url = 'https://docs.python.org/3.5/'42 self.base_url = 'https://docs.python.org/3.5/'
46 43
47 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'44 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
48 end45 end
49 46
50 version '2.7' do47 version '2.7' do # docs.python.org/2.7/download.html
51 self.release = '2.7.13'48 self.release = '2.7.13'
52 self.dir = '/Users/Thibaut/DevDocs/Docs/Python27' # docs.python.org/2.7/download.html
53 self.base_url = 'https://docs.python.org/2.7/'49 self.base_url = 'https://docs.python.org/2.7/'
54 50
55 html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'51 html_filters.push 'python/entries_v2', 'sphinx/clean_html', 'python/clean_html'
lib/docs/scrapers/rdoc/minitest.rb+7−2
@@ -1,9 +1,14 @@
1module Docs1module Docs
2 class Minitest < Rdoc2 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
3 self.name = 'Ruby / Minitest'9 self.name = 'Ruby / Minitest'
4 self.slug = 'minitest'10 self.slug = 'minitest'
5 self.release = '5.10.3'11 self.release = '5.11.3'
6 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Minitest' # rake docs
7 self.links = {12 self.links = {
8 code: 'https://github.com/seattlerb/minitest'13 code: 'https://github.com/seattlerb/minitest'
9 }14 }
lib/docs/scrapers/rdoc/rails.rb+10−3
@@ -1,10 +1,17 @@
1module Docs1module Docs
2 class Rails < Rdoc2 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
3 include FixInternalUrlsBehavior11 include FixInternalUrlsBehavior
4 12
5 self.name = 'Ruby on Rails'13 self.name = 'Ruby on Rails'
6 self.slug = 'rails'14 self.slug = 'rails'
7 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails'
8 self.initial_paths = %w(guides/index.html)15 self.initial_paths = %w(guides/index.html)
9 self.links = {16 self.links = {
10 home: 'http://rubyonrails.org/',17 home: 'http://rubyonrails.org/',
@@ -68,7 +75,7 @@ module Docs · 57 unmodified lines
68 end75 end
69 76
70 version '5.2' do77 version '5.2' do
71 self.release = '5.2.0'78 self.release = '5.2.2'
72 end79 end
73 80
74 version '5.1' do81 version '5.1' do
@@ -80,7 +87,7 @@ module Docs · 5 unmodified lines
80 end87 end
81 88
82 version '4.2' do89 version '4.2' do
83 self.release = '4.2.10'90 self.release = '4.2.11'
84 end91 end
85 92
86 version '4.1' do93 version '4.1' do
lib/docs/scrapers/rdoc/ruby.rb+8−19
@@ -1,16 +1,9 @@
1module Docs1module Docs
2 class Ruby < Rdoc2 class Ruby < Rdoc
3 # Generated with:3 # Instructions:
4 # ./configure && make html4 # 1. Download Ruby's source code
5 # or:5 # 2. Run "./configure && make html" (in the Ruby directory)
6 # rdoc \6 # 3. Copy the ".ext/html" directory to "docs/ruby~[version]"
7 # --root . \
8 # --page-dir doc \
9 # --encoding=UTF-8 \
10 # --visibility=public \
11 # --format=darkfish \
12 # --no-line-numbers \
13 # --op html .
14 7
15 include FixInternalUrlsBehavior8 include FixInternalUrlsBehavior
16 9
@@ -77,23 +70,19 @@ module Docs · 60 unmodified lines
77 HTML70 HTML
78 71
79 version '2.5' do72 version '2.5' do
80 self.release = '2.5.0'73 self.release = '2.5.3'
81 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby25'
82 end74 end
83 75
84 version '2.4' do76 version '2.4' do
85 self.release = '2.4.3'77 self.release = '2.4.5'
86 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby24'
87 end78 end
88 79
89 version '2.3' do80 version '2.3' do
90 self.release = '2.3.6'81 self.release = '2.3.8'
91 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby23'
92 end82 end
93 83
94 version '2.2' do84 version '2.2' do
95 self.release = '2.2.9'85 self.release = '2.2.10'
96 self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Ruby22'
97 end86 end
98 end87 end
99end88end
lib/docs/scrapers/react.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class React < UrlScraper2 class React < UrlScraper
3 self.name = 'React'3 self.name = 'React'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '16.4.0'5 self.release = '16.6.0'
6 self.base_url = 'https://reactjs.org/docs/'6 self.base_url = 'https://reactjs.org/docs/'
7 self.root_path = 'hello-world.html'7 self.root_path = 'hello-world.html'
8 self.links = {8 self.links = {
lib/docs/scrapers/redis.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Redis < UrlScraper2 class Redis < UrlScraper
3 self.type = 'redis'3 self.type = 'redis'
4 self.release = '4.0.11'4 self.release = '5.0.0'
5 self.base_url = 'https://redis.io/commands'5 self.base_url = 'https://redis.io/commands'
6 self.links = {6 self.links = {
7 home: 'https://redis.io/',7 home: 'https://redis.io/',
lib/docs/scrapers/rust.rb+4−1
@@ -1,7 +1,9 @@
1# frozen_string_literal: true
2
1module Docs3module Docs
2 class Rust < UrlScraper4 class Rust < UrlScraper
3 self.type = 'rust'5 self.type = 'rust'
4 self.release = '1.29.1'6 self.release = '1.30.1'
5 self.base_url = 'https://doc.rust-lang.org/'7 self.base_url = 'https://doc.rust-lang.org/'
6 self.root_path = 'book/second-edition/index.html'8 self.root_path = 'book/second-edition/index.html'
7 self.initial_paths = %w(9 self.initial_paths = %w(
@@ -28,6 +30,7 @@ module Docs · 20 unmodified lines
28 options[:fix_urls] = ->(url) do30 options[:fix_urls] = ->(url) do
29 url.sub! %r{(#{Rust.base_url}.+/)\z}, '\1index.html'31 url.sub! %r{(#{Rust.base_url}.+/)\z}, '\1index.html'
30 url.sub! '/unicode/u_str', '/unicode/str/'32 url.sub! '/unicode/u_str', '/unicode/str/'
33 url.sub! '/std/std/', '/std/'
31 url34 url
32 end35 end
33 36
lib/docs/scrapers/scikit_image.rb+2−2
@@ -3,8 +3,8 @@ module Docs · 2 unmodified lines
3 self.name = 'scikit-image'3 self.name = 'scikit-image'
4 self.slug = 'scikit_image'4 self.slug = 'scikit_image'
5 self.type = 'sphinx'5 self.type = 'sphinx'
6 self.release = '0.13.1'6 self.release = '0.14.1'
7 self.base_url = 'http://scikit-image.org/docs/0.13.x/'7 self.base_url = 'http://scikit-image.org/docs/0.14.x/'
8 self.links = {8 self.links = {
9 home: 'http://scikit-image.org/',9 home: 'http://scikit-image.org/',
10 code: 'https://github.com/scikit-image/scikit-image'10 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
3 self.name = 'scikit-learn'3 self.name = 'scikit-learn'
4 self.slug = 'scikit_learn'4 self.slug = 'scikit_learn'
5 self.type = 'sphinx'5 self.type = 'sphinx'
6 self.release = '0.19.1'6 self.release = '0.20.0'
7 self.base_url = 'http://scikit-learn.org/stable/'7 self.base_url = 'http://scikit-learn.org/stable/'
8 self.root_path = 'documentation.html'8 self.root_path = 'documentation.html'
9 self.force_gzip = true9 self.force_gzip = true
@@ -21,7 +21,7 @@ module Docs · 11 unmodified lines
21 options[:max_image_size] = 256_00021 options[:max_image_size] = 256_000
22 22
23 options[:attribution] = <<-HTML23 options[:attribution] = <<-HTML
24 &copy; 2007&ndash;2017 The scikit-learn developers<br>24 &copy; 2007&ndash;2018 The scikit-learn developers<br>
25 Licensed under the 3-clause BSD License.25 Licensed under the 3-clause BSD License.
26 HTML26 HTML
27 27
lib/docs/scrapers/sinon.rb+13−8
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
4 self.slug = 'sinon'4 self.slug = 'sinon'
5 self.type = 'sinon'5 self.type = 'sinon'
6 self.links = {6 self.links = {
7 home: 'http://sinonjs.org/',7 home: 'https://sinonjs.org/',
8 code: 'https://github.com/sinonjs/sinon'8 code: 'https://github.com/sinonjs/sinon'
9 }9 }
10 10
@@ -18,34 +18,39 @@ module Docs · 7 unmodified lines
18 Licensed under the BSD License.18 Licensed under the BSD License.
19 HTML19 HTML
20 20
21 version '7' do
22 self.release = '7.1.1'
23 self.base_url = "https://sinonjs.org/releases/v#{release}/"
24 end
25
21 version '6' do26 version '6' do
22 self.release = '6.1.3'27 self.release = '6.3.5'
23 self.base_url = "http://sinonjs.org/releases/v#{release}/"28 self.base_url = "https://sinonjs.org/releases/v#{release}/"
24 end29 end
25 30
26 version '5' do31 version '5' do
27 self.release = '5.1.0'32 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}/"
29 end34 end
30 35
31 version '4' do36 version '4' do
32 self.release = '4.5.0'37 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}/"
34 end39 end
35 40
36 version '3' do41 version '3' do
37 self.release = '3.3.0'42 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}/"
39 end44 end
40 45
41 version '2' do46 version '2' do
42 self.release = '2.4.1'47 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}/"
44 end49 end
45 50
46 version '1' do51 version '1' do
47 self.release = '1.17.7'52 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}/"
49 end54 end
50 end55 end
51end56end
lib/docs/scrapers/sqlite.rb+1−2
@@ -2,8 +2,7 @@ module Docs · 1 unmodified line
2 class Sqlite < FileScraper2 class Sqlite < FileScraper
3 self.name = 'SQLite'3 self.name = 'SQLite'
4 self.type = 'sqlite'4 self.type = 'sqlite'
5 self.release = '3.23.1'5 self.release = '3.25.2'
6 self.dir = '/Users/Thibaut/DevDocs/Docs/sqlite/'
7 self.base_url = 'https://sqlite.org/'6 self.base_url = 'https://sqlite.org/'
8 self.root_path = 'docs.html'7 self.root_path = 'docs.html'
9 self.initial_paths = %w(keyword_index.html)8 self.initial_paths = %w(keyword_index.html)
lib/docs/scrapers/statsmodels.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Statsmodels < UrlScraper2 class Statsmodels < UrlScraper
3 self.type = 'sphinx'3 self.type = 'sphinx'
4 self.release = '0.8.0'4 self.release = '0.9.0'
5 self.base_url = 'http://www.statsmodels.org/stable/'5 self.base_url = 'http://www.statsmodels.org/stable/'
6 self.root_path = 'index.html'6 self.root_path = 'index.html'
7 self.links = {7 self.links = {
lib/docs/scrapers/symfony.rb+13−8
@@ -26,44 +26,49 @@ module Docs · 25 unmodified lines
26 Licensed under the MIT License.26 Licensed under the MIT License.
27 HTML27 HTML
28 28
29 version '4.1' do
30 self.release = '4.1.7'
31 self.base_url = "https://api.symfony.com/#{version}/"
32 end
33
29 version '4.0' do34 version '4.0' do
30 self.release = '4.0.3'35 self.release = '4.0.3'
31 self.base_url = "http://api.symfony.com/#{version}/"36 self.base_url = "https://api.symfony.com/#{version}/"
32 end37 end
33 38
34 version '3.4' do39 version '3.4' do
35 self.release = '3.4.3'40 self.release = '3.4.3'
36 self.base_url = "http://api.symfony.com/#{version}/"41 self.base_url = "https://api.symfony.com/#{version}/"
37 end42 end
38 43
39 version '3.3' do44 version '3.3' do
40 self.release = '3.3.15'45 self.release = '3.3.15'
41 self.base_url = "http://api.symfony.com/#{version}/"46 self.base_url = "https://api.symfony.com/#{version}/"
42 end47 end
43 48
44 version '3.2' do49 version '3.2' do
45 self.release = '3.2.13'50 self.release = '3.2.13'
46 self.base_url = "http://api.symfony.com/#{version}/"51 self.base_url = "https://api.symfony.com/#{version}/"
47 end52 end
48 53
49 version '3.1' do54 version '3.1' do
50 self.release = '3.1.8'55 self.release = '3.1.8'
51 self.base_url = "http://api.symfony.com/#{version}/"56 self.base_url = "https://api.symfony.com/#{version}/"
52 end57 end
53 58
54 version '3.0' do59 version '3.0' do
55 self.release = '3.0.1'60 self.release = '3.0.1'
56 self.base_url = "http://api.symfony.com/#{version}/"61 self.base_url = "https://api.symfony.com/#{version}/"
57 end62 end
58 63
59 version '2.8' do64 version '2.8' do
60 self.release = '2.8.28'65 self.release = '2.8.28'
61 self.base_url = "http://api.symfony.com/#{version}/"66 self.base_url = "https://api.symfony.com/#{version}/"
62 end67 end
63 68
64 version '2.7' do69 version '2.7' do
65 self.release = '2.7.35'70 self.release = '2.7.35'
66 self.base_url = "http://api.symfony.com/#{version}/"71 self.base_url = "https://api.symfony.com/#{version}/"
67 end72 end
68 end73 end
69end74end
lib/docs/scrapers/twig.rb+6−6
@@ -4,14 +4,14 @@ module Docs · 3 unmodified lines
4 self.root_path = 'index.html'4 self.root_path = 'index.html'
5 self.initial_paths = %w(extensions/index.html)5 self.initial_paths = %w(extensions/index.html)
6 self.links = {6 self.links = {
7 home: 'https://twig.sensiolabs.org/',7 home: 'https://twig.symfony.com/',
8 code: 'https://github.com/twigphp/Twig'8 code: 'https://github.com/twigphp/Twig'
9 }9 }
10 10
11 options[:attribution] = <<-HTML11 options[:attribution] = <<-HTML
12 &copy; 2009&ndash;2017 by the Twig Team<br>12 &copy; 2009&ndash;2018 by the Twig Team<br>
13 Licensed under the three clause BSD license.<br>13 Licensed under the three clause BSD license.<br>
14 The Twig logo is &copy; 2010&ndash;2017 SensioLabs14 The Twig logo is &copy; 2010&ndash;2018 Symfony
15 HTML15 HTML
16 16
17 html_filters.push 'twig/clean_html', 'twig/entries'17 html_filters.push 'twig/clean_html', 'twig/entries'
@@ -20,13 +20,13 @@ module Docs · 2 unmodified lines
20 options[:skip] = %w(deprecated.html advanced_legacy.html)20 options[:skip] = %w(deprecated.html advanced_legacy.html)
21 21
22 version '2' do22 version '2' do
23 self.release = '2.4.3'23 self.release = '2.5.0'
24 self.base_url = 'https://twig.sensiolabs.org/doc/2.x/'24 self.base_url = 'https://twig.symfony.com/doc/2.x/'
25 end25 end
26 26
27 version '1' do27 version '1' do
28 self.release = '1.34.3'28 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/'
30 end30 end
31 end31 end
32end32end
lib/docs/scrapers/typescript.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Typescript < UrlScraper2 class Typescript < UrlScraper
3 self.name = 'TypeScript'3 self.name = 'TypeScript'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '3.0.1'5 self.release = '3.1.6'
6 self.base_url = 'https://www.typescriptlang.org/docs/'6 self.base_url = 'https://www.typescriptlang.org/docs/'
7 self.root_path = 'tutorial.html'7 self.root_path = 'tutorial.html'
8 self.links = {8 self.links = {
lib/docs/scrapers/underscore.rb+4−4
@@ -3,10 +3,10 @@ module Docs · 2 unmodified lines
3 self.name = 'Underscore.js'3 self.name = 'Underscore.js'
4 self.slug = 'underscore'4 self.slug = 'underscore'
5 self.type = 'underscore'5 self.type = 'underscore'
6 self.release = '1.9.0'6 self.release = '1.9.1'
7 self.base_url = 'http://underscorejs.org'7 self.base_url = 'https://underscorejs.org'
8 self.links = {8 self.links = {
9 home: 'http://underscorejs.org',9 home: 'https://underscorejs.org',
10 code: 'https://github.com/jashkenas/underscore'10 code: 'https://github.com/jashkenas/underscore'
11 }11 }
12 12
@@ -17,7 +17,7 @@ module Docs · 4 unmodified lines
17 options[:skip_links] = true17 options[:skip_links] = true
18 18
19 options[:attribution] = <<-HTML19 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>
21 Licensed under the MIT License.21 Licensed under the MIT License.
22 HTML22 HTML
23 end23 end
lib/docs/scrapers/vagrant.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Vagrant < UrlScraper2 class Vagrant < UrlScraper
3 self.name = 'Vagrant'3 self.name = 'Vagrant'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '2.1.1'5 self.release = '2.2.0'
6 self.base_url = 'https://www.vagrantup.com/docs/'6 self.base_url = 'https://www.vagrantup.com/docs/'
7 self.root_path = 'index.html'7 self.root_path = 'index.html'
8 self.links = {8 self.links = {
lib/docs/scrapers/yarn.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Yarn < UrlScraper2 class Yarn < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '1.9.4'4 self.release = '1.12.1'
5 self.base_url = 'https://yarnpkg.com/en/docs/'5 self.base_url = 'https://yarnpkg.com/en/docs/'
6 self.links = {6 self.links = {
7 home: 'https://yarnpkg.com/',7 home: 'https://yarnpkg.com/',
lib/docs/subscribers/requester_subscriber.rb+13−0
@@ -0,0 +1,13 @@
1# frozen_string_literal: true
2
3module 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
13end