readme_yard 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a4b3f3775475b7a7cb62fec62eb5c95d9d6ef905fab18151636a9c546530b10
4
- data.tar.gz: 46be49cca9501b608b435a018ebc36555d698bf1d35da2badb15b0acd3c67231
3
+ metadata.gz: 3d5cd63671c91ee41af8ce37e33ae8a2cb1e2b71a70c2a9c6b5063128a635fce
4
+ data.tar.gz: 910ee77105320c38974f621d750719b43c33f3b2f2dadd7ec66a16b616303f28
5
5
  SHA512:
6
- metadata.gz: '02608e395de5ca70c7936804a72f37a174594dd4604646f86880f67ea59a93ea56b8bbbfcd9e8de8178650b66c9e7b76d69e875e55fe3fc67eed2f77f58c7efc'
7
- data.tar.gz: 99768416d98d47fb310db967d247ea1a4f5f6cd493dfd5d4905bf49b569951bba5d971e93fa5f2e2b893428a4c9dc3e537389496da20f7eda58b91c7c106cedf
6
+ metadata.gz: bad866d4aa2dcc18b21ea1af011fcb5374614dd1961e187d84b24873611466a4099d36aca44da03ece1f9dda8f6ebef54c3f94cbc0312365f6fb20fa8dc526e8
7
+ data.tar.gz: 467924c84db446676b5c0d3002a815646e2976c3aec76258075f2104158d064eac450b2a57a6763c5947cac145be808346e97469a47a52e920cacb2a8fb407d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## 0.1.2 - 2021-08-06
4
+
5
+ - Fix error message markdown parsing. 0f1c3fa4f39c6d7a1628f81e1ea41489b7021254
6
+ - Improve error message when the object path isn't found. 9bdcabd2a90ba94a7e7a1fbbfe872550034c83c3
7
+ - Fix links in documentation + small copy edits. 63d5608fdee6757f314a315509dda31710087f60
8
+
3
9
  ## 0.1.1 - 2021-07-30
4
10
 
5
11
  - First Implementation, the README will hopefully get you started. Please open an issue if it doesn't 🙂.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- readme_yard (0.1.1)
4
+ readme_yard (0.1.2)
5
5
  tty-markdown (~> 0.7)
6
6
  yard-readme (~> 0.1)
