rdoc-babel 1.0.0 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2f7ec88ffbcd36a682da0814c2f89b107448be7e
4
- data.tar.gz: 77ca385dee05d1d29333c848954e4c2049876403
2
+ SHA256:
3
+ metadata.gz: 0f3a9a864631f9ecf3f446e3297fe4a9c17d171e921f127bdd9a410c650daad5
4
+ data.tar.gz: 2f6046c1008775bf41816b7ddba1af7b5213431a2934e41d750345c30c0b25e9
5
5
  SHA512:
6
- metadata.gz: ec85494b8e8c08baae241cf95072ab0efbadd7746a52caacbb7db4880a486e75d73859131ef5065b53cd6f90f09ff378a58cd7daad94a2cc46dfc11d108c6b6c
7
- data.tar.gz: d041bee6d46b9721f7aaba7d1d71e2b13dffc6896bbb9bbcd47363142fa05f2e1dfd608b7c6ecf9b1767f4154dc9bdadf6ffe502050de4e7ffe79e2dedeb565c
6
+ metadata.gz: 8ac3b681e7d3b44bb9cbc078002c33c657a50617dfa7aeee6e027d6d610137987559c8b9047496df6d1233f2fae8ec2d88832b8ff8fea0ee171e704bd59294e7
7
+ data.tar.gz: 9f96ce72a6ec9b4660c077b4bf199b0210ef11d4acf7c88be26280b1315abca64576da24a88ce25b6eebdb5928b6e7e6817658c13037e37cb459a7e5ba9943f0
@@ -1,12 +1,35 @@
1
1
 
2
- === 0.9.0 / 2010-10-02
2
+ === 1.0.5 / 2020-06-01
3
3
 
4
- Initial version, developed along with {RDoc}[http://github.com/rdoc/rdoc] 3.0.
4
+ * Fix warning with Ruby 2.7
5
+ * Tune CSS for definition lists
5
6
 
6
- === 0.9.1 / 2011-07-16
7
+ === 1.0.4 / 2019-08-02
7
8
 
8
- First public release.
9
+ Fix for latest ERB syntax.
10
+
11
+ === 1.0.3 / 2019-07-29
12
+
13
+ Compatibility with RDoc 6.
14
+
15
+ === 1.0.2 / 2017-02-25
16
+
17
+ Fix for compatibility with RDoc 5 dupping the options.
18
+
19
+ === 1.0.1 / 2015-06-29
20
+
21
+ * Fix rendering of Markdown files
22
+ * Fix CSS file (code instead of tt)
9
23
 
10
24
  === 1.0.0 / 2014-07-20
11
25
 
12
26
  Make it compatible with RDoc 4.1 and its bugs.
27
+
28
+ === 0.9.1 / 2011-07-16
29
+
30
+ First public release.
31
+
32
+ === 0.9.0 / 2010-10-02
33
+
34
+ Initial version, developed along with {RDoc}[http://github.com/rdoc/rdoc] 3.0.
35
+
@@ -70,8 +70,8 @@ Babel supports specific options in addition to the standard RDoc options:
70
70
 
71
71
  == Requirements
72
72
 
73
- - Ruby >= 1.8.7
74
- - RDoc >= 3.0
73
+ - Ruby >= 2.3.0 (may work with >= 1.9.3, but untested)
74
+ - RDoc >= 5.0 (may work with >= 4.0, but untested)
75
75
 
76
76
  == Installation
77
77
 
@@ -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 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,11 @@
1
- require 'hoe'
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', '~> 4.1']
20
-
21
- self.extra_dev_deps << ['minitest', '~> 5.4']
22
- self.extra_dev_deps << ['nokogiri', '~> 1.6']
23
-
24
- spec_extras[:homepage] = 'http://github.com/thyresias/rdoc-babel'
25
- spec_extras[:rdoc_options] = %w(--main README.rdoc)
1
+ require "rake/testtask"
26
2
 
3
+ Rake::TestTask.new do |t|
4
+ t.test_files = FileList['test/test*.rb']
27
5
  end
28
6
 
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 }
7
+ desc 'build & install gem'
8
+ task 'gem' do
9
+ system 'gem build rdoc-babel.gemspec'
10
+ system 'gem install rdoc-babel --local'
33
11
  end
@@ -73,7 +73,8 @@ class RDoc::Generator::Babel
73
73
  :see_standard_ancestors => false,
74
74
  }
