@@ -33,61 +33,6 @@ RDoc::Task.new do |doc|
3333 doc . rdoc_dir = "_site"
3434end
3535
36- namespace :rdoc do
37- desc "Verify the generated RDoc site includes the public Ruby and native extension APIs"
38- task :verify do
39- Rake ::Task [ "rdoc" ] . invoke
40-
41- html_files = FileList [ "_site/**/*.html" ]
42- abort "Generated RDoc site is empty" if html_files . empty?
43-
44- expected_pages = {
45- "_site/Rubydex/Graph.html" => [
46- 'id="class-rubydex-graph"' ,
47- 'id="method-i-index_workspace"' ,
48- 'id="method-i-workspace_paths"' ,
49- 'id="method-i-index_all"' ,
50- 'id="method-i-index_source"' ,
51- 'index_source(uri, source, language_id)' ,
52- 'id="method-i-keyword"' ,
53- 'id="method-i-exclude_paths"' ,
54- 'id="method-i-resolve_constant"' ,
55- ] ,
56- "_site/Rubydex/Declaration.html" => [
57- 'id="class-rubydex-declaration"' ,
58- ] ,
59- "_site/Rubydex/Signature.html" => [
60- 'id="class-rubydex-signature"' ,
61- ] ,
62- "_site/Rubydex/Document.html" => [
63- 'id="class-rubydex-document"' ,
64- 'id="method-i-uri"' ,
65- 'id="method-i-definitions"' ,
66- ] ,
67- "_site/Rubydex/Definition.html" => [
68- 'id="class-rubydex-definition"' ,
69- 'id="method-i-location"' ,
70- 'id="method-i-comments"' ,
71- ] ,
72- "_site/Rubydex/ResolvedConstantReference.html" => [
73- 'id="class-rubydex-resolvedconstantreference"' ,
74- 'id="method-i-declaration"' ,
75- ] ,
76- }
77-
78- missing = expected_pages . flat_map do |file , entries |
79- unless File . exist? ( file )
80- next [ "#{ file } was not generated" ]
81- end
82-
83- content = File . read ( file )
84- entries . reject { |entry | content . include? ( entry ) } . map { |entry | "#{ file } : #{ entry } " }
85- end
86-
87- abort "Generated RDoc site is missing expected API entries:\n - #{ missing . join ( "\n - " ) } " unless missing . empty?
88- end
89- end
90-
9136task :lint do
9237 puts "******** Linting ********\n "
9338 Rake ::Task [ "rubocop" ] . invoke
0 commit comments