rdoc-markdown 0.4 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.streerc +2 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +12 -34
- data/README.md +1 -1
- data/Rakefile +1 -2
- data/example/Bird.md +4 -3
- data/example/Duck.md +9 -7
- data/example/RDoc/Markdown.md +5 -1
- data/example/RDoc.md +1 -1
- data/lib/rdoc/discover.rb +7 -1
- data/lib/rdoc/generator/markdown.rb +24 -20
- data/lib/rdoc/markdown/version.rb +1 -1
- data/lib/templates/classfile.md.erb +6 -2
- data/rdoc-markdown.gemspec +44 -0
- metadata +5 -19
- data/example/Rdoc/Markdown.md +0 -6
- data/example/Rdoc.md +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '04187562054e01d97859f87c42e588055506e1d0ab78669835b5f65a7e14c593'
|
4
|
+
data.tar.gz: a820cbc371a8162c16d9890bac3314f8b7ae48d04b94008ceae9fd6bdcf5e97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee0a7344183d0fe1a18c73f405788992f17f049dea350fc2f9a6160796d0504eadbaf4776ffb12a5aa647e161b8ef286d52d2b471547a5de7afe529638c76216
|
7
|
+
data.tar.gz: c3ac8c7a7de779783384a36474419e80bbddcf219727ed13694ad238055c7b9ca88b7d86deda629f6c1861cfe0f1d2453d20dc9ab98b5b9f46a0cbf83fe19369
|
data/.streerc
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rdoc-markdown (0.4)
|
4
|
+
rdoc-markdown (0.4.2)
|
5
5
|
erb (~> 2.0)
|
6
6
|
extralite-bundle (~> 1.0)
|
7
7
|
rdoc (~> 6.0)
|
@@ -11,57 +11,34 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
ast (2.4.2)
|
15
14
|
cgi (0.3.3)
|
16
15
|
erb (2.2.3)
|
17
16
|
cgi
|
18
17
|
extralite-bundle (1.17)
|
19
|
-
|
18
|
+
mini_portile2 (2.8.4)
|
20
19
|
minitest (5.16.3)
|
21
|
-
nokogiri (1.13.9
|
20
|
+
nokogiri (1.13.9)
|
21
|
+
mini_portile2 (~> 2.8.0)
|
22
22
|
racc (~> 1.4)
|
23
|
-
|
24
|
-
racc (~> 1.4)
|
25
|
-
parallel (1.22.1)
|
26
|
-
parser (3.1.2.1)
|
27
|
-
ast (~> 2.4.1)
|
23
|
+
prettier_print (1.2.1)
|
28
24
|
psych (4.0.6)
|
29
25
|
stringio
|
30
26
|
racc (1.6.0)
|
31
|
-
rainbow (3.1.1)
|
32
27
|
rake (13.0.6)
|
33
28
|
rdiscount (2.2.7)
|
34
29
|
rdoc (6.4.0)
|
35
30
|
psych (>= 4.0.0)
|
36
|
-
regexp_parser (2.6.1)
|
37
31
|
reverse_markdown (2.1.1)
|
38
32
|
nokogiri
|
39
|
-
rexml (3.2.5)
|
40
|
-
rubocop (1.39.0)
|
41
|
-
json (~> 2.3)
|
42
|
-
parallel (~> 1.10)
|
43
|
-
parser (>= 3.1.2.1)
|
44
|
-
rainbow (>= 2.2.2, < 4.0)
|
45
|
-
regexp_parser (>= 1.8, < 3.0)
|
46
|
-
rexml (>= 3.2.5, < 4.0)
|
47
|
-
rubocop-ast (>= 1.23.0, < 2.0)
|
48
|
-
ruby-progressbar (~> 1.7)
|
49
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
50
|
-
rubocop-ast (1.23.0)
|
51
|
-
parser (>= 3.1.1.0)
|
52
|
-
rubocop-performance (1.15.1)
|
53
|
-
rubocop (>= 1.7.0, < 2.0)
|
54
|
-
rubocop-ast (>= 0.4.0)
|
55
|
-
ruby-progressbar (1.11.0)
|
56
|
-
standard (1.18.1)
|
57
|
-
rubocop (= 1.39.0)
|
58
|
-
rubocop-performance (= 1.15.1)
|
59
33
|
stringio (3.0.2)
|
60
|
-
|
34
|
+
syntax_tree (6.1.1)
|
35
|
+
prettier_print (>= 1.2.0)
|
36
|
+
syntax_tree-disable_ternary (1.0.0)
|
61
37
|
unindent (1.0)
|
62
38
|
|
63
39
|
PLATFORMS
|
64
40
|
arm64-darwin-21
|
41
|
+
arm64-darwin-22
|
65
42
|
x86_64-linux
|
66
43
|
|
67
44
|
DEPENDENCIES
|
@@ -70,7 +47,8 @@ DEPENDENCIES
|
|
70
47
|
rake (~> 13.0)
|
71
48
|
rdiscount (~> 2.0)
|
72
49
|
rdoc-markdown!
|
73
|
-
|
50
|
+
syntax_tree
|
51
|
+
syntax_tree-disable_ternary
|
74
52
|
|
75
53
|
BUNDLED WITH
|
76
|
-
2.
|
54
|
+
2.4.19
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ RDoc will auto-detect rdoc-markdown plugin if it was installed. You just need to
|
|
22
22
|
|
23
23
|
Run following command in directory with ruby source code:
|
24
24
|
|
25
|
-
`rdoc --format=markdown
|
25
|
+
`rdoc --format=markdown`
|
26
26
|
|
27
27
|
This will produce a tree of markdown documents and search index in `/doc` folder. Every class in library will have it's own markdown file.
|
28
28
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
|
-
require "standard/rake"
|
4
3
|
|
5
4
|
Rake::TestTask.new do |t|
|
6
5
|
t.verbose = true
|
@@ -8,4 +7,4 @@ Rake::TestTask.new do |t|
|
|
8
7
|
t.test_files = FileList["test/test*.rb"]
|
9
8
|
end
|
10
9
|
|
11
|
-
task default: [:test
|
10
|
+
task default: [:test]
|
data/example/Bird.md
CHANGED
@@ -7,10 +7,11 @@ The base class for all birds.
|
|
7
7
|
|
8
8
|
Flying is the most critical feature of birds.
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
fly(:south, 70)
|
10
|
+
# Example[¶](#method-i-fly-label-Example) [↑](#top)
|
13
11
|
|
12
|
+
```
|
13
|
+
fly(:south,70)
|
14
|
+
```
|
14
15
|
### speak() { |text| ... } [](#method-i-speak)
|
15
16
|
Produce some noise.
|
16
17
|
|
data/example/Duck.md
CHANGED
@@ -3,21 +3,22 @@ A duck is a [`Waterfowl`](Waterfowl.html) [`Bird`](Bird.html).
|
|
3
3
|
|
4
4
|
Features:
|
5
5
|
|
6
|
+
```
|
6
7
|
bird::
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
- fly
|
9
|
+
* speak
|
10
|
+
* fly
|
11
11
|
|
12
12
|
waterfowl::
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
* swim
|
15
|
+
```
|
16
16
|
## Constants
|
17
17
|
| Name | Description |
|
18
18
|
| ---- | ----------- |
|
19
19
|
| **MAX_VELOCITY[](#MAX_VELOCITY)** | Not documented |
|
20
|
-
|
20
|
+
# Bird overrides
|
21
|
+
## Constants
|
21
22
|
| Name | Description |
|
22
23
|
| ---- | ----------- |
|
23
24
|
| **MAX_VELOCITY[](#MAX_VELOCITY)** | Not documented |
|
@@ -25,7 +26,8 @@ waterfowl::
|
|
25
26
|
### speak() { |speech| ... } [](#method-i-speak)
|
26
27
|
[`Duck`](Duck.html) overrides generic implementation.
|
27
28
|
|
28
|
-
|
29
|
+
# Duck extensions
|
30
|
+
## Constants
|
29
31
|
| Name | Description |
|
30
32
|
| ---- | ----------- |
|
31
33
|
| **MAX_VELOCITY[](#MAX_VELOCITY)** | Not documented |
|
data/example/RDoc/Markdown.md
CHANGED
data/example/RDoc.md
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
# module
|
1
|
+
# module Rdoc [](#module-Rdoc) [](#top)
|
2
2
|
|
data/lib/rdoc/discover.rb
CHANGED
@@ -14,9 +14,7 @@ class RDoc::Generator::Markdown
|
|
14
14
|
##
|
15
15
|
# Defines a constant for directory where templates could be found
|
16
16
|
|
17
|
-
TEMPLATE_DIR = File.expand_path(
|
18
|
-
File.join(File.dirname(__FILE__), "..", "..", "templates")
|
19
|
-
)
|
17
|
+
TEMPLATE_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "templates"))
|
20
18
|
|
21
19
|
##
|
22
20
|
# The RDoc::Store that is the source of the generated content
|
@@ -114,7 +112,7 @@ class RDoc::Generator::Markdown
|
|
114
112
|
result << {
|
115
113
|
name: klass.full_name,
|
116
114
|
type: klass.type.capitalize,
|
117
|
-
path: turn_to_path(klass.full_name)
|
115
|
+
path: turn_to_path(klass.full_name),
|
118
116
|
}
|
119
117
|
|
120
118
|
klass.method_list.each do |method|
|
@@ -123,25 +121,31 @@ class RDoc::Generator::Markdown
|
|
123
121
|
result << {
|
124
122
|
name: "#{klass.full_name}.#{method.name}",
|
125
123
|
type: "Method",
|
126
|
-
path: "#{turn_to_path(klass.full_name)}##{method.aref}"
|
124
|
+
path: "#{turn_to_path(klass.full_name)}##{method.aref}",
|
127
125
|
}
|
128
126
|
end
|
129
127
|
|
130
|
-
klass
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
}
|
144
|
-
|
128
|
+
klass
|
129
|
+
.constants
|
130
|
+
.sort_by { |x| x.name }
|
131
|
+
.each do |const|
|
132
|
+
result << {
|
133
|
+
name: "#{klass.full_name}.#{const.name}",
|
134
|
+
type: "Constant",
|
135
|
+
path: "#{turn_to_path(klass.full_name)}##{const.name}",
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
klass
|
140
|
+
.attributes
|
141
|
+
.sort_by { |x| x.name }
|
142
|
+
.each do |attr|
|
143
|
+
result << {
|
144
|
+
name: "#{klass.full_name}.#{attr.name}",
|
145
|
+
type: "Attribute",
|
146
|
+
path: "#{turn_to_path(klass.full_name)}##{attr.aref}",
|
147
|
+
}
|
148
|
+
end
|
145
149
|
end
|
146
150
|
|
147
151
|
result.each do |rec|
|
@@ -1,8 +1,12 @@
|
|
1
1
|
# <%= klass.type %> <%= klass.full_name %> [](#<%= klass.aref.strip %>) [](#top)
|
2
2
|
<%= h klass.description %>
|
3
3
|
<% klass.each_section do |section, constants, attributes| %>
|
4
|
-
<% if section.title
|
5
|
-
|
4
|
+
<% if section.title %># <%= section.title.strip %>
|
5
|
+
|
6
|
+
<% end %>
|
7
|
+
<% if section.comment %> <%=h section.description %>
|
8
|
+
|
9
|
+
<%end%>
|
6
10
|
<% unless klass.constants.empty? %>
|
7
11
|
## Constants
|
8
12
|
| Name | Description |
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/rdoc/markdown/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "rdoc-markdown"
|
7
|
+
spec.version = Rdoc::Markdown::VERSION
|
8
|
+
spec.authors = ["Stanislav (Stas) Katkov"]
|
9
|
+
spec.email = ["github@skatkov.com"]
|
10
|
+
spec.license = "GPL-3.0-or-later"
|
11
|
+
|
12
|
+
spec.summary = "RDoc plugin to generate markdown documentation "
|
13
|
+
spec.description = "RDoc plugin to generate markdown documentation and search index as sqlite database for entire content."
|
14
|
+
spec.homepage = "https://poshtui.com"
|
15
|
+
spec.required_ruby_version = ">= 2.7.0"
|
16
|
+
|
17
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
18
|
+
|
19
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
spec.metadata["source_code_uri"] = "https://github.com/skatkov/rdoc-markdown"
|
21
|
+
spec.metadata["changelog_uri"] = "https://github.com/skatkov/rdoc-markdown"
|
22
|
+
|
23
|
+
# Specify which files should be added to the gem when it is released.
|
24
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
25
|
+
spec.files = Dir.chdir(__dir__) do
|
26
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
|
+
end
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_dependency "rdoc", "~> 6.0"
|
35
|
+
spec.add_dependency "erb", "~> 2.0"
|
36
|
+
spec.add_dependency "reverse_markdown", "~> 2.0"
|
37
|
+
spec.add_dependency "extralite-bundle", "~> 1.0"
|
38
|
+
spec.add_dependency "unindent", "~> 1.0"
|
39
|
+
|
40
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
41
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
42
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
43
|
+
spec.add_development_dependency "rdiscount", "~> 2.0"
|
44
|
+
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:
|
4
|
+
version: 0.4.2
|
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:
|
11
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -122,20 +122,6 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: standard
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1.0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '1.0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
126
|
name: rdiscount
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,6 +146,7 @@ extra_rdoc_files: []
|
|
160
146
|
files:
|
161
147
|
- ".editorconfig"
|
162
148
|
- ".standard.yml"
|
149
|
+
- ".streerc"
|
163
150
|
- CODE_OF_CONDUCT.md
|
164
151
|
- Gemfile
|
165
152
|
- Gemfile.lock
|
@@ -173,8 +160,6 @@ files:
|
|
173
160
|
- example/RDoc/Generator.md
|
174
161
|
- example/RDoc/Generator/Markdown.md
|
175
162
|
- example/RDoc/Markdown.md
|
176
|
-
- example/Rdoc.md
|
177
|
-
- example/Rdoc/Markdown.md
|
178
163
|
- example/TestGenerator.md
|
179
164
|
- example/Waterfowl.md
|
180
165
|
- example/index.db
|
@@ -183,6 +168,7 @@ files:
|
|
183
168
|
- lib/rdoc/generator/markdown.rb
|
184
169
|
- lib/rdoc/markdown/version.rb
|
185
170
|
- lib/templates/classfile.md.erb
|
171
|
+
- rdoc-markdown.gemspec
|
186
172
|
- sig/rdoc/markdown.rbs
|
187
173
|
homepage: https://poshtui.com
|
188
174
|
licenses:
|
@@ -206,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
192
|
- !ruby/object:Gem::Version
|
207
193
|
version: '0'
|
208
194
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.4.20
|
210
196
|
signing_key:
|
211
197
|
specification_version: 4
|
212
198
|
summary: RDoc plugin to generate markdown documentation
|
data/example/Rdoc/Markdown.md
DELETED
data/example/Rdoc.md
DELETED