rdoc-babel 1.0.4 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03337e579f18dd1f366adeaf01085bfed07d9e131e77be194a341e8e0848a69f
4
- data.tar.gz: f2531e32eef12e51ed7c09fc9e2b282e1d372abe3997515c6bc768a2bce4c30e
3
+ metadata.gz: e1327fb42125f98ea0570da581237805d4f8b888f0e7539ff2f3852434305742
4
+ data.tar.gz: 03dc94dc98373a2fc6f8e10f33be216311a570708f80eeadff28a9725db381cb
5
5
  SHA512:
6
- metadata.gz: e14e0d5334e85e24c3e0b1a825c873a97429adfedfe1633165a633f0287f11a14e83fb6da1ad72beb0648fa69442d1c0c946294493b11706ee1e9ac861ee8693
7
- data.tar.gz: c03a9e87719ce4e8bd7ba61b73b1d875dafd021fa39070b3d268ca5173768753b45c442ad0ad936b9fde5839e6d4746f78b3331c3410584f437f94c8768f852e
6
+ metadata.gz: eaefb9b9fb643aa8af53622b97fc668846ec6dbd90d3f4b2e508a15f41ab9ba807ff5ac475bf9ea1ab798c2179d56d65b9e2dfa334be04fed454d3e6e61a3c83
7
+ data.tar.gz: 171c83b49f1a3c6ead84ce1abe9b5a6a00da7361a7949f626763783349acae9c81915d26d6e5e2affdb0002493a066c9b1b131625447a5878c09a508f7862423
data/HISTORY.rdoc CHANGED
@@ -1,21 +1,48 @@
1
1
 
2
- === 0.9.0 / 2010-10-02
2
+ === 1.1.1
3
3
 
