yard-markdown 0.1.0 → 0.1.1

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: 6ff780c12b0efc36b1ba7c766ac4a8645d5fa9c5776e6ac1351a064b797e4fd1
4
- data.tar.gz: fb42ed6ee07c97cd22af57267b0aed1570b7fb9fe89a4840a643fe4858d4a2a5
3
+ metadata.gz: dd90bdd01f08225188020b4f84a23b978c37416b6b0081c65056c10c5040d3e6
4
+ data.tar.gz: 548d5b5cd91b4e95d9f212d18aa8c3a24c8c9be71c256cfda226ecd8ba5cdd61
5
5
  SHA512:
6
- metadata.gz: d0ff4417bb45236c042daece82cf8442840d0f9c573a6be70e513c5c603ca813dc07ce8d30a5ddad0707463d95e9ac8a548f3f476bde5b777aaf4a27d16e91dd
7
- data.tar.gz: 9687a9283bd08e6b5be2d00f0da4f2c41b997a71ef2875c0090aa15ccc78f0ea77d1710b9aba5b63775f2c34efe58dacc668adf9ded49453cbc9a1e575eb04ed
6
+ metadata.gz: fc7dff8536243860024a82e98eb8a0a26057f0db61aef58431302d73058372dcb206cbca9ea926e94c879b43113caf1065c4bd8cd06af6a78b9d501e5da810f2
7
+ data.tar.gz: b7cda956cf500503d138d9eeba8d336dce374605870334b28df162fd61c0d2a539603bf8f40518ca0e9b659a0303a224a4238e154b923ec681be72c5956eec0f
data/README.md CHANGED
@@ -1,14 +1,27 @@
1
1
  # Yard::Markdown
2
2
 
3
- Yard-markdown produces markdown documents for ruby gems.
3
+ Yard theme plugin that generates markdown documentation for gems
4
4
 
5
- Goals:
5
+ ## Goals:
6
6
  - Compatible with Github Flavored Markdown
7
7
  - Mimick yard html layout in markdown format as much as possible
8
- - Produce .csv index file alonside markdown documentation
8
+ - Produce .csv index file alonside markdown documentation to act as file index
9
9
 
10
- This is a successor to rdoc-mardown gem, so it will very likely be similar to this [example](https://github.com/skatkov/rdoc-markdown/tree/main/example).
10
+ ## Usage
11
+ Add these lines:
12
+ ```
13
+ gem 'yard-markdown'
14
+ ```
15
+ And run `bundle install`
11
16
 
17
+ Run yardoc with `--format=markdown` parameter.
12
18
 
13
- Testing:
14
- `yardoc example.rb` -> outputs everything into doc.
19
+ ## Backstory
20
+ Successor to rdoc-mardown gem that was authored by me. So there is a lot of similarities between two - [example](https://github.com/skatkov/rdoc-markdown/tree/main/example).
21
+
22
+ This gem is used by documentation reviewing tool called [POSH TUI](https://poshtui.com)
23
+
24
+ ## Testing
25
+ Unit tests can't really test this gem properly. So it's semi-manual process of making changes and reviewing output.
26
+
27
+ `yardoc example.rb` -> outputs everything into example/ folder.
data/example/Bird.md CHANGED
@@ -34,3 +34,4 @@ Produce some noise.
34
34
  --
35
35
  FIXME: maybe extract this to a base class +Animal+?
36
36
  ++
37
+
data/example/Duck.md CHANGED
@@ -5,7 +5,7 @@
5
5
  | **Extended by:** | Animal |
6
6
  | **Includes:** | Waterfowl |
7
7
  | **Defined in:** | example.rb |
8
- || |
8
+
9
9
 
10
10
  A duck is a Waterfowl Bird.
11
11
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module YARD
4
4
  module Markdown
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ dir = File.dirname(__FILE__)
4
+ $LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
5
+
6
+ require "yard"
7
+ require_relative "markdown/version"
8
+
9
+ module YARD
10
+ module Markdown
11
+ end
12
+ end
13
+
14
+ puts "YARD::Markdown loaded"
15
+ YARD::Templates::Engine.register_template_path dir + '/../templates'
@@ -2,7 +2,6 @@
2
2
 
3
3
  # https://github.com/lsegal/yard/blob/2d197a381c5d4cc5c55b2c60fff992b31c986361/docs/CodeObjects.md
4
4
 
5
- require_relative "../../../../lib/yard/serializers/markdown_serializer"
6
5
  require "erb"
7
6
 
8
7
  def init
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov
@@ -9,8 +9,22 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2023-11-26 00:00:00.000000000 Z
12
- dependencies: []
13
- description: yard-markdown is a yard plugin template to generate markdown files
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: yard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: yard theme plugin that generates markdown documentation for gems
14
28
  email:
15
29
  - yard-markdown@skatkov.com
16
30
  executables: []
@@ -27,11 +41,9 @@ files:
27
41
  - example/Bird.md
28
42
  - example/Duck.md
29
43
  - example/Waterfowl.md
30
- - lib/yard/markdown.rb
44
+ - lib/yard-markdown.rb
31
45
  - lib/yard/markdown/version.rb
32
- - lib/yard/serializers/markdown_serializer.rb
33
46
  - sig/yard/markdown.rbs
34
- - templates/default/fulldoc/markdown/content.erb
35
47
  - templates/default/fulldoc/markdown/setup.rb
36
48
  homepage: https://poshtui.com
37
49
  licenses:
@@ -54,8 +66,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
66
  - !ruby/object:Gem::Version
55
67
  version: '0'
56
68
  requirements: []
57
- rubygems_version: 3.4.20
69
+ rubygems_version: 3.4.22
58
70
  signing_key:
59
71
  specification_version: 4
60
- summary: yard-markdown is a yard plugin template to generate markdown files
72
+ summary: yard theme plugin that generates markdown documentation for gems
61
73
  test_files: []
data/lib/yard/markdown.rb DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "yard"
4
- require_relative "markdown/version"
5
- require_relative "serializers/markdown_serializer"
6
-
7
- module YARD
8
- module Markdown
9
- YARD::Templates::Engine.register_template_path "/../../templates"
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module YARD
4
- module Serializers
5
- class MarkdownSerializer < YARD::Serializers::FileSystemSerializer
6
- def initialize(opts = {})
7
- super(opts.merge(extension: "md"))
8
- end
9
- end
10
- end
11
- end
@@ -1,2 +0,0 @@
1
- # Test
2
- <%= @object.docstring %>