75
75
 
76
- rdoc_options.extend Options
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
77
78
  rdoc_options.babel_options = options
78
79
 
79
80
  opt = rdoc_options.option_parser
@@ -131,7 +132,7 @@ class RDoc::Generator::Babel
131
132
  @options = options
132
133
  @babel_options = options.babel_options
133
134
  @see_standard_ancestors = @babel_options[:see_standard_ancestors]
134
- RDoc::AnyMethod.add_line_numbers = options.line_numbers
135
+ RDoc::AnyMethod.add_line_numbers = options.line_numbers if RDoc::AnyMethod.respond_to? :add_line_numbers
135
136
  @options.template = 'ruby-lang' if @options.template == 'babel' # TODO leave template nil
136
137
  @template_dir = TEMPLATE_ROOT + @options.template
137
138
  @template_dir.directory? or raise RDoc::Error, "template not found: '#@template_dir'"
@@ -211,7 +212,7 @@ class RDoc::Generator::Babel
211
212
  if source_path.directory?
212
213
  out_path.mkpath unless @options.dry_run
213
214
  else
214
- 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
215
216
  end
216
217
  end
217
218
  end
@@ -369,7 +370,7 @@ protected
369
370
  @stylesheet_url = @babel_options[:stylesheet_url] || (@rel_prefix + 'rdoc.css').to_s
370
371
 
371
372
  template_src = template_file.read
372
- template = ERB.new(template_src, nil, '><')
373
+ template = ERB.new(template_src, trim_mode: '<>')
373
374
  template.filename = template_file.to_s
374
375
 
375
376
  output = nil
@@ -18,7 +18,7 @@
18
18
  </p>
19
19
  </div>
20
20
  <div id="documentation">
21
- <% if @file.parser == RDoc::Parser::Simple %>
21
+ <% if @file.parser == RDoc::Parser::Simple || @file.parser == RDoc::Parser::Markdown %>
22
22
  <%= @file.description %>
23
23
  <% else %>
24
24
  <% unless @file.comment.empty? %>
@@ -24,16 +24,30 @@ td {
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 tt { 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; }
50
+ dl.note-list dd p { margin-top: 0; margin-left: 1ex; }
37
51
 
38
52
  table {
39
53
  border-collapse: collapse;
@@ -196,7 +210,11 @@ h4, h5, h6 {
196
210
  border: none;
197
211
  }
198
212
 
199
- tt {
213
+ h4 {
214
+ font-weight: bold;
215
+ }
216
+
217
+ code {
200
218
  font-family: Monaco, Consolas, "Lucida Console", monospace;
201
219
  font-size: 100%;
202
220
  }
@@ -1,3 +1,3 @@
1
1
  module RDocBabel
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.5'
3
3
  end
@@ -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'
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.0
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thierry Lambert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2020-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -16,81 +16,59 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '6.2'
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: '4.1'
26
+ version: '6.2'
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.4'
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.4'
40
+ version: '5.14'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '1.10'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
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.12'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3.12'
69
- description: |-
54
+ version: '1.10'
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
- - ".gemtest"
92
71
  - HISTORY.rdoc
93
- - Manifest.txt
94
72
  - README.rdoc
95
73
  - Rakefile
96
74
  - lib/rdoc/discover.rb
@@ -116,12 +94,14 @@ files:
116
94
  - test/data/no_content.rb
117
95
  - test/data/not_commented.rb
118
96
  - test/test_rdoc_generator_babel.rb
119
- homepage: http://github.com/thyresias/rdoc-babel
97
+ homepage: https://github.com/thyresias/rdoc-babel
120
98
  licenses:
121
99
  - MIT
122
100
  metadata: {}
123
101
  post_install_message:
124
102
  rdoc_options:
103
+ - "--title"
104
+ - RDoc Babel
125
105
  - "--main"
126
106
  - README.rdoc
127
107
  require_paths:
@@ -137,10 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
117
  - !ruby/object:Gem::Version
138
118
  version: '0'
139
119
  requirements: []
140
- rubyforge_project:
141
- rubygems_version: 2.4.1
120
+ rubygems_version: 3.1.2
142
121
  signing_key:
143
122
  specification_version: 4
144
123
  summary: An RDoc formatter producing HTML documentation.
145
- test_files:
146
- - test/test_rdoc_generator_babel.rb
124
+ 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/.gemtest DELETED
File without changes
@@ -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