yard-readme 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c94f2e542f87b5beedce3e89f2d4797cdbcd3e3d80c84189da416e6ba54acbc
4
- data.tar.gz: f6957e18616ccda27a169b201e6e4283c606440e01a805952f093ff02ffbaf57
3
+ metadata.gz: 676cae1299410a644a61764533557124b7cd287abbe81238126fd96366c76fbc
4
+ data.tar.gz: 173694a562cd4e73025fcc29a703d04781d29e157e7f42c675d55c171a235f14
5
5
  SHA512:
6
- metadata.gz: a7fa39d5a01d4cda411559832f607a20e0760bcc36279716c57b3af1c909c6b0a013d8ee6f41529a5f1acfca9cc34e0eea8ac7abfe2c3f6cabf1e0498dfb3c0a
7
- data.tar.gz: f17ced1a3ccbc7b6106b7031cb9b9c6ed5f5ee6b5dc652482b65747f5d36462b924ad55bab922bcfdbf4d737ba7bb017841127b54e820a1ec3ae5841cfa01efb
6
+ metadata.gz: b3e2c9d544b52798c72a5be125217a2a534dc71ca0b9df3d1caaf6c681114f7c385f87971ebf80514399d66c946fc07863989968af876f1cfe32680cc1d8f4de
7
+ data.tar.gz: b74bdd141f0d7ffdc63f7827a76a48da6e6ca4382dde61c6594534970f6d14772f00e39856642a879ea19ece7980cd56050fc783bfb04a6256dd8468ccb4f6ae
data/.yardopts ADDED
@@ -0,0 +1,2 @@
1
+ --plugin readme
2
+ --markup markdown
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.5.0] - 2025-05-04
2
+
3
+ - Extracted description into separate file `lib/yard/readme/description.rb`
4
+ - Updated documentation to use this centralized description in gemspec and README
5
+ - Updated tag examples from `@readme object` to `@readme code` to reflect readme_yard updates
6
+ - Updated README
7
+
1
8
  ## [0.4.0] - 2025-05-03
2
9
 
3
10
  ### Breaking Changes
@@ -23,10 +30,6 @@
23
30
  - Updated YARD dependency from `~> 0.9.26` to `~> 0.9` to support newer versions
24
31
  - Removed specific readme_yard development dependency, now integrates with any compatible version
25
32
 
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
33
  ## [0.3.0] - 2021-08-07
31
34
 
32
35
  - Rename newly added methods be373f150e865b933a58a950e6a5c654395e17c4
data/Gemfile CHANGED
@@ -5,4 +5,5 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in yard-readme.gemspec
6
6
  gemspec
7
7
 
8
+ gem "debug"
8
9
  gem 'readme_yard', '>= 0.3', path: '../readme_yard'
data/Gemfile.lock CHANGED
@@ -2,7 +2,6 @@ PATH
2
2
  remote: ../readme_yard
3
3
  specs:
4
4
  readme_yard (0.3.0)
5
- irb
6
5
  tty-markdown (~> 0.7)
7
6
  yard (~> 0.9)
8
7
  yard-readme (~> 0.4)
@@ -10,13 +9,15 @@ PATH
10
9
  PATH
11
10
  remote: .
12
11
  specs:
13
- yard-readme (0.4.0)
14
- yard (~> 0.9)
12
+ yard-readme (0.5.0)
15
13
 
16
14
  GEM
17
15
  remote: https://rubygems.org/
18
16
  specs:
19
17
  date (3.4.1)
18
+ debug (1.10.0)
19
+ irb (~> 1.10)
20
+ reline (>= 0.3.8)
20
21
  io-console (0.8.0)
21
22
  irb (1.15.2)
22
23
  pp (>= 0.6.0)
@@ -61,6 +62,7 @@ PLATFORMS
61
62
  arm64-darwin-24
62
63
 
63
64
  DEPENDENCIES
65
+ debug
64
66
  irb
65
67
  readme_yard (>= 0.3)!
66
68
  yard-readme!
data/README.md CHANGED
@@ -1,17 +1,8 @@
1
1
  # yard-readme
2
2
 
3
- A [YARD](https://yardoc.org) plugin used by
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 source`,
30
- and `@readme object` control what content gets embedded in the 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", "source", "object"]
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
- {@readme YARD::Readme}
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 source`,
22
- # and `@readme object` control what content gets embedded in the 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", "source", "object"]
28
+ # YARD::Readme::DocstringParser.readme_tag_names = ["comment", "code", "source"]
29
29
  #
30
30
  attr_accessor :readme_tag_names
31
31
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module YARD
4
4
  module Readme
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
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
@@ -1,4 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'yard'
4
3
  require_relative 'yard/readme'
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 = "Enhance your README with YARD"
12
- spec.description = "Generate your README using comments in your code"
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.0
4
+ version: 0.5.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: Generate your README using comments in your code
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: Enhance your README with YARD
74
+ summary: YARD plugin for the readme_yard gem
84
75
  test_files: []