yard-readme 0.4.0 → 0.6.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/.yardopts +2 -0
- data/CHANGELOG.md +11 -4
- data/Gemfile +2 -1
- data/Gemfile.lock +10 -12
- data/README.md +5 -14
- data/README_YARD.md +3 -1
- data/lib/yard/readme/description.rb +12 -0
- data/lib/yard/readme/docstring_parser.rb +3 -3
- data/lib/yard/readme/version.rb +1 -1
- data/lib/yard/readme.rb +1 -15
- data/lib/yard-readme.rb +0 -1
- data/yard-readme.gemspec +3 -4
- metadata +8 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8cb1187f1856ae8da1bfe214c052fbfd3849d1b1b64dfab0ed27b1b73d9d62d
|
4
|
+
data.tar.gz: 1aae21fdb20a7dc6545112bcc6b2e472f76a6f1ded805f7130b4767a4ce3e88f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6154ed0d82740a1dad4e75d22d5ac8bbeee4172ce4bd5910d059eb214c3233ead01ae660446113866dc84621d326026e1c436154e81d2bed483e407e7e54a6c2
|
7
|
+
data.tar.gz: 220b8a4fed185eab411c8758d2202480b7f9942d947d40171db7662984f136086e265cc9f691daa8790402d3446aa3113dde7c12ba683b194d0a08c223a219f7
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## [0.6.0] - 2025-05-04
|
2
|
+
|
3
|
+
- Update Gemfile with published readme_yard gem
|
4
|
+
|
5
|
+
## [0.5.0] - 2025-05-04
|
6
|
+
|
7
|
+
- Extracted description into separate file `lib/yard/readme/description.rb`
|
8
|
+
- Updated documentation to use this centralized description in gemspec and README
|
9
|
+
- Updated tag examples from `@readme object` to `@readme code` to reflect readme_yard updates
|
10
|
+
- Updated README
|
11
|
+
|
1
12
|
## [0.4.0] - 2025-05-03
|
2
13
|
|
3
14
|
### Breaking Changes
|
@@ -23,10 +34,6 @@
|
|
23
34
|
- Updated YARD dependency from `~> 0.9.26` to `~> 0.9` to support newer versions
|
24
35
|
- Removed specific readme_yard development dependency, now integrates with any compatible version
|
25
36
|
|
26
|
-
### Internal Changes
|
27
|
-
- Removed custom .yardopts file as it's now using the default configuration from readme_yard gem
|
28
|
-
- Added comprehensive RDoc-style documentation to all classes and methods
|
29
|
-
|
30
37
|
## [0.3.0] - 2021-08-07
|
31
38
|
|
32
39
|
- Rename newly added methods be373f150e865b933a58a950e6a5c654395e17c4
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,15 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../readme_yard
|
3
|
-
specs:
|
4
|
-
readme_yard (0.3.0)
|
5
|
-
irb
|
6
|
-
tty-markdown (~> 0.7)
|
7
|
-
yard (~> 0.9)
|
8
|
-
yard-readme (~> 0.4)
|
9
|
-
|
10
1
|
PATH
|
11
2
|
remote: .
|
12
3
|
specs:
|
13
|
-
yard-readme (0.
|
14
|
-
yard (~> 0.9)
|
4
|
+
yard-readme (0.6.0)
|
15
5
|
|
16
6
|
GEM
|
17
7
|
remote: https://rubygems.org/
|
18
8
|
specs:
|
19
9
|
date (3.4.1)
|
10
|
+
debug (1.10.0)
|
11
|
+
irb (~> 1.10)
|
12
|
+
reline (>= 0.3.8)
|
20
13
|
io-console (0.8.0)
|
21
14
|
irb (1.15.2)
|
22
15
|
pp (>= 0.6.0)
|
@@ -34,6 +27,10 @@ GEM
|
|
34
27
|
stringio
|
35
28
|
rdoc (6.13.1)
|
36
29
|
psych (>= 4.0.0)
|
30
|
+
readme_yard (0.3.0)
|
31
|
+
tty-markdown (~> 0.7)
|
32
|
+
yard (~> 0.9)
|
33
|
+
yard-readme (~> 0.5)
|
37
34
|
reline (0.6.1)
|
38
35
|
io-console (~> 0.5)
|
39
36
|
rexml (3.4.1)
|
@@ -61,8 +58,9 @@ PLATFORMS
|
|
61
58
|
arm64-darwin-24
|
62
59
|
|
63
60
|
DEPENDENCIES
|
61
|
+
debug
|
64
62
|
irb
|
65
|
-
readme_yard (>= 0.3)
|
63
|
+
readme_yard (>= 0.3)
|
66
64
|
yard-readme!
|
67
65
|
|
68
66
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,17 +1,8 @@
|
|
1
1
|
# yard-readme
|
2
2
|
|
3
|
-
|
4
|
-
[readme_yard](https://github.com/mattruzicka/readme_yard).
|
5
|
-
It adds a `@readme` tag to YARD.
|
6
|
-
|
7
|
-
It also replaces the default docstring parser so that only
|
8
|
-
`@readme` tags and not their text values are stripped from
|
9
|
-
the generated documentation. I prefer this over the default
|
10
|
-
YARD behavior for the `@readme` tag because it allows the
|
11
|
-
comments in the source code to signal the README dependency
|
12
|
-
without pushing the generated YARD documentation into a
|
13
|
-
separate "readme" section.
|
3
|
+
Built for the [readme_yard](https://github.com/mattruzicka/readme_yard) gem as:
|
14
4
|
|
5
|
+
A YARD plugin that introduces the @readme tag and powers the readme_yard gem, enabling developers to embed code comments directly into README sections. This eliminates redundancy and keeps documentation consistent across code and project READMEs.
|
15
6
|
|
16
7
|
This plugin replaces YARD's default docstring parser with a custom one that handles @readme tags differently. This custom DocstringParser extends YARD's default parser to provide
|
17
8
|
special handling for @readme tags. The main functionality includes:
|
@@ -26,15 +17,15 @@ special handling for @readme tags. The main functionality includes:
|
|
26
17
|
|
27
18
|
The yard-readme plugin includes support for custom readme tags as used by readme_yard. Custom readme tag names that should be stripped from the docstring
|
28
19
|
but preserved in the tag's text. This is used to support the nested tag
|
29
|
-
feature of readme_yard, where tags like `@readme comment`, `@readme
|
30
|
-
and `@readme
|
20
|
+
feature of readme_yard, where tags like `@readme comment`, `@readme code`,
|
21
|
+
and `@readme source` control what content gets embedded in the README.
|
31
22
|
|
32
23
|
By setting this attribute with an array of tag names (without the "@readme" prefix),
|
33
24
|
the parser will recognize these as special readme tags and handle them appropriately.
|
34
25
|
|
35
26
|
|
36
27
|
```ruby
|
37
|
-
YARD::Readme::DocstringParser.readme_tag_names = ["comment", "
|
28
|
+
YARD::Readme::DocstringParser.readme_tag_names = ["comment", "code", "source"]
|
38
29
|
```
|
39
30
|
|
40
31
|
|
data/README_YARD.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# yard-readme
|
2
2
|
|
3
|
-
|
3
|
+
Built for the [readme_yard](https://github.com/mattruzicka/readme_yard) gem as:
|
4
|
+
|
5
|
+
{@readme YARD::Readme::DESCRIPTION}
|
4
6
|
|
5
7
|
This plugin replaces YARD's default docstring parser with a custom one that handles @readme tags differently. {@readme YARD::Readme::DocstringParser}
|
6
8
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module YARD
|
4
|
+
module Readme
|
5
|
+
#
|
6
|
+
# @readme String
|
7
|
+
#
|
8
|
+
DESCRIPTION = "A YARD plugin that introduces the @readme tag and powers the readme_yard gem, enabling developers to embed code comments directly into README sections. This eliminates redundancy and keeps documentation consistent across code and project READMEs."
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
|
@@ -18,14 +18,14 @@ module YARD
|
|
18
18
|
# @readme
|
19
19
|
# Custom readme tag names that should be stripped from the docstring
|
20
20
|
# but preserved in the tag's text. This is used to support the nested tag
|
21
|
-
# feature of readme_yard, where tags like `@readme comment`, `@readme
|
22
|
-
# and `@readme
|
21
|
+
# feature of readme_yard, where tags like `@readme comment`, `@readme code`,
|
22
|
+
# and `@readme source` control what content gets embedded in the README.
|
23
23
|
#
|
24
24
|
# By setting this attribute with an array of tag names (without the "@readme" prefix),
|
25
25
|
# the parser will recognize these as special readme tags and handle them appropriately.
|
26
26
|
#
|
27
27
|
# @example
|
28
|
-
# YARD::Readme::DocstringParser.readme_tag_names = ["comment", "
|
28
|
+
# YARD::Readme::DocstringParser.readme_tag_names = ["comment", "code", "source"]
|
29
29
|
#
|
30
30
|
attr_accessor :readme_tag_names
|
31
31
|
|
data/lib/yard/readme/version.rb
CHANGED
data/lib/yard/readme.rb
CHANGED
@@ -1,25 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'yard'
|
4
3
|
require_relative "readme/version"
|
4
|
+
require_relative "readme/description"
|
5
5
|
require_relative "readme/docstring_parser"
|
6
6
|
require_relative "readme/tag_factory"
|
7
7
|
|
8
8
|
module YARD
|
9
|
-
#
|
10
|
-
# @readme
|
11
|
-
# A [YARD](https://yardoc.org) plugin used by
|
12
|
-
# [readme_yard](https://github.com/mattruzicka/readme_yard).
|
13
|
-
# It adds a `@readme` tag to YARD.
|
14
|
-
#
|
15
|
-
# It also replaces the default docstring parser so that only
|
16
|
-
# `@readme` tags and not their text values are stripped from
|
17
|
-
# the generated documentation. I prefer this over the default
|
18
|
-
# YARD behavior for the `@readme` tag because it allows the
|
19
|
-
# comments in the source code to signal the README dependency
|
20
|
-
# without pushing the generated YARD documentation into a
|
21
|
-
# separate "readme" section.
|
22
|
-
#
|
23
9
|
module Readme
|
24
10
|
#
|
25
11
|
# @see https://www.rubydoc.info/gems/yard/0.9.13/YARD/DocstringParser
|
data/lib/yard-readme.rb
CHANGED
data/yard-readme.gemspec
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative 'lib/yard/readme/version'
|
4
|
+
require_relative 'lib/yard/readme/description'
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
7
|
spec.name = "yard-readme"
|
@@ -8,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
8
9
|
spec.authors = ["Matt Ruzicka"]
|
9
10
|
spec.license = "MIT"
|
10
11
|
|
11
|
-
spec.summary = "
|
12
|
-
spec.description =
|
12
|
+
spec.summary = "YARD plugin for the readme_yard gem"
|
13
|
+
spec.description = YARD::Readme::DESCRIPTION
|
13
14
|
spec.homepage = 'https://github.com/mattruzicka/yard-readme'
|
14
15
|
spec.required_ruby_version = ">= 3.0.0"
|
15
16
|
|
@@ -27,8 +28,6 @@ Gem::Specification.new do |spec|
|
|
27
28
|
spec.require_paths = ["lib"]
|
28
29
|
|
29
30
|
# Uncomment to register a new dependency of your gem
|
30
|
-
spec.add_dependency "yard", "~> 0.9"
|
31
|
-
|
32
31
|
spec.add_development_dependency 'irb'
|
33
32
|
|
34
33
|
# For more information and examples about making a new gem, checkout our
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-readme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Ruzicka
|
@@ -9,20 +9,6 @@ bindir: exe
|
|
9
9
|
cert_chain: []
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
|
-
- !ruby/object:Gem::Dependency
|
13
|
-
name: yard
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
15
|
-
requirements:
|
16
|
-
- - "~>"
|
17
|
-
- !ruby/object:Gem::Version
|
18
|
-
version: '0.9'
|
19
|
-
type: :runtime
|
20
|
-
prerelease: false
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
-
requirements:
|
23
|
-
- - "~>"
|
24
|
-
- !ruby/object:Gem::Version
|
25
|
-
version: '0.9'
|
26
12
|
- !ruby/object:Gem::Dependency
|
27
13
|
name: irb
|
28
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -37,13 +23,17 @@ dependencies:
|
|
37
23
|
- - ">="
|
38
24
|
- !ruby/object:Gem::Version
|
39
25
|
version: '0'
|
40
|
-
description:
|
26
|
+
description: A YARD plugin that introduces the @readme tag and powers the readme_yard
|
27
|
+
gem, enabling developers to embed code comments directly into README sections. This
|
28
|
+
eliminates redundancy and keeps documentation consistent across code and project
|
29
|
+
READMEs.
|
41
30
|
executables: []
|
42
31
|
extensions: []
|
43
32
|
extra_rdoc_files: []
|
44
33
|
files:
|
45
34
|
- ".gitignore"
|
46
35
|
- ".rubocop.yml"
|
36
|
+
- ".yardopts"
|
47
37
|
- CHANGELOG.md
|
48
38
|
- Gemfile
|
49
39
|
- Gemfile.lock
|
@@ -53,6 +43,7 @@ files:
|
|
53
43
|
- bin/setup
|
54
44
|
- lib/yard-readme.rb
|
55
45
|
- lib/yard/readme.rb
|
46
|
+
- lib/yard/readme/description.rb
|
56
47
|
- lib/yard/readme/docstring_parser.rb
|
57
48
|
- lib/yard/readme/tag_factory.rb
|
58
49
|
- lib/yard/readme/version.rb
|
@@ -80,5 +71,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
71
|
requirements: []
|
81
72
|
rubygems_version: 3.6.8
|
82
73
|
specification_version: 4
|
83
|
-
summary:
|
74
|
+
summary: YARD plugin for the readme_yard gem
|
84
75
|
test_files: []
|