yard-markdown 0.1.0 → 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: 6ff780c12b0efc36b1ba7c766ac4a8645d5fa9c5776e6ac1351a064b797e4fd1
4
- data.tar.gz: fb42ed6ee07c97cd22af57267b0aed1570b7fb9fe89a4840a643fe4858d4a2a5
3
+ metadata.gz: f8bc0dd303b8e3b40e53d55a7b53c339e8d0c8c8f8a44427c12bc6cca9f303f4
4
+ data.tar.gz: 13159d5918456cbfa5e909679ba2596a52dfecb24ec14bdccac20f51d5552146
5
5
  SHA512:
6
- metadata.gz: d0ff4417bb45236c042daece82cf8442840d0f9c573a6be70e513c5c603ca813dc07ce8d30a5ddad0707463d95e9ac8a548f3f476bde5b777aaf4a27d16e91dd
7
- data.tar.gz: 9687a9283bd08e6b5be2d00f0da4f2c41b997a71ef2875c0090aa15ccc78f0ea77d1710b9aba5b63775f2c34efe58dacc668adf9ded49453cbc9a1e575eb04ed
6
+ metadata.gz: e2aa7fac3e51b28d2bece0f852da3436d9f9bdb83242af7f78bb25aefde514206f01fe6f9d70f2765b6342cf11b1b40a484454b782565161ec50a72705c41aec
7
+ data.tar.gz: 37c63aa190abaa091d27c279268a23756f120393a519286983510933e5fd22f9076cc6c8f8b694ba25e27d4b638b5d44587f5528c9a97c61f4db3e2b861cca70
data/.yardopts CHANGED
@@ -1,4 +1,4 @@
1
- --load ./lib/yard/markdown.rb
1
+ --load ./lib/yard-markdown.rb
2
2
  --format markdown
3
3
  --markup markdown
4
4
  --output-dir example
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
 
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "yard"
4
+
5
+ module YARD
6
+ module Markdown
7
+ end
8
+ end
9
+
10
+ YARD::Templates::Engine.register_template_path File.dirname(__FILE__) + '/../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,16 +1,30 @@
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stanislav (Stas) Katkov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
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
11
+ date: 2023-11-28 00:00:00.000000000 Z
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,8 @@ files:
27
41
  - example/Bird.md
28
42
  - example/Duck.md
29
43
  - example/Waterfowl.md
30
- - lib/yard/markdown.rb
31
- - lib/yard/markdown/version.rb
32
- - lib/yard/serializers/markdown_serializer.rb
44
+ - lib/yard-markdown.rb
33
45
  - sig/yard/markdown.rbs
34
- - templates/default/fulldoc/markdown/content.erb
35
46
  - templates/default/fulldoc/markdown/setup.rb
36
47
  homepage: https://poshtui.com
37
48
  licenses:
@@ -54,8 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
65
  - !ruby/object:Gem::Version
55
66
  version: '0'
56
67
  requirements: []
57
- rubygems_version: 3.4.20
68
+ rubygems_version: 3.4.22
58
69
  signing_key:
59
70
  specification_version: 4
60
- summary: yard-markdown is a yard plugin template to generate markdown files
71
+ summary: yard theme plugin that generates markdown documentation for gems
61
72
  test_files: []
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module YARD
4
- module Markdown
5
- VERSION = "0.1.0"
6
- end
7
- end
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 %>