rdoc-markdown 0.17.2 → 0.19.0
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 +4 -4
- data/CHANGELOG.md +8 -1
- data/README.md +19 -82
- data/lib/markdown.rb +0 -4
- data/lib/rdoc/discover.rb +1 -7
- data/lib/rdoc/generator/markdown/conversion.rb +196 -0
- data/lib/rdoc/generator/markdown/crossref.rb +13 -5
- data/lib/rdoc/generator/markdown/descriptions.rb +163 -0
- data/lib/rdoc/generator/markdown/index.rb +47 -0
- data/lib/rdoc/generator/markdown/paths.rb +118 -0
- data/lib/rdoc/generator/markdown/selection.rb +39 -0
- data/lib/rdoc/generator/markdown/signatures.rb +174 -0
- data/lib/rdoc/generator/markdown.rb +80 -680
- data/lib/rdoc/markdown/version.rb +1 -1
- data/lib/templates/classfile.md.erb +14 -11
- metadata +19 -43
- data/.editorconfig +0 -13
- data/.erb_lint.yml +0 -36
- data/.erb_linters/no_embedded_assets.rb +0 -29
- data/.erb_linters/non_raw_html.rb +0 -29
- data/.standard.yml +0 -3
- data/.yard-lint.yml +0 -290
- data/AGENTS.md +0 -50
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -202
- data/Rakefile +0 -296
- data/example/Bird.md +0 -21
- data/example/Duck.md +0 -56
- data/example/Object.md +0 -8
- data/example/Waterfowl.md +0 -9
- data/example/index.csv +0 -16
- data/example/jekyll-seo-tag/Jekyll/SeoTag/AuthorDrop.md +0 -35
- data/example/jekyll-seo-tag/Jekyll/SeoTag/Drop.md +0 -108
- data/example/jekyll-seo-tag/Jekyll/SeoTag/Filters.md +0 -8
- data/example/jekyll-seo-tag/Jekyll/SeoTag/ImageDrop.md +0 -29
- data/example/jekyll-seo-tag/Jekyll/SeoTag/JSONLD.md +0 -15
- data/example/jekyll-seo-tag/Jekyll/SeoTag/JSONLDDrop.md +0 -34
- data/example/jekyll-seo-tag/Jekyll/SeoTag/UrlHelper.md +0 -4
- data/example/jekyll-seo-tag/Jekyll/SeoTag.md +0 -48
- data/example/jekyll-seo-tag/Jekyll.md +0 -3
- data/example/jekyll-seo-tag/Liquid/Tag.md +0 -3
- data/example/jekyll-seo-tag/Liquid.md +0 -4
- data/example/jekyll-seo-tag/index.csv +0 -60
- data/mutant.yml +0 -15
- data/rdoc-markdown.gemspec +0 -46
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
-
|
|
9
|
-
## Our Standards
|
|
10
|
-
|
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
-
|
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
-
|
|
19
|
-
Examples of unacceptable behavior include:
|
|
20
|
-
|
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
22
|
-
advances of any kind
|
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
24
|
-
* Public or private harassment
|
|
25
|
-
* Publishing others' private information, such as a physical or email
|
|
26
|
-
address, without their explicit permission
|
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
28
|
-
professional setting
|
|
29
|
-
|
|
30
|
-
## Enforcement Responsibilities
|
|
31
|
-
|
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
33
|
-
|
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
35
|
-
|
|
36
|
-
## Scope
|
|
37
|
-
|
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
39
|
-
|
|
40
|
-
## Enforcement
|
|
41
|
-
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at skatkov@newstore.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
43
|
-
|
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
45
|
-
|
|
46
|
-
## Enforcement Guidelines
|
|
47
|
-
|
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
49
|
-
|
|
50
|
-
### 1. Correction
|
|
51
|
-
|
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
53
|
-
|
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
55
|
-
|
|
56
|
-
### 2. Warning
|
|
57
|
-
|
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
|
59
|
-
|
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
61
|
-
|
|
62
|
-
### 3. Temporary Ban
|
|
63
|
-
|
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
65
|
-
|
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
67
|
-
|
|
68
|
-
### 4. Permanent Ban
|
|
69
|
-
|
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
71
|
-
|
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
73
|
-
|
|
74
|
-
## Attribution
|
|
75
|
-
|
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
78
|
-
|
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
80
|
-
|
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
|
82
|
-
|
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
rdoc-markdown (0.17.2)
|
|
5
|
-
csv
|
|
6
|
-
erb
|
|
7
|
-
rdoc (>= 8.0)
|
|
8
|
-
reverse_markdown
|
|
9
|
-
|
|
10
|
-
GEM
|
|
11
|
-
remote: https://rubygems.org/
|
|
12
|
-
specs:
|
|
13
|
-
actionview (8.1.3)
|
|
14
|
-
activesupport (= 8.1.3)
|
|
15
|
-
builder (~> 3.1)
|
|
16
|
-
erubi (~> 1.11)
|
|
17
|
-
rails-dom-testing (~> 2.2)
|
|
18
|
-
rails-html-sanitizer (~> 1.6)
|
|
19
|
-
activesupport (8.1.3)
|
|
20
|
-
base64
|
|
21
|
-
bigdecimal
|
|
22
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
23
|
-
connection_pool (>= 2.2.5)
|
|
24
|
-
drb
|
|
25
|
-
i18n (>= 1.6, < 2)
|
|
26
|
-
json
|
|
27
|
-
logger (>= 1.4.2)
|
|
28
|
-
minitest (>= 5.1)
|
|
29
|
-
securerandom (>= 0.3)
|
|
30
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
31
|
-
uri (>= 0.13.1)
|
|
32
|
-
ast (2.4.3)
|
|
33
|
-
base64 (0.3.0)
|
|
34
|
-
better_html (2.2.0)
|
|
35
|
-
actionview (>= 7.0)
|
|
36
|
-
activesupport (>= 7.0)
|
|
37
|
-
ast (~> 2.0)
|
|
38
|
-
erubi (~> 1.4)
|
|
39
|
-
parser (>= 2.4)
|
|
40
|
-
smart_properties
|
|
41
|
-
bigdecimal (4.1.2)
|
|
42
|
-
builder (3.3.0)
|
|
43
|
-
commonmarker (2.8.1-x86_64-linux)
|
|
44
|
-
concurrent-ruby (1.3.6)
|
|
45
|
-
connection_pool (3.0.2)
|
|
46
|
-
crass (1.0.6)
|
|
47
|
-
csv (3.3.5)
|
|
48
|
-
diff-lcs (2.0.0)
|
|
49
|
-
docile (1.4.1)
|
|
50
|
-
drb (2.2.3)
|
|
51
|
-
erb (6.0.6)
|
|
52
|
-
erb_lint (0.9.0)
|
|
53
|
-
activesupport
|
|
54
|
-
better_html (>= 2.0.1)
|
|
55
|
-
parser (>= 2.7.1.4)
|
|
56
|
-
rainbow
|
|
57
|
-
rubocop (>= 1)
|
|
58
|
-
smart_properties
|
|
59
|
-
erubi (1.13.1)
|
|
60
|
-
i18n (1.14.8)
|
|
61
|
-
concurrent-ruby (~> 1.0)
|
|
62
|
-
io-console (0.8.2)
|
|
63
|
-
irb (1.18.0)
|
|
64
|
-
pp (>= 0.6.0)
|
|
65
|
-
prism (>= 1.3.0)
|
|
66
|
-
rdoc (>= 4.0.0)
|
|
67
|
-
reline (>= 0.4.2)
|
|
68
|
-
json (2.19.4)
|
|
69
|
-
language_server-protocol (3.17.0.5)
|
|
70
|
-
lint_roller (1.1.0)
|
|
71
|
-
logger (1.7.0)
|
|
72
|
-
loofah (2.25.1)
|
|
73
|
-
crass (~> 1.0.2)
|
|
74
|
-
nokogiri (>= 1.12.0)
|
|
75
|
-
minitest (5.27.0)
|
|
76
|
-
minitest-strict (1.0.0)
|
|
77
|
-
minitest (>= 5.21, < 7)
|
|
78
|
-
mutant (0.16.2)
|
|
79
|
-
diff-lcs (>= 1.6, < 3)
|
|
80
|
-
irb (~> 1.15)
|
|
81
|
-
parser (~> 3.3.10)
|
|
82
|
-
regexp_parser (~> 2.10)
|
|
83
|
-
securerandom (>= 0.3)
|
|
84
|
-
sorbet-runtime (~> 0.6.0)
|
|
85
|
-
unparser (>= 0.8.2, < 0.10)
|
|
86
|
-
mutant-minitest (0.16.2)
|
|
87
|
-
minitest (>= 5.11, < 7)
|
|
88
|
-
mutant (= 0.16.2)
|
|
89
|
-
mutex_m (~> 0.2)
|
|
90
|
-
mutex_m (0.3.0)
|
|
91
|
-
nokogiri (1.19.2-x86_64-linux-gnu)
|
|
92
|
-
racc (~> 1.4)
|
|
93
|
-
parallel (1.28.0)
|
|
94
|
-
parser (3.3.11.1)
|
|
95
|
-
ast (~> 2.4.1)
|
|
96
|
-
racc
|
|
97
|
-
pp (0.6.3)
|
|
98
|
-
prettyprint
|
|
99
|
-
prettyprint (0.2.0)
|
|
100
|
-
prism (1.9.0)
|
|
101
|
-
racc (1.8.1)
|
|
102
|
-
rails-dom-testing (2.3.0)
|
|
103
|
-
activesupport (>= 5.0.0)
|
|
104
|
-
minitest
|
|
105
|
-
nokogiri (>= 1.6)
|
|
106
|
-
rails-html-sanitizer (1.7.0)
|
|
107
|
-
loofah (~> 2.25)
|
|
108
|
-
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
109
|
-
rainbow (3.1.1)
|
|
110
|
-
rake (13.4.2)
|
|
111
|
-
rbs (4.1.0)
|
|
112
|
-
logger
|
|
113
|
-
prism (>= 1.6.0)
|
|
114
|
-
tsort
|
|
115
|
-
rdiscount (2.2.7.4)
|
|
116
|
-
rdoc (8.0.0)
|
|
117
|
-
erb
|
|
118
|
-
prism (>= 1.6.0)
|
|
119
|
-
rbs (>= 4.0.0)
|
|
120
|
-
tsort
|
|
121
|
-
regexp_parser (2.12.0)
|
|
122
|
-
reline (0.6.3)
|
|
123
|
-
io-console (~> 0.5)
|
|
124
|
-
reverse_markdown (3.0.2)
|
|
125
|
-
nokogiri
|
|
126
|
-
rubocop (1.84.2)
|
|
127
|
-
json (~> 2.3)
|
|
128
|
-
language_server-protocol (~> 3.17.0.2)
|
|
129
|
-
lint_roller (~> 1.1.0)
|
|
130
|
-
parallel (~> 1.10)
|
|
131
|
-
parser (>= 3.3.0.2)
|
|
132
|
-
rainbow (>= 2.2.2, < 4.0)
|
|
133
|
-
regexp_parser (>= 2.9.3, < 3.0)
|
|
134
|
-
rubocop-ast (>= 1.49.0, < 2.0)
|
|
135
|
-
ruby-progressbar (~> 1.7)
|
|
136
|
-
unicode-display_width (>= 2.4.0, < 4.0)
|
|
137
|
-
rubocop-ast (1.49.1)
|
|
138
|
-
parser (>= 3.3.7.2)
|
|
139
|
-
prism (~> 1.7)
|
|
140
|
-
rubocop-performance (1.26.1)
|
|
141
|
-
lint_roller (~> 1.1)
|
|
142
|
-
rubocop (>= 1.75.0, < 2.0)
|
|
143
|
-
rubocop-ast (>= 1.47.1, < 2.0)
|
|
144
|
-
ruby-progressbar (1.13.0)
|
|
145
|
-
securerandom (0.4.1)
|
|
146
|
-
simplecov (0.22.0)
|
|
147
|
-
docile (~> 1.1)
|
|
148
|
-
simplecov-html (~> 0.11)
|
|
149
|
-
simplecov_json_formatter (~> 0.1)
|
|
150
|
-
simplecov-html (0.13.2)
|
|
151
|
-
simplecov_json_formatter (0.1.4)
|
|
152
|
-
smart_properties (1.17.0)
|
|
153
|
-
sorbet-runtime (0.6.13163)
|
|
154
|
-
standard (1.54.0)
|
|
155
|
-
language_server-protocol (~> 3.17.0.2)
|
|
156
|
-
lint_roller (~> 1.0)
|
|
157
|
-
rubocop (~> 1.84.0)
|
|
158
|
-
standard-custom (~> 1.0.0)
|
|
159
|
-
standard-performance (~> 1.8)
|
|
160
|
-
standard-custom (1.0.2)
|
|
161
|
-
lint_roller (~> 1.0)
|
|
162
|
-
rubocop (~> 1.50)
|
|
163
|
-
standard-performance (1.9.0)
|
|
164
|
-
lint_roller (~> 1.1)
|
|
165
|
-
rubocop-performance (~> 1.26.0)
|
|
166
|
-
tsort (0.2.0)
|
|
167
|
-
tzinfo (2.0.6)
|
|
168
|
-
concurrent-ruby (~> 1.0)
|
|
169
|
-
unicode-display_width (3.2.0)
|
|
170
|
-
unicode-emoji (~> 4.1)
|
|
171
|
-
unicode-emoji (4.2.0)
|
|
172
|
-
unparser (0.9.0)
|
|
173
|
-
diff-lcs (>= 1.6, < 3)
|
|
174
|
-
parser (>= 3.3.0)
|
|
175
|
-
prism (>= 1.5.1)
|
|
176
|
-
uri (1.1.1)
|
|
177
|
-
yard (0.9.43)
|
|
178
|
-
yard-lint (1.5.1)
|
|
179
|
-
yard (~> 0.9)
|
|
180
|
-
zeitwerk (~> 2.6)
|
|
181
|
-
zeitwerk (2.7.5)
|
|
182
|
-
|
|
183
|
-
PLATFORMS
|
|
184
|
-
x86_64-linux-gnu
|
|
185
|
-
|
|
186
|
-
DEPENDENCIES
|
|
187
|
-
bundler (>= 2.0)
|
|
188
|
-
commonmarker
|
|
189
|
-
erb_lint
|
|
190
|
-
minitest (~> 5.0)
|
|
191
|
-
minitest-strict (~> 1.0)
|
|
192
|
-
mutant
|
|
193
|
-
mutant-minitest
|
|
194
|
-
rake (~> 13.0)
|
|
195
|
-
rdiscount (~> 2.0)
|
|
196
|
-
rdoc-markdown!
|
|
197
|
-
simplecov (~> 0.22)
|
|
198
|
-
standard
|
|
199
|
-
yard-lint
|
|
200
|
-
|
|
201
|
-
BUNDLED WITH
|
|
202
|
-
4.0.10
|
data/Rakefile
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
require "bundler/gem_tasks"
|
|
2
|
-
require "rake/testtask"
|
|
3
|
-
require "fileutils"
|
|
4
|
-
require "rdoc/rdoc"
|
|
5
|
-
require "rdoc/markdown"
|
|
6
|
-
require_relative "test/support/markdown_validator"
|
|
7
|
-
|
|
8
|
-
JEKYLL_SEO_TAG_NAME = "jekyll-seo-tag"
|
|
9
|
-
JEKYLL_SEO_TAG_REF = "v2.8.0"
|
|
10
|
-
JEKYLL_SEO_TAG_TITLE = "#{JEKYLL_SEO_TAG_NAME} #{JEKYLL_SEO_TAG_REF.delete_prefix("v")}"
|
|
11
|
-
JEKYLL_SEO_TAG_VENDOR_PATH = "vendor/#{JEKYLL_SEO_TAG_NAME}"
|
|
12
|
-
|
|
13
|
-
Rake::TestTask.new do |t|
|
|
14
|
-
t.verbose = true
|
|
15
|
-
t.warning = false
|
|
16
|
-
t.test_files = FileList["test/test*.rb"]
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
task default: [:test]
|
|
20
|
-
|
|
21
|
-
namespace :erb do
|
|
22
|
-
desc "Lint markdown ERB templates"
|
|
23
|
-
task :lint do
|
|
24
|
-
files = Dir["lib/templates/**/*.{md,markdown}.erb"]
|
|
25
|
-
raise "No markdown ERB templates found" if files.empty?
|
|
26
|
-
|
|
27
|
-
sh "bundle", "exec", "erb_lint", *files
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
namespace :markdown do
|
|
32
|
-
desc "Validate generated markdown as GitHub Flavored Markdown"
|
|
33
|
-
task :validate do
|
|
34
|
-
validation_root = File.expand_path("tmp/markdown-validate", __dir__)
|
|
35
|
-
FileUtils.rm_rf(validation_root)
|
|
36
|
-
FileUtils.mkdir_p(validation_root)
|
|
37
|
-
|
|
38
|
-
sample_output = File.join(validation_root, "sample")
|
|
39
|
-
generate_sample_docs(output: sample_output)
|
|
40
|
-
|
|
41
|
-
sample_count = MarkdownValidator.new(sample_output).validate!
|
|
42
|
-
puts "Validated #{sample_count} markdown files in #{sample_output}"
|
|
43
|
-
|
|
44
|
-
example_dir = File.expand_path("example", __dir__)
|
|
45
|
-
if Dir.exist?(example_dir)
|
|
46
|
-
example_count = MarkdownValidator.new(example_dir).validate!
|
|
47
|
-
puts "Validated #{example_count} markdown files in #{example_dir}"
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
Rake::Task["vendor:setup:minitest"].invoke
|
|
51
|
-
minitest_root = File.expand_path("vendor/minitest", __dir__)
|
|
52
|
-
minitest_output = File.join(validation_root, "minitest")
|
|
53
|
-
generate_markdown_docs(
|
|
54
|
-
title: "minitest",
|
|
55
|
-
root: minitest_root,
|
|
56
|
-
output: minitest_output,
|
|
57
|
-
files: minitest_docs_files(minitest_root)
|
|
58
|
-
)
|
|
59
|
-
minitest_count = MarkdownValidator.new(minitest_output).validate!
|
|
60
|
-
puts "Validated #{minitest_count} markdown files in #{minitest_output}"
|
|
61
|
-
|
|
62
|
-
Rake::Task["vendor:setup:reverse_markdown"].invoke
|
|
63
|
-
reverse_markdown_root = File.expand_path("vendor/reverse_markdown", __dir__)
|
|
64
|
-
reverse_markdown_output = File.join(validation_root, "reverse_markdown")
|
|
65
|
-
generate_markdown_docs(
|
|
66
|
-
title: "reverse_markdown",
|
|
67
|
-
root: reverse_markdown_root,
|
|
68
|
-
output: reverse_markdown_output,
|
|
69
|
-
files: reverse_markdown_docs_files(reverse_markdown_root)
|
|
70
|
-
)
|
|
71
|
-
reverse_markdown_count = MarkdownValidator.new(reverse_markdown_output).validate!
|
|
72
|
-
puts "Validated #{reverse_markdown_count} markdown files in #{reverse_markdown_output}"
|
|
73
|
-
|
|
74
|
-
Rake::Task["vendor:setup:jekyll_seo_tag"].invoke
|
|
75
|
-
jekyll_seo_tag_output = File.join(validation_root, JEKYLL_SEO_TAG_NAME)
|
|
76
|
-
generate_jekyll_seo_tag_docs(output: jekyll_seo_tag_output)
|
|
77
|
-
jekyll_seo_tag_count = MarkdownValidator.new(jekyll_seo_tag_output).validate!
|
|
78
|
-
puts "Validated #{jekyll_seo_tag_count} markdown files in #{jekyll_seo_tag_output}"
|
|
79
|
-
|
|
80
|
-
Rake::Task["vendor:setup:rails"].invoke
|
|
81
|
-
rails_root = File.expand_path("vendor/rails", __dir__)
|
|
82
|
-
rails_output = File.join(validation_root, "rails")
|
|
83
|
-
generate_markdown_docs(
|
|
84
|
-
title: "rails validation",
|
|
85
|
-
root: rails_root,
|
|
86
|
-
output: rails_output,
|
|
87
|
-
files: rails_validation_files(rails_root)
|
|
88
|
-
)
|
|
89
|
-
rails_count = MarkdownValidator.new(rails_output).validate!
|
|
90
|
-
puts "Validated #{rails_count} markdown files in #{rails_output}"
|
|
91
|
-
|
|
92
|
-
puts "Markdown validation artifacts written to #{validation_root}"
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
def ensure_git_checkout(path:, url:, ref: nil)
|
|
97
|
-
return if Dir.exist?(path)
|
|
98
|
-
|
|
99
|
-
FileUtils.mkdir_p(File.dirname(path))
|
|
100
|
-
|
|
101
|
-
clone_command = ["git", "clone", "--depth", "1"]
|
|
102
|
-
clone_command += ["--branch", ref] if ref
|
|
103
|
-
clone_command += [url, path]
|
|
104
|
-
|
|
105
|
-
sh clone_command.join(" ")
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
def generate_markdown_docs(title:, root:, output:, files:)
|
|
109
|
-
raise "No input files for #{title}" if files.empty?
|
|
110
|
-
|
|
111
|
-
FileUtils.rm_rf(output)
|
|
112
|
-
FileUtils.mkdir_p(output)
|
|
113
|
-
|
|
114
|
-
options = RDoc::Options.new
|
|
115
|
-
options.setup_generator("markdown")
|
|
116
|
-
options.verbosity = 0
|
|
117
|
-
options.files = files
|
|
118
|
-
options.op_dir = output
|
|
119
|
-
options.root = root
|
|
120
|
-
options.title = title
|
|
121
|
-
options.force_output = true
|
|
122
|
-
|
|
123
|
-
RDoc::RDoc.new.document(options)
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
def generate_sample_docs(output:)
|
|
127
|
-
generate_markdown_docs(
|
|
128
|
-
title: "sample",
|
|
129
|
-
root: File.expand_path("test/data", __dir__),
|
|
130
|
-
output: output,
|
|
131
|
-
files: [File.expand_path("test/data/example.rb", __dir__)]
|
|
132
|
-
)
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
def jekyll_seo_tag_root
|
|
136
|
-
File.expand_path(JEKYLL_SEO_TAG_VENDOR_PATH, __dir__)
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
def generate_jekyll_seo_tag_docs(output:)
|
|
140
|
-
root = jekyll_seo_tag_root
|
|
141
|
-
unless Dir.exist?(root)
|
|
142
|
-
raise "Missing #{JEKYLL_SEO_TAG_VENDOR_PATH}. Run `rake vendor:setup:jekyll_seo_tag` first."
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
generate_markdown_docs(
|
|
146
|
-
title: JEKYLL_SEO_TAG_TITLE,
|
|
147
|
-
root: root,
|
|
148
|
-
output: output,
|
|
149
|
-
files: Dir[File.join(root, "lib/**/*.rb")].uniq
|
|
150
|
-
)
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
namespace :examples do
|
|
154
|
-
desc "Generate checked-in example markdown docs"
|
|
155
|
-
task :generate do
|
|
156
|
-
Rake::Task["vendor:setup:jekyll_seo_tag"].invoke
|
|
157
|
-
|
|
158
|
-
sample_output = File.expand_path("example", __dir__)
|
|
159
|
-
staging_root = File.expand_path("tmp/examples-generate", __dir__)
|
|
160
|
-
staged_sample_output = File.join(staging_root, "example")
|
|
161
|
-
|
|
162
|
-
FileUtils.rm_rf(staging_root)
|
|
163
|
-
generate_sample_docs(output: staged_sample_output)
|
|
164
|
-
generate_jekyll_seo_tag_docs(output: File.join(staged_sample_output, JEKYLL_SEO_TAG_NAME))
|
|
165
|
-
|
|
166
|
-
FileUtils.rm_rf(sample_output)
|
|
167
|
-
FileUtils.mv(staged_sample_output, sample_output)
|
|
168
|
-
|
|
169
|
-
puts "Generated sample markdown docs in #{sample_output}"
|
|
170
|
-
puts "Generated #{JEKYLL_SEO_TAG_NAME} markdown docs in #{File.join(sample_output, JEKYLL_SEO_TAG_NAME)}"
|
|
171
|
-
ensure
|
|
172
|
-
FileUtils.rm_rf(staging_root) if staging_root
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
def minitest_docs_files(root)
|
|
177
|
-
files = Dir[File.join(root, "lib/**/*.rb")]
|
|
178
|
-
files.concat(Dir[File.join(root, "*.rdoc")])
|
|
179
|
-
|
|
180
|
-
files.uniq
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
def reverse_markdown_docs_files(root)
|
|
184
|
-
Dir[File.join(root, "lib/**/*.rb")] + Dir[File.join(root, "*.md")]
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
def rails_validation_files(root)
|
|
188
|
-
files = Dir[File.join(root, "activesupport/lib/**/*.rb")]
|
|
189
|
-
files.concat(Dir[File.join(root, "activerecord/lib/**/*.rb")])
|
|
190
|
-
files.concat(Dir[File.join(root, "actionpack/lib/**/*.rb")])
|
|
191
|
-
files.concat(Dir[File.join(root, "railties/lib/**/*.rb")])
|
|
192
|
-
|
|
193
|
-
files.concat(Dir[File.join(root, "{active*,action*,railties}/README.{rdoc,md,markdown}")])
|
|
194
|
-
|
|
195
|
-
files.uniq
|
|
196
|
-
end
|
|
197
|
-
|
|
198
|
-
namespace :vendor do
|
|
199
|
-
namespace :setup do
|
|
200
|
-
minitest_ref = "v6.0.1"
|
|
201
|
-
rails_ref = ENV.fetch("RAILS_REF", "main")
|
|
202
|
-
reverse_markdown_ref = "v3.0.2"
|
|
203
|
-
|
|
204
|
-
desc "Clone/update vendor/jekyll-seo-tag and checkout docs-aligned tag"
|
|
205
|
-
task :jekyll_seo_tag do
|
|
206
|
-
ensure_git_checkout(
|
|
207
|
-
path: JEKYLL_SEO_TAG_VENDOR_PATH,
|
|
208
|
-
url: "https://github.com/jekyll/jekyll-seo-tag.git",
|
|
209
|
-
ref: JEKYLL_SEO_TAG_REF
|
|
210
|
-
)
|
|
211
|
-
Dir.chdir(JEKYLL_SEO_TAG_VENDOR_PATH) do
|
|
212
|
-
sh "git fetch --tags --force"
|
|
213
|
-
sh "git checkout #{JEKYLL_SEO_TAG_REF}"
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
desc "Clone/update vendor/minitest and checkout docs-aligned tag"
|
|
218
|
-
task :minitest do
|
|
219
|
-
ensure_git_checkout(path: "vendor/minitest", url: "https://github.com/minitest/minitest.git", ref: minitest_ref)
|
|
220
|
-
Dir.chdir("vendor/minitest") { sh "git checkout #{minitest_ref}" }
|
|
221
|
-
end
|
|
222
|
-
|
|
223
|
-
desc "Clone/update vendor/rails"
|
|
224
|
-
task :rails do
|
|
225
|
-
ensure_git_checkout(path: "vendor/rails", url: "https://github.com/rails/rails.git", ref: rails_ref)
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
desc "Clone/update vendor/reverse_markdown and checkout dependency-aligned tag"
|
|
229
|
-
task :reverse_markdown do
|
|
230
|
-
ensure_git_checkout(
|
|
231
|
-
path: "vendor/reverse_markdown",
|
|
232
|
-
url: "https://github.com/xijo/reverse_markdown.git",
|
|
233
|
-
ref: reverse_markdown_ref
|
|
234
|
-
)
|
|
235
|
-
Dir.chdir("vendor/reverse_markdown") { sh "git checkout #{reverse_markdown_ref}" }
|
|
236
|
-
end
|
|
237
|
-
end
|
|
238
|
-
|
|
239
|
-
desc "Prepare all vendored repositories"
|
|
240
|
-
task setup: ["vendor:setup:jekyll_seo_tag", "vendor:setup:minitest", "vendor:setup:rails", "vendor:setup:reverse_markdown"]
|
|
241
|
-
|
|
242
|
-
namespace :docs do
|
|
243
|
-
desc "Generate markdown docs for vendored jekyll-seo-tag"
|
|
244
|
-
task :jekyll_seo_tag do
|
|
245
|
-
output = File.expand_path("vendor/docs/#{JEKYLL_SEO_TAG_NAME}", __dir__)
|
|
246
|
-
generate_jekyll_seo_tag_docs(output: output)
|
|
247
|
-
puts "Generated #{JEKYLL_SEO_TAG_NAME} markdown docs in #{output}"
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
desc "Generate markdown docs for vendored minitest"
|
|
251
|
-
task :minitest do
|
|
252
|
-
root = File.expand_path("vendor/minitest", __dir__)
|
|
253
|
-
raise "Missing vendor/minitest. Run `rake vendor:setup:minitest` first." unless Dir.exist?(root)
|
|
254
|
-
|
|
255
|
-
output = File.expand_path("vendor/docs/minitest", __dir__)
|
|
256
|
-
generate_markdown_docs(title: "minitest", root: root, output: output, files: minitest_docs_files(root))
|
|
257
|
-
puts "Generated minitest markdown docs in #{output}"
|
|
258
|
-
end
|
|
259
|
-
|
|
260
|
-
desc "Generate markdown docs for vendored reverse_markdown"
|
|
261
|
-
task :reverse_markdown do
|
|
262
|
-
root = File.expand_path("vendor/reverse_markdown", __dir__)
|
|
263
|
-
raise "Missing vendor/reverse_markdown. Run `rake vendor:setup:reverse_markdown` first." unless Dir.exist?(root)
|
|
264
|
-
|
|
265
|
-
output = File.expand_path("vendor/docs/reverse_markdown", __dir__)
|
|
266
|
-
generate_markdown_docs(
|
|
267
|
-
title: "reverse_markdown",
|
|
268
|
-
root: root,
|
|
269
|
-
output: output,
|
|
270
|
-
files: reverse_markdown_docs_files(root)
|
|
271
|
-
)
|
|
272
|
-
puts "Generated reverse_markdown markdown docs in #{output}"
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
desc "Generate markdown docs for vendored rails"
|
|
276
|
-
task :rails do
|
|
277
|
-
root = File.expand_path("vendor/rails", __dir__)
|
|
278
|
-
raise "Missing vendor/rails. Run `rake vendor:setup:rails` first." unless Dir.exist?(root)
|
|
279
|
-
|
|
280
|
-
files = Dir[File.join(root, "*/lib/**/*.rb")]
|
|
281
|
-
|
|
282
|
-
active_record_readme = File.join(root, "activerecord/README.rdoc")
|
|
283
|
-
files << active_record_readme if File.file?(active_record_readme)
|
|
284
|
-
|
|
285
|
-
output = File.expand_path("vendor/docs/rails", __dir__)
|
|
286
|
-
generate_markdown_docs(title: "rails", root: root, output: output, files: files)
|
|
287
|
-
puts "Generated rails markdown docs in #{output}"
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
desc "Generate markdown docs for all vendored repositories"
|
|
291
|
-
task all: [:jekyll_seo_tag, :minitest, :reverse_markdown, :rails]
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
desc "Generate markdown docs for all vendored repositories"
|
|
295
|
-
task docs: ["vendor:docs:all"]
|
|
296
|
-
end
|
data/example/Bird.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<a id="class-bird"></a>
|
|
2
|
-
# Class Bird
|
|
3
|
-
The base class for all birds.
|
|
4
|
-
|
|
5
|
-
### Public Instance Methods
|
|
6
|
-
|
|
7
|
-
<a id="method-i-fly"></a>
|
|
8
|
-
#### `fly(direction: string, velocity: number) -> bool`
|
|
9
|
-
Fly somewhere.
|
|
10
|
-
|
|
11
|
-
Flying is the most critical feature of birds.
|
|
12
|
-
|
|
13
|
-
##### Example
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
fly(:south, 70)
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
<a id="method-i-speak"></a>
|
|
20
|
-
#### `speak() { |text| ... }`
|
|
21
|
-
Produce some noise.
|
data/example/Duck.md
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<a id="class-duck"></a>
|
|
2
|
-
# Class Duck
|
|
3
|
-
A duck is a [`Waterfowl`](Waterfowl.md) [`Bird`](Bird.md).
|
|
4
|
-
|
|
5
|
-
Features:
|
|
6
|
-
|
|
7
|
-
bird:
|
|
8
|
-
|
|
9
|
-
- speak
|
|
10
|
-
- fly
|
|
11
|
-
|
|
12
|
-
waterfowl:
|
|
13
|
-
|
|
14
|
-
- swim
|
|
15
|
-
|
|
16
|
-
## Bird overrides
|
|
17
|
-
|
|
18
|
-
### Public Instance Methods
|
|
19
|
-
|
|
20
|
-
<a id="method-i-speak"></a>
|
|
21
|
-
#### `speak() { |speech| ... }`
|
|
22
|
-
[`Duck`](Duck.md) overrides generic implementation.
|
|
23
|
-
|
|
24
|
-
## Duck extensions
|
|
25
|
-
|
|
26
|
-
### Constants
|
|
27
|
-
|
|
28
|
-
<a id="MAX_VELOCITY"></a>
|
|
29
|
-
#### `MAX_VELOCITY`
|
|
30
|
-
Not documented.
|
|
31
|
-
|
|
32
|
-
### Attributes
|
|
33
|
-
|
|
34
|
-
<a id="attribute-i-domestic"></a>
|
|
35
|
-
#### `domestic` [RW]
|
|
36
|
-
True for domestic ducks.
|
|
37
|
-
|
|
38
|
-
<a id="attribute-i-rubber"></a>
|
|
39
|
-
#### `rubber` [R]
|
|
40
|
-
True for rubber ducks.
|
|
41
|
-
|
|
42
|
-
### Public Class Methods
|
|
43
|
-
|
|
44
|
-
<a id="method-c-new"></a>
|
|
45
|
-
#### `new(domestic, rubber)`
|
|
46
|
-
Creates a new duck.
|
|
47
|
-
|
|
48
|
-
<a id="method-c-rubber_ducks"></a>
|
|
49
|
-
#### `rubber_ducks()`
|
|
50
|
-
Returns list of all rubber ducks.
|
|
51
|
-
|
|
52
|
-
### Public Instance Methods
|
|
53
|
-
|
|
54
|
-
<a id="method-i-useful-3F"></a>
|
|
55
|
-
#### `useful? -> bool`
|
|
56
|
-
Checks if this duck is a useful one.
|
data/example/Object.md
DELETED