7
7
 
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
- # Readme Yard
1
+ # Readme Yard 🌿
2
+ [![Gem Version](https://badge.fury.io/rb/readme_yard.svg)](https://badge.fury.io/rb/readme_yard)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/9fe0012930c3886dbe00/maintainability)](https://codeclimate.com/github/mattruzicka/readme_yard/maintainability)
2
4
 
3
5
  An experiment in building a better README with
4
6
  [YARD](https://yardoc.org).
5
7
  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.
8
+ to see the template from which the README for this project was generated.
7
9
 
8
10
  If you're reading the README, that means this text is here
9
11
  because `{@readme ReadmeYard}` is in
@@ -11,8 +13,8 @@ because `{@readme ReadmeYard}` is in
11
13
  and someone ran `readme build` at the command line.
12
14
 
13
15
  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 🌿 🥏
16
+ [documentation](https://rubydoc.info/github/mattruzicka/readme_yard),
17
+ _welcome_ to readme yard!
16
18
 
17
19
  ---
18
20
 
@@ -44,12 +46,12 @@ The following tags can be used in README_YARD.md to generate YARD documentation
44
46
 
45
47
  Usage: `{@readme ObjectPath}`
46
48
 
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).
49
+ `{@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](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
48
50
 
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).
51
+ `{@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](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
50
52
 
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
+ `{@readme ReadmeYard.hello_world}` - This object only exists so that you can read this in the README. `ReadmeYard.hello_world` references
54
+ the class method located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
53
55
 
54
56
  ### @example
55
57
 
data/README_YARD.md CHANGED
@@ -1,4 +1,6 @@
1
- # Readme Yard
1
+ # Readme Yard 🌿
2
+ [![Gem Version](https://badge.fury.io/rb/readme_yard.svg)](https://badge.fury.io/rb/readme_yard)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/9fe0012930c3886dbe00/maintainability)](https://codeclimate.com/github/mattruzicka/readme_yard/maintainability)
2
4
 
3
5
  {@readme ReadmeYard}
4
6
 
@@ -26,9 +28,9 @@ The following tags can be used in README_YARD.md to generate YARD documentation
26
28
 
27
29
  Usage: `{@readme ObjectPath}`
28
30
 
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).
31
+ `{@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](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
30
32
 
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).
33
+ `{@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](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
32
34
 
33
35
  `{@readme ReadmeYard.hello_world}` - {@readme ReadmeYard.hello_world}
34
36
 
data/lib/readme_yard.rb CHANGED
@@ -8,7 +8,7 @@ require_relative "readme_yard/version"
8
8
  # An experiment in building a better README with
9
9
  # [YARD](https://yardoc.org).
10
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.
11
+ # to see the template from which the README for this project was generated.
12
12
  #
13
13
  # If you're reading the README, that means this text is here
14
14
  # because `{@readme ReadmeYard}` is in
@@ -16,22 +16,27 @@ require_relative "readme_yard/version"
16
16
  # and someone ran `readme build` at the command line.
17
17
  #
18
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 🌿 🥏
19
+ # [documentation](https://rubydoc.info/github/mattruzicka/readme_yard),
20
+ # _welcome_ to readme yard!
21
21
  #
22
22
  class ReadmeYard
23
23
  class Error < StandardError
24
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}`")
25
+ # TODO: Look for instance method with same name if
26
+ # class method and vise versa to give a more helpful error.
27
+ # Also, look for the object path in other scopes.
28
+ def object_not_found(tag_name, object_path)
29
+ new("`#{object_path}` could not be found. Perhaps" \
30
+ " the `@#{tag_name}` tag was moved, mispelled," \
31
+ " or the `.yardopts` YARD file is missing the file path.")
27
32
  end
28
33
  end
29
34
  end
30
35
 
31
36
  #
32
37
  # @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).
38
+ # This object only exists so that you can read this in the README. `ReadmeYard.hello_world` references
39
+ # the class method located in [lib/readme_yard.rb](https://github.com/mattruzicka/readme_yard/blob/main/lib/readme_yard.rb).
35
40
  #
36
41
  # @example
37
42
  # ReadmeYard.hello_world => "Hello 🌎 🌍 🌏"
@@ -55,7 +60,7 @@ class ReadmeYard
55
60
  puts TTY::Markdown.parse(readme_yard.command_line_usage)
56
61
  end
57
62
  rescue Error => e
58
- puts TTY::Markdown.parse(e)
63
+ puts TTY::Markdown.parse(e.message)
59
64
  end
60
65
 
61
66
  def initialize
@@ -127,7 +132,7 @@ class ReadmeYard
127
132
 
128
133
  #
129
134
  # This method adds the below paragraph to a project's
130
- # README.md file, if it doesn't already have one when running
135
+ # README file, if it doesn't already have one when running
131
136
  # `readme build` for the first time.
132
137
  #
133
138
  # @readme
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ReadmeYard
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/readme_yard.gemspec CHANGED
@@ -9,9 +9,6 @@ Gem::Specification.new do |spec|
9
9
  spec.license = "MIT"
10
10
 
11
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
12
  spec.homepage = "https://github.com/mattruzicka/readme_yard"
16
13
  spec.required_ruby_version = ">= 2.5"
17
14
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: readme_yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Ruzicka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-31 00:00:00.000000000 Z
11
+ date: 2021-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-markdown
@@ -38,9 +38,7 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
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.
41
+ description:
44
42
  email:
45
43
  executables:
46
44
  - readme