rdoc-markdown 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +24 -10
- data/lib/rdoc/generator/markdown.rb +11 -1
- data/lib/rdoc/markdown/version.rb +1 -1
- data/lib/templates/classfile.md.erb +12 -13
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9cdfb6613fd3bab8a492f7faa4338178df35489955e3282b70ab32002624be5
|
4
|
+
data.tar.gz: a09b470cfeb56feff5b7867fe9b59be2242ad6be49454d0198b33995c780c1aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8404bb773b50e88d87648e4cf516ac87bd9a8c0d0455f93980ba590d7d02912879d7abec888bbd04da88cb3c625f1c1c15d1cec7819c5fed717dbbd0b134f2cd
|
7
|
+
data.tar.gz: a8a8c38c3cbe9f93caf9dfe4f81d79ba568116f10d549cac561a794394273a3296afbcee54440ff0b1319cef62023b42ac5a299de055e6f6d8da48e63758dab8
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rdoc-markdown (0.1.
|
4
|
+
rdoc-markdown (0.1.5)
|
5
5
|
erb (~> 2.0)
|
6
6
|
rdoc (~> 6.0)
|
7
|
+
reverse_markdown (~> 2.0)
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
@@ -12,34 +13,47 @@ GEM
|
|
12
13
|
cgi (0.3.3)
|
13
14
|
erb (2.2.3)
|
14
15
|
cgi
|
16
|
+
json (2.6.2)
|
15
17
|
minitest (5.16.3)
|
18
|
+
nokogiri (1.13.8-arm64-darwin)
|
19
|
+
racc (~> 1.4)
|
20
|
+
nokogiri (1.13.8-x86_64-linux)
|
21
|
+
racc (~> 1.4)
|
16
22
|
parallel (1.22.1)
|
17
23
|
parser (3.1.2.1)
|
18
24
|
ast (~> 2.4.1)
|
25
|
+
psych (4.0.6)
|
26
|
+
stringio
|
27
|
+
racc (1.6.0)
|
19
28
|
rainbow (3.1.1)
|
20
29
|
rake (13.0.6)
|
21
30
|
rdiscount (2.2.0.2)
|
22
|
-
rdoc (6.
|
23
|
-
|
31
|
+
rdoc (6.4.0)
|
32
|
+
psych (>= 4.0.0)
|
33
|
+
regexp_parser (2.6.0)
|
34
|
+
reverse_markdown (2.1.1)
|
35
|
+
nokogiri
|
24
36
|
rexml (3.2.5)
|
25
|
-
rubocop (1.
|
37
|
+
rubocop (1.35.1)
|
38
|
+
json (~> 2.3)
|
26
39
|
parallel (~> 1.10)
|
27
|
-
parser (>= 3.1.
|
40
|
+
parser (>= 3.1.2.1)
|
28
41
|
rainbow (>= 2.2.2, < 4.0)
|
29
42
|
regexp_parser (>= 1.8, < 3.0)
|
30
43
|
rexml (>= 3.2.5, < 4.0)
|
31
|
-
rubocop-ast (>= 1.
|
44
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
32
45
|
ruby-progressbar (~> 1.7)
|
33
46
|
unicode-display_width (>= 1.4.0, < 3.0)
|
34
47
|
rubocop-ast (1.21.0)
|
35
48
|
parser (>= 3.1.1.0)
|
36
|
-
rubocop-performance (1.
|
49
|
+
rubocop-performance (1.14.3)
|
37
50
|
rubocop (>= 1.7.0, < 2.0)
|
38
51
|
rubocop-ast (>= 0.4.0)
|
39
52
|
ruby-progressbar (1.11.0)
|
40
|
-
standard (1.
|
41
|
-
rubocop (= 1.
|
42
|
-
rubocop-performance (= 1.
|
53
|
+
standard (1.16.1)
|
54
|
+
rubocop (= 1.35.1)
|
55
|
+
rubocop-performance (= 1.14.3)
|
56
|
+
stringio (3.0.2)
|
43
57
|
unicode-display_width (2.3.0)
|
44
58
|
|
45
59
|
PLATFORMS
|
@@ -4,6 +4,7 @@ gem "rdoc"
|
|
4
4
|
|
5
5
|
require "pathname"
|
6
6
|
require "erb"
|
7
|
+
require "reverse_markdown"
|
7
8
|
|
8
9
|
# Markdown generator.
|
9
10
|
# Registers command line options and generates markdown files
|
@@ -114,10 +115,19 @@ class RDoc::Generator::Markdown
|
|
114
115
|
out_file = Pathname.new("#{output_dir}/#{klass.full_name}.md")
|
115
116
|
out_file.dirname.mkpath
|
116
117
|
|
117
|
-
|
118
|
+
result = template.result(binding)
|
119
|
+
|
120
|
+
File.write(out_file, result)
|
118
121
|
end
|
119
122
|
end
|
120
123
|
|
124
|
+
|
125
|
+
private
|
126
|
+
|
127
|
+
def h(string)
|
128
|
+
ReverseMarkdown.convert string.strip, github_flavored: true
|
129
|
+
end
|
130
|
+
|
121
131
|
def setup
|
122
132
|
return if instance_variable_defined?(:@output_dir)
|
123
133
|
|
@@ -1,22 +1,21 @@
|
|
1
|
-
# <%= klass
|
2
|
-
## <% if klass.type == 'class' %><%= klass.type.capitalize %>[<%= klass.full_name %>](<%= klass&.path %>)<% if klass.superclass %> inherits from <% end %><% unless String === klass.superclass %>
|
3
|
-
<% if klass.description && !klass.description.empty? %><%= klass.description %><% end %>
|
1
|
+
# <%= klass.name %>
|
2
|
+
## <% if klass.type == 'class' %><%= klass.type.capitalize %> [<%= klass.full_name %>](<%= klass&.path %>)<% if klass.superclass %> inherits from <% end %><% unless String === klass.superclass %>[<%= klass.superclass&.name %>](<%= klass.superclass&.path %>) <% else %> <%= klass.superclass %> <% end %> <% else %> <%= klass.type.capitalize %>[<%= klass&.name %>](<%= klass&.path %>) <% end %>
|
3
|
+
<% if klass.description && !klass.description.empty? %><%= h klass.description %><% end %>
|
4
4
|
<% unless klass.constants.empty? %>
|
5
5
|
### Constants
|
6
|
-
<% klass.constants.sort_by { |x| x
|
7
|
-
|
6
|
+
<% klass.constants.sort_by { |x| x.name }.each do |const| %> <%= const.name %>
|
7
|
+
<%= h const.description %>
|
8
|
+
<% end %><% end %>
|
8
9
|
<% unless klass.attributes.empty? %>
|
9
10
|
### Attributes
|
10
|
-
<% klass.attributes.sort_by { |x| x
|
11
|
+
<% klass.attributes.sort_by { |x| x.name }.each do |attr| %><%= attr.name %>
|
11
12
|
<%= attr.rw %>
|
12
|
-
<%= attr.description %>
|
13
|
-
<% end %><% end %>
|
13
|
+
<%= h attr.description %><% end %><% end %>
|
14
14
|
<% unless klass_methods.empty? %>
|
15
15
|
### Public Class Methods
|
16
|
-
<% klass_methods.each do |method| %>[<%= method
|
17
|
-
<%= method.description %><% end %>
|
18
|
-
<% end %>
|
16
|
+
<% klass_methods.each do |method| %>[<%= method.name %><%= method.params %>](<%= method.aref %>)
|
17
|
+
<%= h method.description %><% end %><% end %>
|
19
18
|
<% unless instance_methods.empty? %>
|
20
19
|
### Public Instance Methods
|
21
|
-
<% instance_methods.each do |method| %>[<%= method
|
22
|
-
|
20
|
+
<% instance_methods.each do |method| %>[<%= method.name %><%= method.params %>](<%= method.aref %>)
|
21
|
+
<% if method.name %><%= h method.description %><% end %><% end %><% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdoc-markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stanislav (Stas) Katkov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: reverse_markdown
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: minitest
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|