4
- Initial version, developed along with {RDoc}[http://github.com/rdoc/rdoc] 3.0.
4
+ * fixes for RDoc bugs
5
+ * tune CSS, switch to HTML 5
5
6
 
6
- === 0.9.1 / 2011-07-16
7
+ === 1.0.8
7
8
 
8
- First public release.
9
+ * tune the style sheet
9
10
 
10
- === 1.0.0 / 2014-07-20
11
+ === 1.0.7 / 2021-02-16
11
12
 
12
- Make it compatible with RDoc 4.1 and its bugs.
13
+ * Fix warning with rdoc 6.3, update runtime dependency
14
+
15
+ === 1.0.5 / 2020-06-01
16
+
17
+ * Fix warning with Ruby 2.7
18
+ * Tune CSS for definition lists
19
+
20
+ === 1.0.4 / 2019-08-02
21
+
22
+ Fix for latest ERB syntax.
23
+
24
+ === 1.0.3 / 2019-07-29
25
+
26
+ Compatibility with RDoc 6.
27
+
28
+ === 1.0.2 / 2017-02-25
29
+
30
+ Fix for compatibility with RDoc 5 dupping the options.
13
31
 
14
32
  === 1.0.1 / 2015-06-29
15
33
 
16
34
  * Fix rendering of Markdown files
17
35
  * Fix CSS file (code instead of tt)
18
36
 
19
- === 1.0.2 / 2017-02-25
37
+ === 1.0.0 / 2014-07-20
38
+
39
+ Make it compatible with RDoc 4.1 and its bugs.
40
+
41
+ === 0.9.1 / 2011-07-16
42
+
43
+ First public release.
44
+
45
+ === 0.9.0 / 2010-10-02
46
+
47
+ Initial version, developed along with {RDoc}[http://github.com/rdoc/rdoc] 3.0.
20
48
 
21
- * Fix for compatibility with RDoc 5 dupping the options.
data/README.rdoc CHANGED
@@ -81,7 +81,7 @@ Babel supports specific options in addition to the standard RDoc options:
81
81
 
82
82
  (The MIT License)
83
83
 
84
- Copyright (c) 2010-2019 Thierry Lambert
84
+ Copyright (c) 2010-2020 Thierry Lambert
85
85
 
86
86
  Permission is hereby granted, free of charge, to any person obtaining
87
87
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,33 +1,17 @@
1
- require 'hoe'
1
+ require "rake/testtask"
2
2
 
3
- Hoe.spec 'rdoc-babel' do
4
-
5
- developer 'Thierry Lambert', 'thyresias@gmail.com'
6
- license 'MIT'
7
-
8
- self.summary = "An RDoc formatter producing HTML documentation."
9
- self.description = paragraphs_of('README.rdoc', 3, 6).join("\n\n")
10
-
11
- self.readme_file = 'README.rdoc'
12
- self.history_file = 'HISTORY.rdoc'
13
- self.extra_rdoc_files = ['README.rdoc', 'HISTORY.rdoc']
14
-
15
- self.remote_rdoc_dir = ''
16
- self.testlib = :minitest
17
- # self.test_prelude = %(gem "minitest")
18
-
19
- self.extra_deps << ['rdoc', '~> 6.1']
20
-
21
- self.extra_dev_deps << ['minitest', '~> 5.11']
22
- self.extra_dev_deps << ['nokogiri', '~> 1.10']
23
-
24
- spec_extras[:homepage] = 'http://github.com/thyresias/rdoc-babel'
25
- spec_extras[:rdoc_options] = %w(--main README.rdoc)
3
+ Rake::TestTask.new do |t|
4
+ t.test_files = FileList['test/test*.rb']
5
+ end
26
6
 
7
+ desc 'build & install gem'
8
+ task 'gem' do
9
+ system 'gem build rdoc-babel.gemspec'
10
+ system 'gem install rdoc-babel --local'
27
11
  end
28
12
 
29
- task :file_list do
30
- puts Dir['*'].reject { |f| File.directory? f }
31
- puts Dir['lib/**/*'].reject { |f| File.directory? f }
32
- puts Dir['test/**/*'].reject { |f| File.directory? f }
13
+ desc 'publish the gem'
14
+ task 'push' do
15
+ gemfile = Dir['*.gem'].sort.last
16
+ system "gem push #{gemfile}"
33
17
  end
@@ -1,12 +1,8 @@
1
- # require 'rdoc'
2
- # require 'rdoc/rdoc'
3
- #require 'rdoc/generator'
4
1
  require 'pathname'
5
2
  require 'fileutils'
6
3
  require 'erb'
7
4
 
8
- # require 'rdoc/generator/markup'
9
-
5
+ # :stopdoc:
10
6
  # remove junk <span> at the end
11
7
  class RDoc::Markup::ToHtml
12
8
 
@@ -27,6 +23,7 @@ class RDoc::Markup::ToHtml
27
23
  end
28
24
 
29
25
  end
26
+ # :startdoc:
30
27
 
31
28
  ##
32
29
  # Babel RDoc HTML Generator.
@@ -36,6 +33,9 @@ class RDoc::Generator::Babel
36
33
 
37
34
  RDoc::RDoc.add_generator(self)
38
35
 
36
+ VERSION = '1.1.1'
37
+ DESCRIPTION = 'Alternate HTML documentation'
38
+
39
39
  include ERB::Util
40
40
 
41
41
  # Directory containing babel templates.
@@ -73,8 +73,8 @@ class RDoc::Generator::Babel
73
73
  :see_standard_ancestors => false,
74
74
  }
75
75
 
76
- rdoc_options.extend Options # extend the existing object
77
- rdoc_options.class.include Options # make sure #babel_options will be there on #dup'ed objects
76
+ rdoc_options.extend Options # 1. extend the existing object
77
+ rdoc_options.class.include Options # 2. make sure #babel_options will be there on #dup'ed objects
78
78
  rdoc_options.babel_options = options
79
79
 
80
80
  opt = rdoc_options.option_parser
@@ -169,7 +169,7 @@ class RDoc::Generator::Babel
169
169
 
170
170
  @all_files = @store.all_files # not sorted: keep command line order
171
171
  @files_with_comment = @all_files.reject { |f| f.comment.empty? }
172
- @simple_files = @files_with_comment.select { |f| f.parser == RDoc::Parser::Simple }
172
+ @simple_files = @files_with_comment.select { |f| f.parser == RDoc::Parser::Simple || f.parser == RDoc::Parser::Markdown }
173
173
 
174
174
  @files_to_display =
175
175
  if @unique_classes_and_modules.empty?
@@ -212,7 +212,7 @@ class RDoc::Generator::Babel
212
212
  if source_path.directory?
213
213
  out_path.mkpath unless @options.dry_run
214
214
  else
215
- FileUtils.cp source_path.to_s, out_path.dirname.to_s, options
215
+ FileUtils.cp source_path.to_s, out_path.dirname.to_s, **options
216
216
  end
217
217
  end
218
218
  end
@@ -324,37 +324,101 @@ class RDoc::Generator::Babel
324
324
 
325
325
  def decorated_call_seq(method, method_name_class)
326
326
 
327
+ # empty call_seq (RDoc bug)
328
+ if method.call_seq.strip.empty?
329
+ warn "call-seq empty: #{method.parent.full_name}#{method.name_prefix}#{method.name}"
330
+ return ''
331
+ end
332
+
327
333
  # I assume it is safe to use \001 \002 \003 \004 to escape & < > "
328
334
  text = method.call_seq.strip.gsub(/->/, "\001rarr;")
329
335
  ospan = "\002span class=\004#{method_name_class}\004\003"
330
336
  cspan = "\002/span\003"
331
337
 
332
- if method.name =~ /^[a-z]/i
338
+ # the "or warn" below fire when the alias is not in the call-seq:
339
+ # ARGF#inspect: nope 1
340
+ # Array#size: nope 1
341
+ # BasicObject#singleton_method_removed: nope 1
342
+ # BasicObject#singleton_method_undefined: nope 1
343
+ # Complex#real?: nope 1
344
+ # Enumerator::ArithmeticSequence#===: nope 3.2
345
+ # Enumerator::ArithmeticSequence#eql?: nope 1
346
+ # Enumerator::Lazy#_enumerable_drop: nope 1
347
+ # Enumerator::Lazy#_enumerable_drop_while: nope 1
348
+ # Enumerator::Lazy#_enumerable_filter_map: nope 1
349
+ # Enumerator::Lazy#_enumerable_flat_map: nope 1
350
+ # Enumerator::Lazy#_enumerable_grep: nope 1
351
+ # Enumerator::Lazy#_enumerable_grep_v: nope 1
352
+ # Enumerator::Lazy#_enumerable_map: nope 1
353
+ # Enumerator::Lazy#_enumerable_reject: nope 1
354
+ # Enumerator::Lazy#_enumerable_select: nope 1
355
+ # Enumerator::Lazy#_enumerable_take: nope 1
356
+ # Enumerator::Lazy#_enumerable_take_while: nope 1
357
+ # Enumerator::Lazy#_enumerable_uniq: nope 1
358
+ # Enumerator::Lazy#_enumerable_zip: nope 1
359
+ # Enumerator::Lazy#_enumerable_with_index: nope 1
360
+ # FalseClass#inspect: nope 1
361
+ # Fiber#inspect: nope 1
362
+ # File::empty?: nope 1
363
+ # File::Stat#size?: nope 1
364
+ # FileTest#empty?: nope 1
365
+ # Float#===: nope 3.2
366
+ # Float#inspect: nope 1
367
+ # Hash#initialize_copy: nope 1
368
+ # Integer#===: nope 3.2
369
+ # Integer#inspect: nope 1
370
+ # Method#===: nope 3.2
371
+ # Module#extended: nope 1
372
+ # Module#inspect: nope 1
373
+ # Module#method_added: nope 1
374
+ # Module#method_removed: nope 1
375
+ # Module#method_undefined: nope 1
376
+ # Module#prepended: nope 1
377
+ # Numeric#%: nope 3.2
378
+ # Proc#===: nope 3.2
379
+ # Proc#inspect: nope 1
380
+ # Process::Sys::getegid: nope 1
381
+ # String#initialize_copy: nope 1
382
+ # Struct#deconstruct: nope 1
383
+ # Symbol#===: nope 3.2
384
+ # Symbol#next: nope 1
385
+ # Thread#inspect: nope 1
386
+ # TrueClass#inspect: nope 1
387
+
388
+ if method.name =~ /^\w/
333
389
  # look for things like 'IO.open' or 'open' at the beginning of lines
334
390
  name = Regexp.escape(method.name.sub(/=$/, ''))
335
- re = Regexp.new('^(\s*)([:\w]+\.)?(' << name << ')', Regexp::MULTILINE)
336
- text.gsub!(re, "\\1\\2#{ospan}\\3#{cspan}")
391
+ re = /^(\s*)([:\w]+\.)?(#{name})/
392
+ text.gsub!(re, "\\1\\2#{ospan}\\3#{cspan}") #or warn "#{method.parent.full_name}#{method.name_prefix}#{method.name}: nope 1"
337
393
  elsif method.name =~ /\[\]=?/
338
394
  # [] and []=
339
- text.gsub!(/\[/m, "#{ospan}[#{cspan}")
340
- text.gsub!(/\]/m, "#{ospan}]#{cspan}")
395
+ re = /[\[\]]/
396
+ sub_hash = { '[' => "#{ospan}[#{cspan}", ']' => "#{ospan}]#{cspan}" }
397
+ text.gsub!(re, sub_hash) #or warn "#{method.parent.full_name}#{method.name_prefix}#{method.name}: nope 2"
341
398
  else
342
399
  # operators:
400
+ # +(unary) -(unary) ~ !
343
401
  # **
344
- # -(unary) +(unary) ~
345
402
  # * / %
346
403
  # + -
347
404
  # << >>
348
405
  # &
349
406
  # | ^
350
407
  # > >= < <=
351
- # <=> == === =~
352
- name = Regexp.escape(method.name)
353
- re = Regexp.new(name, Regexp::MULTILINE)
354
- text.gsub!(re, "#{ospan}\\&#{cspan}")
408
+ # <=> == === =~
409
+ # != ` !~
410
+ case method.name
411
+ # -(unary) +(unary)
412
+ when '+@', '-@'
413
+ re = /^(\s*)(#{Regexp.escape(method.name[0])})/
414
+ text.gsub!(re, "\\1#{ospan}\\2#{cspan}") #or warn "#{method.parent.full_name}#{method.name_prefix}#{method.name}: nope 3.1"
415
+ else
416
+ re = /^(.*?)(#{Regexp.escape(method.name)})/
417
+ text.gsub!(re, "\\1#{ospan}\\2#{cspan}") #or warn "#{method.parent.full_name}#{method.name_prefix}#{method.name}: nope 3.2"
418
+ end
355
419
  end
356
420
 
357
- h(text).gsub("\001", '&').gsub("\002",'<').gsub("\003",'>').gsub("\004",'"').gsub("\n", '<br/>')
421
+ h(text).tr("\001\002\003\004", '&<>"').gsub("\n", '<br/>')
358
422
  end
359
423
 
360
424
  protected
@@ -1,11 +1,11 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
3
  <head>
4
- <meta http-equiv="content-type" content="text/html; charset=<%= @options.charset %>" />
4
+ <meta charset="<%= @options.charset %>">
5
5
  <title><%= @class.type.capitalize %> <%= @class.full_name %></title>
6
- <link href="<%= @stylesheet_url %>" media="all" rel="stylesheet" type="text/css" />
7
- <script src="<%= @rel_prefix %>/scripts/jquery.js" type="text/javascript" charset="utf-8"></script>
8
- <script src="<%= @rel_prefix %>/scripts/mainFrame.js" type="text/javascript" charset="utf-8"></script>
6
+ <link href="<%= @stylesheet_url %>" rel="stylesheet">
7
+ <script src="<%= @rel_prefix %>/scripts/jquery.js" type="text/javascript"></script>
8
+ <script src="<%= @rel_prefix %>/scripts/mainFrame.js" type="text/javascript"></script>
9
9
  </head>
10
10
  <body>
11
11
 
@@ -28,7 +28,7 @@
28
28
  <span class="in-files">In:</span>
29
29
  <span class="first-files">
30
30
  <% @class.in_files.each do |f| %>
31
- <a href="<%= @rel_prefix %>/<%= h f.path %>"><%= h f.full_name %></a><br/>
31
+ <a href="<%= @rel_prefix %>/<%= h f.path %>"><%= h f.full_name %></a><br>
32
32
  <% end %>
33
33
  </span>
34
34
  </span>
@@ -36,7 +36,7 @@
36
36
  <span class="in-files">In:</span>
37
37
  <span class="first-files">
38
38
  <% @class.in_files.each do |f| %>
39
- <a href="#"><%= h f.full_name %></a><br/>
39
+ <a href="#"><%= h f.full_name %></a><br>
40
40
  <% end %>
41
41
  </span>
42
42
  </span>
@@ -44,21 +44,21 @@
44
44
  <span class="displayed">
45
45
  <span class="in-files">In:</span>
46
46
  <span class="first-files">
47
- <a href="<%= @rel_prefix %>/<%= h @class.in_files.first.path %>"><%= h @class.in_files.first.full_name %></a><br/>
47
+ <a href="<%= @rel_prefix %>/<%= h @class.in_files.first.path %>"><%= h @class.in_files.first.full_name %></a><br>
48
48
  <a href="#" id="show-all-files">(<%= @class.in_files.length - 1 %> more...)</a>
49
49
  </span>
50
50
  </span>
51
51
  <span class="hidden">
52
52
  <span class="in-files">In:</span>
53
53
  <span class="first-files">
54
- <a href="#"><%= h @class.in_files.first.full_name %></a><br/>
54
+ <a href="#"><%= h @class.in_files.first.full_name %></a><br>
55
55
  <a href="#" id="show-all-files">(<%= @class.in_files.length - 1 %> more...)</a>
56
56
  </span>
57
57
  </span>
58
- <br/>
58
+ <br>
59
59
  <span id="all-files">
60
60
  <% @class.in_files[1..-1].each do |f| %>
61
- <a href="<%= @rel_prefix %>/<%= h f.path %>"><%= h f.full_name %></a><br/>
61
+ <a href="<%= @rel_prefix %>/<%= h f.path %>"><%= h f.full_name %></a><br>
62
62
  <% end %>
63
63
  </span>
64
64
  <% end %>
@@ -93,9 +93,9 @@
93
93
  <% end %>
94
94
  </ul>
95
95
  <% end %>
96
- <% unless @class.instance_method_list.empty? %>
96
+ <% unless @class.instance_methods.empty? %>
97
97
  <ul>
98
- <% @class.instance_method_list.sort.each do |m| %>
98
+ <% @class.instance_methods.sort.each do |m| %>
99
99
  <% litag = m.documented? ? '<li>' : '<li class="nodoc">' %>
100
100
  <%= litag %><a href="#<%= m.aref %>"><span class="type"><%= @options.show_hash ? '#' : '' %></span><%= h m.name %></a></li>
101
101
  <% end %>
@@ -1,18 +1,18 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
3
  <head>
4
- <meta http-equiv="content-type" content="text/html; charset=<%= @options.charset %>" />
4
+ <meta charset="<%= @options.charset %>">
5
5
  <title>File <%= @file.base_name %></title>
6
- <link href="<%= @stylesheet_url %>" media="all" rel="stylesheet" type="text/css" />
7
- <script src="<%= @rel_prefix %>/scripts/jquery.js" type="text/javascript" charset="utf-8"></script>
8
- <script src="<%= @rel_prefix %>/scripts/mainFrame.js" type="text/javascript" charset="utf-8"></script>
6
+ <link href="<%= @stylesheet_url %>" rel="stylesheet">
7
+ <script src="<%= @rel_prefix %>/scripts/jquery.js" type="text/javascript"></script>
8
+ <script src="<%= @rel_prefix %>/scripts/mainFrame.js" type="text/javascript"></script>
9
9
  </head>
10
10
  <body>
11
11
  <div id="header">
12
12
  <p class="header-title"><span class="prefix">File</span><span class="name"> <%= @file.base_name %></span></p>
13
13
  <p id="file-info">
14
14
  <span class="displayed">
15
- Path: <%= @file.absolute_name %><br/>
15
+ Path: <%= @file.absolute_name %><br>
16
16
  Modified: <%= @file.last_modified ? @file.last_modified.strftime('%Y-%m-%d %H:%M:%S') : 'unknown' %>
17
17
  </span>
18
18
  </p>
@@ -1,11 +1,11 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
3
  <head>
4
- <meta http-equiv="content-type" content="text/html; charset=<%= @options.charset %>" />
4
+ <meta charset="<%= @options.charset %>">
5
5
  <title><%= h @options.title %></title>
6
6
  </head>
7
7
  <frameset cols="20%,*">
8
- <frame name="indexFrame" src="indexes.html" />
9
- <frame name="mainFrame" src="<%= @first_page.path %>" />
8
+ <frame name="indexFrame" src="indexes.html">
9
+ <frame name="mainFrame" src="<%= @first_page.path %>">
10
10
  </frameset>
11
11
  </html>
@@ -1,13 +1,13 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
3
  <head>
4
- <meta http-equiv="content-type" content="text/html; charset=<%= @options.charset %>" />
4
+ <meta charset="<%= @options.charset %>">
5
5
  <title>Index of <%= @simple_files.empty? ? '' : 'Files, ' %> Classes &amp; Methods in <%= h @options.title %></title>
6
- <link href="<%= @stylesheet_url %>" media="all" rel="stylesheet" type="text/css" />
7
- <script src="scripts/jquery.js" type="text/javascript" charset="utf-8"></script>
8
- <script src="scripts/jquery.quicksearch.js" type="text/javascript" charset="utf-8"></script>
9
- <script src="scripts/indexFrame.js" type="text/javascript" charset="utf-8"></script>
10
- <base target="mainFrame"/>
6
+ <link href="<%= @stylesheet_url %>" rel="stylesheet">
7
+ <script src="scripts/jquery.js" type="text/javascript"></script>
8
+ <script src="scripts/jquery.quicksearch.js" type="text/javascript"></script>
9
+ <script src="scripts/indexFrame.js" type="text/javascript"></script>
10
+ <base target="mainFrame">
11
11
  </head>
12
12
  <body class="index">
13
13
  <% $stderr.sync = true %>
@@ -23,7 +23,7 @@
23
23
  <% end %>
24
24
  <div id="class-index">
25
25
  <div class="title">
26
- <span class="text">Classes </span><input type="text" value="" class="search-field" />
26
+ <span class="text">Classes </span><input type="text" value="" class="search-field">
27
27
  </div>
28
28
  <div class="entries">
29
29
  <% @all_classes_and_modules.each do |k| %>
@@ -36,7 +36,7 @@
36
36
 
37
37
  <div id="method-index">
38
38
  <div class="title">
39
- <span class="text">Methods </span><input type="text" value="" class="search-field" />
39
+ <span class="text">Methods </span><input type="text" value="" class="search-field">
40
40
  </div>
41
41
  <div class="entries">
42
42
  <% @all_methods.each do |m| %>
@@ -19,21 +19,40 @@ pre, p, h1, h2, h3, h4, h5, h6, ul, ol, dl {
19
19
  }
20
20
 
21
21
  td {
22
- vertical-align: top;
22
+ vertical-align: baseline;
23
23
  padding-right: 1ex;
24
24
  }
25
25
 
26
26
  ul { margin-left: 1.5em; }
27
- ol { margin-left: 2em; }
28
27
  li { margin-top: 0.5ex; }
28
+
29
+ ol { margin-left: 2em; }
29
30
  ol li { margin-top: 1em; }
30
31
 
31
- dt {
32
+ /* label lists: classic DT/DD */
33
+
34
+ .label-list dt {
32
35
  margin-top: 1ex;
33
36
  font-weight: bold;
34
37
  }
35
- dt code { font-size: 100%; }
36
- dd { margin-left: 2em; }
38
+ .label-list dt code { font-size: 100%; }
39
+ .label-list dd { margin-left: 2em; }
40
+
41
+ /* note lists: DT and DD on same row, no space between rows */
42
+
43
+ dl.note-list {
44
+ display: grid;
45
+ grid-template-columns: max-content auto;
46
+ margin-left: 1ex;
47
+ }
48
+ dl.note-list dt { grid-column-start: 1; }
49
+ dl.note-list dd { grid-column-start: 2; margin-left: 2ex; }
50
+ dl.note-list dd p { margin-top: 0; }
51
+ dl.note-list dd pre {
52
+ margin-top: 2px;
53
+ padding-top: 0.5ex;
54
+ padding-bottom: 0.5ex;
55
+ }
37
56
 
38
57
  table {
39
58
  border-collapse: collapse;
@@ -44,10 +63,6 @@ td p {
44
63
  margin-top: 0.5ex;
45
64
  }
46
65
 
47
- table.rdoc-list .rdoc-term {
48
- font-weight: bold;
49
- }
50
-
51
66
  hr {
52
67
  margin-top: 1ex;
53
68
  border: 0;
@@ -62,7 +77,6 @@ a {
62
77
  }
63
78
 
64
79
  a:hover {
65
- color: #00C;
66
80
  background-color: #ffa; /* pale yellow */
67
81
  padding-bottom: 2px;
68
82
  }
@@ -99,10 +113,9 @@ body.index {
99
113
  .index .title {
100
114
  padding: 3px 2px 5px 5px; /* TRBL */
101
115
  font-family: Georgia, Palatino, "Times New Roman", Times, serif;
102
- font-size: 100%;
103
116
  }
104
117
  .search-field {
105
- font-family: Monaco, Consolas, "Lucida Console", monospace;
118
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
106
119
  position: absolute;
107
120
  right: 3px;
108
121
  padding: 0 1px 2px 2px; /* TRBL */
@@ -155,56 +168,42 @@ h1, h2, h3, h4, h5, h6 {
155
168
  }
156
169
 
157
170
  h1, h2, h3 {
158
- border-bottom: 1px dotted #ddd;
159
- }
160
-
161
- h1 a, h2 a, h3 a {
162
- color: red; /* not the best, but no other idea */
163
- }
164
-
165
- h1 a:hover, h2 a:hover, h3 a:hover {
166
- color: red;
167
- }
168
-
169
- h1 {
170
171
  margin-top: 1em;
171
172
  margin-bottom: 1ex;
172
- font-size: 200%;
173
+ border-bottom: 1px solid #ddd;
173
174
  }
174
175
 
175
- h2 {
176
- margin-top: 1em;
177
- margin-bottom: 1ex;
178
- font-size: 150%;
176
+ h4, h5, h6 {
177
+ margin-top: 0.75em;
178
+ border: none;
179
179
  }
180
180
 
181
- h3 {
182
- margin-top: 1em;
183
- margin-bottom: 1ex;
184
- font-size: 120%;
185
- font-weight: bold;
181
+ h1 a, h2 a, h3 a {
182
+ color: #e62020; /* not the best, but no other idea */
186
183
  }
187
184
 
185
+ h1 { font-size: 230%; }
186
+ h2 { font-size: 180%; }
187
+ h3 { font-size: 150%; }
188
+ h4 { font-size: 120%; }
189
+ h5 { font-size: 105%; }
190
+ h6 { font-size: 100%; }
191
+
188
192
  #documentation > h1:first-child,
189
193
  #documentation > h2:first-child,
190
194
  #documentation > h3:first-child {
191
195
  margin-top: 0;
192
196
  }
193
197
 
194
- h4, h5, h6 {
195
- margin-top: 0.75em;
196
- border: none;
197
- }
198
-
199
198
  code {
200
- font-family: Monaco, Consolas, "Lucida Console", monospace;
199
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
201
200
  font-size: 100%;
202
201
  }
203
202
 
204
203
  pre {
205
- font-family: Monaco, Consolas, "Lucida Console", monospace;
204
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
206
205
  padding: 1ex;
207
- background-color: #f5f5f5; /* very pale grey */
206
+ background-color: #f8f8f8; /* very pale grey */
208
207
  }
209
208
 
210
209
  #documentation {
@@ -270,7 +269,7 @@ pre {
270
269
  #header a:hover {
271
270
  color: yellow;
272
271
  background-color: inherit;
273
- border-bottom: 1px dotted yellow;
272
+ border-bottom: 1px solid yellow;
274
273
  }
275
274
 
276
275
  .header-title {
@@ -283,7 +282,7 @@ pre {
283
282
  #header .parent { font-size: 130%; }
284
283
 
285
284
  #file-info {
286
- font-family: Monaco, Consolas, "Lucida Console", monospace;
285
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
287
286
  font-size: 90%;
288
287
  vertical-align: top;
289
288
  }
@@ -391,7 +390,7 @@ pre {
391
390
  }
392
391
  #method-list li {
393
392
  display: inline-block;
394
- font-family: Monaco, Consolas, "Lucida Console", monospace;
393
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
395
394
  font-size: 100%;
396
395
  padding: 2px 0;
397
396
  }
@@ -429,10 +428,10 @@ table.classes-modules {
429
428
  padding: 0.75ex 0 0 1ex;
430
429
  }
431
430
  .const-name p, .attr-name p {
432
- font-family: Monaco, Consolas, "Lucida Console", monospace;
431
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
433
432
  font-size: 100%;
434
433
  font-weight: bold;
435
- padding: 0 0.5ex 0 0.2ex;
434
+ padding: 0.3ex 0.5ex 0 0.2ex; /* top padding to align baselines */
436
435
  }
437
436
  .const-desc p, .attr-desc p {
438
437
  }
@@ -443,7 +442,7 @@ table.classes-modules {
443
442
  visibility: visible;
444
443
  }
445
444
  .const-value {
446
- font-family: Monaco, Consolas, "Lucida Console", monospace;
445
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
447
446
  display: none;
448
447
  }
449
448
 
@@ -457,7 +456,7 @@ table.classes-modules {
457
456
  */
458
457
 
459
458
  .method-detail {
460
- border: 1px dotted #ddd;
459
+ border: 1px solid #ddd;
461
460
  margin-top: 1em;
462
461
  padding-bottom: 1ex;
463
462
  /* cursor: pointer; */
@@ -475,10 +474,10 @@ table.classes-modules {
475
474
 
476
475
  .method-heading {
477
476
  position: relative;
478
- font-family: Monaco, Consolas, "Lucida Console", monospace;
477
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
479
478
  font-size: 105%;
480
479
  padding: 0.5ex 1ex;
481
- border-bottom: 1px dotted #ddd;
480
+ border-bottom: 1px solid #ddd;
482
481
  background-color: #eee;
483
482
  cursor: pointer;
484
483
  }
@@ -559,7 +558,7 @@ pre.method-source-code {
559
558
 
560
559
  /* requires */
561
560
  #file-details li {
562
- font-family: Monaco, Consolas, "Lucida Console", monospace;
561
+ font-family: Consolas, Monaco, "Lucida Console", monospace;
563
562
  }
564
563
 
565
564
  /* maybe JS stuff */
@@ -1,5 +1,4 @@
1
1
  require 'rdoc'
2
- require 'rdoc/generator/babel'
3
2
  require 'minitest/autorun'
4
3
  require 'tmpdir'
5
4
  require 'nokogiri'
@@ -168,14 +167,14 @@ class TestRDocGeneratorBabel < Minitest::Test
168
167
  check_call_seq '<<', <<-CALL, <<-HTML.strip
169
168
  ios << obj -> ios
170
169
  CALL
171
- ios <span class=\"c\">&lt;&lt;</span> obj &rarr; ios
170
+ ios <span class="c">&lt;&lt;</span> obj &rarr; ios
172
171
  HTML
173
172
 
174
173
  check_call_seq 'pos', <<-CALL, <<-HTML.strip.gsub("\n", '')
175
174
  ios.pos -> integer
176
175
  ios.tell -> integer
177
176
  CALL
178
- ios.<span class=\"c\">pos</span> &rarr; integer<br/>
177
+ ios.<span class="c">pos</span> &rarr; integer<br/>
179
178
  ios.tell &rarr; integer
180
179
  HTML
181
180
 
@@ -183,8 +182,8 @@ class TestRDocGeneratorBabel < Minitest::Test
183
182
  ios.readpartial(maxlen) -> string
184
183
  ios.readpartial(maxlen, outbuf) -> outbuf
185
184
  CALL
186
- ios.<span class=\"c\">readpartial</span>(maxlen) &rarr; string<br/>
187
- ios.<span class=\"c\">readpartial</span>(maxlen, outbuf) &rarr; outbuf
185
+ ios.<span class="c">readpartial</span>(maxlen) &rarr; string<br/>
186
+ ios.<span class="c">readpartial</span>(maxlen, outbuf) &rarr; outbuf
188
187
  HTML
189
188
 
190
189
  check_call_seq '[]', <<-CALL, <<-HTML.strip.gsub("\n", '')
@@ -195,9 +194,9 @@ class TestRDocGeneratorBabel < Minitest::Test
195
194
  array.slice(start, length) - an_array or nil
196
195
  array.slice(range) - an_array or nil
197
196
  CALL
198
- array<span class=\"c\">[</span>index<span class=\"c\">]</span> - obj or nil<br/>
199
- array<span class=\"c\">[</span>start, length<span class=\"c\">]</span> - an_array or nil<br/>
200
- array<span class=\"c\">[</span>range<span class=\"c\">]</span> - an_array or nil<br/>
197
+ array<span class="c">[</span>index<span class="c">]</span> - obj or nil<br/>
198
+ array<span class="c">[</span>start, length<span class="c">]</span> - an_array or nil<br/>
199
+ array<span class="c">[</span>range<span class="c">]</span> - an_array or nil<br/>
201
200
  array.slice(index) - obj or nil<br/>
202
201
  array.slice(start, length) - an_array or nil<br/>
203
202
  array.slice(range) - an_array or nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc-babel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thierry Lambert
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2022-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '6.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
26
+ version: '6.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.11'
33
+ version: '5.14'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.11'
40
+ version: '5.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,44 +52,23 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.10'
55
- - !ruby/object:Gem::Dependency
56
- name: hoe
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3.18'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.18'
69
- description: |-
55
+ description: |
70
56
  Babel is an RDoc formatter producing HTML documentation.
71
- The default template is +ruby-lang+.
72
-
73
- - Look and feel inspired from ruby-lang.org[http://www.ruby-lang.org/].
57
+ The default template is +ruby-lang+:
58
+ - Look and feel inspired from https://www.ruby-lang.org/.
74
59
  - Dual-frame output, with indexes on the left.
75
60
  - Search boxes for classes and methods.
76
61
  - Links to undocumented classes/methods are grayed.
77
62
  - Highlights target methods, attributes and constants.
78
63
  - Adds links to ancestor methods/attributes.
79
- - Borrows some ideas (and one icon) from Darkfish.
80
- - Tested on Firefox 3.5 & 5, Chrome 9 & 12, Safari 4 & 5.
81
- email:
82
- - thyresias@gmail.com
64
+ email: thyresias@gmail.com
83
65
  executables: []
84
66
  extensions: []
85
67
  extra_rdoc_files:
86
- - HISTORY.rdoc
87
- - Manifest.txt
88
68
  - README.rdoc
69
+ - HISTORY.rdoc
89
70
  files:
90
- - ".autotest"
91
71
  - HISTORY.rdoc
92
- - Manifest.txt
93
72
  - README.rdoc
94
73
  - Rakefile
95
74
  - lib/rdoc/discover.rb
@@ -104,7 +83,6 @@ files:
104
83
  - lib/rdoc/generator/ruby-lang/scripts/jquery.js
105
84
  - lib/rdoc/generator/ruby-lang/scripts/jquery.quicksearch.js
106
85
  - lib/rdoc/generator/ruby-lang/scripts/mainFrame.js
107
- - lib/rdoc_babel.rb
108
86
  - test/data/HISTORY.rdoc
109
87
  - test/data/README.rdoc
110
88
  - test/data/ancestors.rb
@@ -115,12 +93,14 @@ files:
115
93
  - test/data/no_content.rb
116
94
  - test/data/not_commented.rb
117
95
  - test/test_rdoc_generator_babel.rb
118
- homepage: http://github.com/thyresias/rdoc-babel
96
+ homepage: https://github.com/thyresias/rdoc-babel
119
97
  licenses:
120
98
  - MIT
121
99
  metadata: {}
122
- post_install_message:
100
+ post_install_message:
123
101
  rdoc_options:
102
+ - "--title"
103
+ - RDoc Babel
124
104
  - "--main"
125
105
  - README.rdoc
126
106
  require_paths:
@@ -136,8 +116,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
116
  - !ruby/object:Gem::Version
137
117
  version: '0'
138
118
  requirements: []
139
- rubygems_version: 3.0.4
140
- signing_key:
119
+ rubygems_version: 3.3.8
120
+ signing_key:
141
121
  specification_version: 4
142
122
  summary: An RDoc formatter producing HTML documentation.
143
123
  test_files: []
data/.autotest DELETED
@@ -1,12 +0,0 @@
1
- require 'autotest/restart'
2
-
3
- Autotest.add_hook :initialize do |at|
4
- at.testlib = 'minitest/unit'
5
- class << at
6
- alias zen_path_to_classname path_to_classname
7
- def path_to_classname(s)
8
- zen_path_to_classname(s).sub('Rdoc', 'RDoc')
9
- end
10
- end
11
- end
12
-
data/Manifest.txt DELETED
@@ -1,28 +0,0 @@
1
- .autotest
2
- HISTORY.rdoc
3
- Manifest.txt
4
- Rakefile
5
- README.rdoc
6
- lib/rdoc/discover.rb
7
- lib/rdoc/generator/babel.rb
8
- lib/rdoc/generator/ruby-lang/class-page.html.erb
9
- lib/rdoc/generator/ruby-lang/file-page.html.erb
10
- lib/rdoc/generator/ruby-lang/images/zoom.png
11
- lib/rdoc/generator/ruby-lang/index.html.erb
12
- lib/rdoc/generator/ruby-lang/indexes.html.erb
13
- lib/rdoc/generator/ruby-lang/rdoc.css
14
- lib/rdoc/generator/ruby-lang/scripts/indexFrame.js
15
- lib/rdoc/generator/ruby-lang/scripts/jquery.js
16
- lib/rdoc/generator/ruby-lang/scripts/jquery.quicksearch.js
17
- lib/rdoc/generator/ruby-lang/scripts/mainFrame.js
18
- lib/rdoc_babel.rb
19
- test/data/ancestors.rb
20
- test/data/commented.rb
21
- test/data/context_alias.rb
22
- test/data/HISTORY.rdoc
23
- test/data/main_file.rb
24
- test/data/not_commented.rb
25
- test/data/no_class_nor_module.rb
26
- test/data/no_content.rb
27
- test/data/README.rdoc
28
- test/test_rdoc_generator_babel.rb
data/lib/rdoc_babel.rb DELETED
@@ -1,3 +0,0 @@
1
- module RDocBabel
2
- VERSION = '1.0.4'
3
- end