readme_yard 0.1.0 → 0.1.1
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/.gitignore +2 -0
- data/.yardopts +3 -0
- data/CHANGELOG.md +6 -1
- data/Gemfile.lock +27 -4
- data/README.md +89 -16
- data/README_YARD.md +87 -0
- data/bin/readme +9 -0
- data/lib/readme_yard.rb +188 -3
- data/lib/readme_yard/version.rb +2 -2
- data/readme_yard.gemspec +13 -9
- metadata +32 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a4b3f3775475b7a7cb62fec62eb5c95d9d6ef905fab18151636a9c546530b10
|
4
|
+
data.tar.gz: 46be49cca9501b608b435a018ebc36555d698bf1d35da2badb15b0acd3c67231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '02608e395de5ca70c7936804a72f37a174594dd4604646f86880f67ea59a93ea56b8bbbfcd9e8de8178650b66c9e7b76d69e875e55fe3fc67eed2f77f58c7efc'
|
7
|
+
data.tar.gz: 99768416d98d47fb310db967d247ea1a4f5f6cd493dfd5d4905bf49b569951bba5d971e93fa5f2e2b893428a4c9dc3e537389496da20f7eda58b91c7c106cedf
|
data/.gitignore
CHANGED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,15 +1,38 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
readme_yard (0.1.
|
5
|
-
|
4
|
+
readme_yard (0.1.1)
|
5
|
+
tty-markdown (~> 0.7)
|
6
|
+
yard-readme (~> 0.1)
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
9
10
|
specs:
|
11
|
+
kramdown (2.3.1)
|
12
|
+
rexml
|
13
|
+
pastel (0.8.0)
|
14
|
+
tty-color (~> 0.5)
|
15
|
+
rexml (3.2.5)
|
16
|
+
rouge (3.26.0)
|
17
|
+
strings (0.2.1)
|
18
|
+
strings-ansi (~> 0.2)
|
19
|
+
unicode-display_width (>= 1.5, < 3.0)
|
20
|
+
unicode_utils (~> 1.4)
|
21
|
+
strings-ansi (0.2.0)
|
22
|
+
tty-color (0.6.0)
|
23
|
+
tty-markdown (0.7.0)
|
24
|
+
kramdown (>= 1.16.2, < 3.0)
|
25
|
+
pastel (~> 0.8)
|
26
|
+
rouge (~> 3.14)
|
27
|
+
strings (~> 0.2.0)
|
28
|
+
tty-color (~> 0.5)
|
29
|
+
tty-screen (~> 0.8)
|
30
|
+
tty-screen (0.8.1)
|
31
|
+
unicode-display_width (2.0.0)
|
32
|
+
unicode_utils (1.4.0)
|
10
33
|
yard (0.9.26)
|
11
|
-
yard-readme (0.1.
|
12
|
-
yard
|
34
|
+
yard-readme (0.1.1)
|
35
|
+
yard (~> 0.9.26)
|
13
36
|
|
14
37
|
PLATFORMS
|
15
38
|
arm64-darwin-20
|
data/README.md
CHANGED
@@ -1,35 +1,108 @@
|
|
1
|
-
#
|
1
|
+
# Readme Yard
|
2
2
|
|
3
|
-
|
3
|
+
An experiment in building a better README with
|
4
|
+
[YARD](https://yardoc.org).
|
5
|
+
Take a look at [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
|
6
|
+
to see the template from which this README was generated.
|
4
7
|
|
5
|
-
|
8
|
+
If you're reading the README, that means this text is here
|
9
|
+
because `{@readme ReadmeYard}` is in
|
10
|
+
[README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
|
11
|
+
and someone ran `readme build` at the command line.
|
6
12
|
|
7
|
-
|
13
|
+
If you're looking at the [source code](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb) or
|
14
|
+
[documentation](https://rubydoc.info/github/mattruzicka/readme_yard/master/ReadmeYard),
|
15
|
+
_welcome_ to readme yard 🌿 🥏
|
8
16
|
|
9
|
-
|
17
|
+
---
|
18
|
+
|
19
|
+
## Command Line Usage
|
20
|
+
|
21
|
+
`readme` - Prints command line usage.
|
22
|
+
|
23
|
+
`readme build` - Reads from README_YARD.md and writes to README.md.
|
24
|
+
|
25
|
+
`readme doc` - Same as `readme build` + generates yard docs.
|
26
|
+
|
27
|
+
---
|
28
|
+
|
29
|
+
## Getting Started
|
30
|
+
|
31
|
+
Add [gem "readme_yard"](https://rubygems.org/gems/readme_yard) to your application's Gemfile and run `bundle install` or install it yourself with `gem install readme_yard`.
|
32
|
+
|
33
|
+
Next run `readme build` at the command line. This creates a README_YARD.md file if there isn’t one by copying the README file if it exists. It then parses README_YARD.md and writes the result to README.md.
|
34
|
+
|
35
|
+
In addition to being able to use tags as documented in the next section, you can edit the README_YARD file just as you would edit any README. Then to see changes made to README_YARD reflected in the README, run `readme build`.
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
## Usage
|
40
|
+
|
41
|
+
The following tags can be used in README_YARD.md to generate YARD documentation inside your README.
|
42
|
+
|
43
|
+
### @readme
|
44
|
+
|
45
|
+
Usage: `{@readme ObjectPath}`
|
46
|
+
|
47
|
+
`{@readme ReadmeYard}` is used at the top of this project's README_YARD.md file to generate this README's title and description. `ReadmeYard` references the class located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
48
|
+
|
49
|
+
`{@readme ReadmeYard#command_line_usage}` is used to generate the "Command Line Usage" section above from the comments located above. `ReadmeYard#command_line_usage` references the instance method `command_line_usage` located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
50
|
+
|
51
|
+
`{@readme ReadmeYard.hello_world}` - is used to generate this text in README.md. `ReadmeYard.hello_world` references
|
52
|
+
the class method located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
53
|
+
|
54
|
+
### @example
|
55
|
+
|
56
|
+
Usage: `{@example ObjectPath}`
|
57
|
+
|
58
|
+
The below example code is generated from placing `{@example ReadmeYard.hello_world}` in README_YARD.md.
|
10
59
|
|
11
60
|
```ruby
|
12
|
-
|
61
|
+
ReadmeYard.hello_world => "Hello 🌎 🌍 🌏"
|
13
62
|
```
|
14
63
|
|
15
|
-
|
64
|
+
---
|
16
65
|
|
17
|
-
|
66
|
+
## Inspiration
|
18
67
|
|
19
|
-
|
68
|
+
The desire to have the code, README, and documentation for [Evolvable](https://github.com/mattruzicka/evolvable) be useful, synced, and correct as I work on documenting the [1.1.0 Release](https://github.com/mattruzicka/evolvable/pull/8).
|
20
69
|
|
21
|
-
|
70
|
+
I want a README that summarizes and contextualizes the code and documentation, without duplicating them, so as to make keeping it up-to-date easier. Laziness!
|
22
71
|
|
23
|
-
|
72
|
+
---
|
73
|
+
|
74
|
+
## Ideas
|
75
|
+
|
76
|
+
- Embed whole doc string if @readme tag is found, but there’s no text.
|
77
|
+
|
78
|
+
- Embed whole method if @example tag is found, but no text.
|
79
|
+
|
80
|
+
- `readme tags` - Prints usage and a list of all tags
|
81
|
+
|
82
|
+
- `readme tags -v` - Prints docstrings of all tags
|
83
|
+
|
84
|
+
- `readme tags <tag>` - Prints list of matching tags
|
85
|
+
|
86
|
+
- `readme tags <tag>` - Prints list of matching tag docstrings
|
87
|
+
|
88
|
+
- Improve linking. At the moment, there's lots of room for error when adding links in the YARD documentation.
|
89
|
+
|
90
|
+
- Support @todo tags or any other native YARD tags that might be useful.
|
91
|
+
|
92
|
+
- Add ability to target a particular tag in a doc string from README_YARD.md. Maybe via a tag directive?
|
93
|
+
|
94
|
+
- Follow @see links to find tags
|
95
|
+
|
96
|
+
- Integrate something like https://github.com/lsegal/yard-examples/blob/master/doctest/doctest.rb to add red/green test status to code example. Maybe via some sort of tag directive?
|
24
97
|
|
25
|
-
|
98
|
+
- Be able to customize the name of the source and target files.
|
26
99
|
|
27
|
-
|
100
|
+
- Integrate with the YARD server so that changes to documentation or README_YARD.md automatically regenerate the README
|
28
101
|
|
29
|
-
|
102
|
+
- Be able to register regexes for matching tags and running given blocks. Use to create functionality for tagging GitHub source.
|
30
103
|
|
31
|
-
|
104
|
+
---
|
32
105
|
|
33
106
|
## Contributing
|
34
107
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
108
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mattruzicka/yard-readme.
|
data/README_YARD.md
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
# Readme Yard
|
2
|
+
|
3
|
+
{@readme ReadmeYard}
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
{@readme ReadmeYard#command_line_usage}
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
## Getting Started
|
12
|
+
|
13
|
+
Add [gem "readme_yard"](https://rubygems.org/gems/readme_yard) to your application's Gemfile and run `bundle install` or install it yourself with `gem install readme_yard`.
|
14
|
+
|
15
|
+
Next run `readme build` at the command line. This creates a README_YARD.md file if there isn’t one by copying the README file if it exists. It then parses README_YARD.md and writes the result to README.md.
|
16
|
+
|
17
|
+
In addition to being able to use tags as documented in the next section, you can edit the README_YARD file just as you would edit any README. Then to see changes made to README_YARD reflected in the README, run `readme build`.
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
The following tags can be used in README_YARD.md to generate YARD documentation inside your README.
|
24
|
+
|
25
|
+
### @readme
|
26
|
+
|
27
|
+
Usage: `{@readme ObjectPath}`
|
28
|
+
|
29
|
+
`{@readme ReadmeYard}` is used at the top of this project's README_YARD.md file to generate this README's title and description. `ReadmeYard` references the class located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
30
|
+
|
31
|
+
`{@readme ReadmeYard#command_line_usage}` is used to generate the "Command Line Usage" section above from the comments located above. `ReadmeYard#command_line_usage` references the instance method `command_line_usage` located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
32
|
+
|
33
|
+
`{@readme ReadmeYard.hello_world}` - {@readme ReadmeYard.hello_world}
|
34
|
+
|
35
|
+
### @example
|
36
|
+
|
37
|
+
Usage: `{@example ObjectPath}`
|
38
|
+
|
39
|
+
The below example code is generated from placing `{@example ReadmeYard.hello_world}` in README_YARD.md.
|
40
|
+
|
41
|
+
{@example ReadmeYard.hello_world}
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
## Inspiration
|
46
|
+
|
47
|
+
The desire to have the code, README, and documentation for [Evolvable](https://github.com/mattruzicka/evolvable) be useful, synced, and correct as I work on documenting the [1.1.0 Release](https://github.com/mattruzicka/evolvable/pull/8).
|
48
|
+
|
49
|
+
I want a README that summarizes and contextualizes the code and documentation, without duplicating them, so as to make keeping it up-to-date easier. Laziness!
|
50
|
+
|
51
|
+
---
|
52
|
+
|
53
|
+
## Ideas
|
54
|
+
|
55
|
+
- Embed whole doc string if @readme tag is found, but there’s no text.
|
56
|
+
|
57
|
+
- Embed whole method if @example tag is found, but no text.
|
58
|
+
|
59
|
+
- `readme tags` - Prints usage and a list of all tags
|
60
|
+
|
61
|
+
- `readme tags -v` - Prints docstrings of all tags
|
62
|
+
|
63
|
+
- `readme tags <tag>` - Prints list of matching tags
|
64
|
+
|
65
|
+
- `readme tags <tag>` - Prints list of matching tag docstrings
|
66
|
+
|
67
|
+
- Improve linking. At the moment, there's lots of room for error when adding links in the YARD documentation.
|
68
|
+
|
69
|
+
- Support @todo tags or any other native YARD tags that might be useful.
|
70
|
+
|
71
|
+
- Add ability to target a particular tag in a doc string from README_YARD.md. Maybe via a tag directive?
|
72
|
+
|
73
|
+
- Follow @see links to find tags
|
74
|
+
|
75
|
+
- Integrate something like https://github.com/lsegal/yard-examples/blob/master/doctest/doctest.rb to add red/green test status to code example. Maybe via some sort of tag directive?
|
76
|
+
|
77
|
+
- Be able to customize the name of the source and target files.
|
78
|
+
|
79
|
+
- Integrate with the YARD server so that changes to documentation or README_YARD.md automatically regenerate the README
|
80
|
+
|
81
|
+
- Be able to register regexes for matching tags and running given blocks. Use to create functionality for tagging GitHub source.
|
82
|
+
|
83
|
+
---
|
84
|
+
|
85
|
+
## Contributing
|
86
|
+
|
87
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mattruzicka/yard-readme.
|
data/bin/readme
ADDED
data/lib/readme_yard.rb
CHANGED
@@ -1,8 +1,193 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "yard-readme"
|
3
4
|
require_relative "readme_yard/version"
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
#
|
7
|
+
# @readme
|
8
|
+
# An experiment in building a better README with
|
9
|
+
# [YARD](https://yardoc.org).
|
10
|
+
# Take a look at [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
|
11
|
+
# to see the template from which this README was generated.
|
12
|
+
#
|
13
|
+
# If you're reading the README, that means this text is here
|
14
|
+
# because `{@readme ReadmeYard}` is in
|
15
|
+
# [README_YARD.md](https://github.com/mattruzicka/readme_yard/blob/main/README_YARD.md)
|
16
|
+
# and someone ran `readme build` at the command line.
|
17
|
+
#
|
18
|
+
# If you're looking at the [source code](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb) or
|
19
|
+
# [documentation](https://rubydoc.info/github/mattruzicka/readme_yard/master/ReadmeYard),
|
20
|
+
# _welcome_ to readme yard 🌿 🥏
|
21
|
+
#
|
22
|
+
class ReadmeYard
|
23
|
+
class Error < StandardError
|
24
|
+
class << self
|
25
|
+
def tag_not_found(tag_name, object_path)
|
26
|
+
new("The `@#{tag_name}` tag could not be found at `#{object_path}`")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# @readme
|
33
|
+
# is used to generate this text in README.md. `ReadmeYard.hello_world` references
|
34
|
+
# the class method located in [lib/readme_yard.rb](lib/readme_yard.rb).
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# ReadmeYard.hello_world => "Hello 🌎 🌍 🌏"
|
38
|
+
#
|
39
|
+
def self.hello_world
|
40
|
+
"Hello 🌎 🌍 🌏"
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# @see #command_line_usage
|
45
|
+
#
|
46
|
+
def self.call(arg, options)
|
47
|
+
readme_yard = ReadmeYard.new
|
48
|
+
|
49
|
+
case arg
|
50
|
+
when "build"
|
51
|
+
readme_yard.build(options: options)
|
52
|
+
when "doc"
|
53
|
+
readme_yard.doc(options: options)
|
54
|
+
else
|
55
|
+
puts TTY::Markdown.parse(readme_yard.command_line_usage)
|
56
|
+
end
|
57
|
+
rescue Error => e
|
58
|
+
puts TTY::Markdown.parse(e)
|
59
|
+
end
|
60
|
+
|
61
|
+
def initialize
|
62
|
+
@readme_path = "./README.md"
|
63
|
+
@readme_yard_path = "./README_YARD.md"
|
64
|
+
end
|
65
|
+
|
66
|
+
attr_accessor :readme_path, :readme_yard_path
|
67
|
+
|
68
|
+
#
|
69
|
+
# This method returns the following `@readme` text
|
70
|
+
#
|
71
|
+
# @readme
|
72
|
+
# ## Command Line Usage
|
73
|
+
#
|
74
|
+
# `readme` - Prints command line usage.
|
75
|
+
#
|
76
|
+
# `readme build` - Reads from README_YARD.md and writes to README.md.
|
77
|
+
#
|
78
|
+
# `readme doc` - Same as `readme build` + generates yard docs.
|
79
|
+
#
|
80
|
+
def command_line_usage
|
81
|
+
yard_parse_this_file
|
82
|
+
yard_object = YARD::Registry.at("#{self.class.name}##{__method__}")
|
83
|
+
tags = yard_object.tags(:readme)
|
84
|
+
"\n#{format_readme_tags(tags)}\n\n"
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# @readme
|
89
|
+
# Reads from README_YARD.md and writes to README.md
|
90
|
+
#
|
91
|
+
# Forwards options to yardoc
|
92
|
+
#
|
93
|
+
# `-n` only generate .yardoc database, no documentation.
|
94
|
+
#
|
95
|
+
# `-q` silence yardoc output statements
|
96
|
+
#
|
97
|
+
def build(options: "-nq")
|
98
|
+
run_yardoc(options: options)
|
99
|
+
File.write(readme_path, gsub_tags!(readme_yard_md))
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# @readme Same as "build" + generates yard docs.
|
104
|
+
#
|
105
|
+
def doc(options: "-q --markup markdown")
|
106
|
+
build(options: options || "-q --markup markdown")
|
107
|
+
end
|
108
|
+
|
109
|
+
def run_yardoc(options: "-nq")
|
110
|
+
YARD::CLI::Yardoc.run("#{options || "-nq"} --plugin readme")
|
111
|
+
end
|
112
|
+
|
113
|
+
private
|
114
|
+
|
115
|
+
def readme_yard_md
|
116
|
+
return File.read(readme_yard_path) if File.exist?(readme_yard_path)
|
117
|
+
|
118
|
+
create_new_readme_yard_md
|
119
|
+
end
|
120
|
+
|
121
|
+
def create_new_readme_yard_md
|
122
|
+
new_readme_yard_md = File.read(readme_path) if File.exist?(readme_path)
|
123
|
+
new_readme_yard_md ||= default_readme_yard_md
|
124
|
+
File.write(readme_yard_path, new_readme_yard_md)
|
125
|
+
new_readme_yard_md
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# This method adds the below paragraph to a project's
|
130
|
+
# README.md file, if it doesn't already have one when running
|
131
|
+
# `readme build` for the first time.
|
132
|
+
#
|
133
|
+
# @readme
|
134
|
+
# This is a quick example of using a readme tag in README_YARD.md
|
135
|
+
#
|
136
|
+
# > {@readme ReadmeYard#default_readme_yard_md}
|
137
|
+
#
|
138
|
+
# to copy a `@readme` comment from
|
139
|
+
# [source code](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb)
|
140
|
+
# and paste it into the README file.
|
141
|
+
#
|
142
|
+
# 🌱 ⚽
|
143
|
+
#
|
144
|
+
def default_readme_yard_md
|
145
|
+
yard_parse_this_file
|
146
|
+
+"Welcome to the README_YARD 🌿 🥏\n\n" \
|
147
|
+
"Check out this project's" \
|
148
|
+
" [README](https://github.com/mattruzicka/readme_yard#readme)" \
|
149
|
+
" for usage.\n\n{@readme ReadmeYard#default_readme_yard_md}"
|
150
|
+
end
|
151
|
+
|
152
|
+
def gsub_tags!(markdown)
|
153
|
+
markdown.gsub!(/([^`]|^)(\{@\w+\s.+\})/) { |string| format_tag(string) }
|
154
|
+
markdown
|
155
|
+
end
|
156
|
+
|
157
|
+
def format_tag(string)
|
158
|
+
first_char = string[0]
|
159
|
+
return string if first_char == "`"
|
160
|
+
|
161
|
+
tag_name = extract_tag_name(string)
|
162
|
+
object_path = extract_object_path(string)
|
163
|
+
code_object = YARD::Registry.at(object_path)
|
164
|
+
raise Error.tag_not_found(tag_name, object_path) unless code_object
|
165
|
+
|
166
|
+
tags = code_object.tags(tag_name)
|
167
|
+
return string if tags.empty?
|
168
|
+
|
169
|
+
"#{first_char if first_char != "{"}#{send("format_#{tag_name}_tags", tags)}"
|
170
|
+
end
|
171
|
+
|
172
|
+
def extract_tag_name(tag_string)
|
173
|
+
tag_string.match(/{@(\w+)\s/).captures.first
|
174
|
+
end
|
175
|
+
|
176
|
+
def extract_object_path(tag_string)
|
177
|
+
tag_string.match(/\s(\b.+)}/).captures.first
|
178
|
+
end
|
179
|
+
|
180
|
+
def format_readme_tags(tags)
|
181
|
+
tags.map(&:text).join
|
182
|
+
end
|
183
|
+
|
184
|
+
def format_example_tags(tags)
|
185
|
+
tags.map { |tag| "```ruby\n#{tag.text}\n```" }.join("\n")
|
186
|
+
end
|
187
|
+
|
188
|
+
def yard_parse_this_file
|
189
|
+
gem_spec = Gem::Specification.find_by_name("readme_yard")
|
190
|
+
current_file_path = File.join(gem_spec.full_gem_path, "lib", "readme_yard.rb")
|
191
|
+
YARD.parse(current_file_path)
|
192
|
+
end
|
8
193
|
end
|
data/lib/readme_yard/version.rb
CHANGED
data/readme_yard.gemspec
CHANGED
@@ -3,13 +3,16 @@
|
|
3
3
|
require_relative "lib/readme_yard/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name
|
7
|
-
spec.version
|
8
|
-
spec.authors
|
6
|
+
spec.name = "readme_yard"
|
7
|
+
spec.version = ReadmeYard::VERSION
|
8
|
+
spec.authors = ["Matt Ruzicka"]
|
9
|
+
spec.license = "MIT"
|
9
10
|
|
10
|
-
spec.summary
|
11
|
-
spec.description
|
12
|
-
|
11
|
+
spec.summary = "Build a better README with YARD."
|
12
|
+
spec.description = "An experiment in building a README that summarizes" \
|
13
|
+
"and contextualizes the code and documentation, without" \
|
14
|
+
" duplicating them, so as to make keeping it up-to-date easier."
|
15
|
+
spec.homepage = "https://github.com/mattruzicka/readme_yard"
|
13
16
|
spec.required_ruby_version = ">= 2.5"
|
14
17
|
|
15
18
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -21,12 +24,13 @@ Gem::Specification.new do |spec|
|
|
21
24
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
25
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
23
26
|
end
|
24
|
-
|
25
|
-
spec.executables
|
27
|
+
|
28
|
+
spec.executables << "readme"
|
26
29
|
spec.require_paths = ["lib"]
|
27
30
|
|
28
31
|
# Uncomment to register a new dependency of your gem
|
29
|
-
spec.add_dependency "
|
32
|
+
spec.add_dependency "tty-markdown", "~> 0.7"
|
33
|
+
spec.add_dependency "yard-readme", "~> 0.1"
|
30
34
|
|
31
35
|
# For more information and examples about making a new gem, checkout our
|
32
36
|
# guide at: https://bundler.io/guides/creating_gem.html
|
metadata
CHANGED
@@ -1,50 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: readme_yard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Ruzicka
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tty-markdown
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.7'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: yard-readme
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
33
|
+
version: '0.1'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
description:
|
40
|
+
version: '0.1'
|
41
|
+
description: An experiment in building a README that summarizesand contextualizes
|
42
|
+
the code and documentation, without duplicating them, so as to make keeping it up-to-date
|
43
|
+
easier.
|
28
44
|
email:
|
29
|
-
executables:
|
45
|
+
executables:
|
46
|
+
- readme
|
30
47
|
extensions: []
|
31
48
|
extra_rdoc_files: []
|
32
49
|
files:
|
33
50
|
- ".github/workflows/main.yml"
|
34
51
|
- ".gitignore"
|
35
52
|
- ".rubocop.yml"
|
53
|
+
- ".yardopts"
|
36
54
|
- CHANGELOG.md
|
37
55
|
- Gemfile
|
38
56
|
- Gemfile.lock
|
39
57
|
- README.md
|
58
|
+
- README_YARD.md
|
40
59
|
- Rakefile
|
41
60
|
- bin/console
|
61
|
+
- bin/readme
|
42
62
|
- bin/setup
|
43
63
|
- lib/readme_yard.rb
|
44
64
|
- lib/readme_yard/version.rb
|
45
65
|
- readme_yard.gemspec
|
46
66
|
homepage: https://github.com/mattruzicka/readme_yard
|
47
|
-
licenses:
|
67
|
+
licenses:
|
68
|
+
- MIT
|
48
69
|
metadata:
|
49
70
|
homepage_uri: https://github.com/mattruzicka/readme_yard
|
50
71
|
source_code_uri: https://github.com/mattruzicka/readme_yard
|
@@ -67,5 +88,5 @@ requirements: []
|
|
67
88
|
rubygems_version: 3.2.3
|
68
89
|
signing_key:
|
69
90
|
specification_version: 4
|
70
|
-
summary:
|
91
|
+
summary: Build a better README with YARD.
|
71
92
|
test_files: []
|