rdoc-markdown 0.2 → 0.2.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: 761747d3a9b32015fca088a58b871d0dbd1ab62b6239d2a4e6f6b3065a0e655e
4
- data.tar.gz: e8948dfc980ee3a316699579d254fcb43c8f43549c07fd67ea7d4232bf16ae58
3
+ metadata.gz: 16494339df3b522fae317e9010c0a9ee8cae1a7f4452595c8fde01e238421c64
4
+ data.tar.gz: 1dec9b05ccdea281811213800b2301a4f89097dcaacbf72ac59fa7c85aeff676
5
5
  SHA512:
6
- metadata.gz: 4b7cce412555f74e6bb4798cdc1fe03d304f694144608ba20c71e8ea77e4b1caa2d791001ee3b58824d740bc55fe5634f8174a4b54be33a64d12f971ce55da7f
7
- data.tar.gz: efea582acb0a4012734c1cdd974987c52df2cac297ca4c773cf268e84f6af325ae95e9391a10c0f89bd31e25a990cd64f1c990ba02c35c5d2dc23573c12ed7e9
6
+ metadata.gz: 30b4a879efd549f01f627558c390b34b05aece87ce14fe46293770e342c90fdaf176457b50fad52f215de6aa91b7477607601530d8874f60869570e9990b043d
7
+ data.tar.gz: 76947d62302a58b3ceeb41d78be86dcbe7d6032fa41579e9287567aecda5bf23c7271bfb453c8125d9dd6d6b934bd5de996637145a2ba377f068f8198909c82a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rdoc-markdown (0.1.14)
4
+ rdoc-markdown (0.2.1)
5
5
  activesupport (~> 7.0)
6
6
  erb (~> 2.0)
7
7
  extralite-bundle (~> 1.0)
@@ -56,7 +56,7 @@ GEM
56
56
  rubocop-ast (>= 1.20.1, < 2.0)
57
57
  ruby-progressbar (~> 1.7)
58
58
  unicode-display_width (>= 1.4.0, < 3.0)
59
- rubocop-ast (1.22.0)
59
+ rubocop-ast (1.23.0)
60
60
  parser (>= 3.1.1.0)
61
61
  rubocop-performance (1.14.3)
62
62
  rubocop (>= 1.7.0, < 2.0)
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Rdoc::Markdown
2
- This gem is focused on spitting readable markdown files based on rdoc documentation. It should also come with sqlite database as an index (but this is so far only in plans).
3
-
4
- It is still actively in development and while works as proof of concept, still has some quirks here and there.
2
+ Rdoc Generator plugin to generate markdown documentation and search index as sqlite database that goes along with it.
5
3
 
6
4
  ## Installation
7
5
 
@@ -14,15 +12,10 @@ If bundler is not being used to manage dependencies, install the gem by executin
14
12
  $ gem install rdoc-markdown
15
13
 
16
14
  ## Usage
17
- First thing to do, is to install a gem
18
-
19
- `gem install rdoc-markdown`
20
-
21
- Then proceed to directory where you want to generate documentation:
22
15
 
23
16
  `rdoc --format=markdown`
24
17
 
25
- Don't forget to append `--debug` to have a bit more information in case thing fail (and they will probably do, because this entire thing is experimental).
18
+ No additional parameters are currently available, but that may change.
26
19
 
27
20
  ## Development
28
21
  Biggest issue is testing this locally, but that's not as hard to do these days.
@@ -41,11 +34,23 @@ or you can do the same, but through gemfile:
41
34
  gem 'rdoc-markdown`, path: "../rdoc-markdown/`
42
35
  ```
43
36
 
37
+ I have scripted entire process in [rm-reload.sh script](https://github.com/skatkov/gum/blob/master/rm-reload.sh). But it assumes, that you have [gum library](https://github.com/charmbracelet/gum) installed.
38
+
39
+ ## Testing
40
+ Testing is not excessive, just verifies that basic functionality is operational. Following command should run entire testsuit:
41
+
42
+ ```
43
+ rake test
44
+ ```
45
+
44
46
  ## Release
45
47
  ```
46
48
  gem build rdoc-markdown.gemspec
47
49
  gem push rdoc-markdown-0.1.2.gem
48
50
  ```
51
+
52
+ There is `./publish.sh` script that does that. But it assumes, that you have [gum library](https://github.com/charmbracelet/gum) installed.
53
+
49
54
  ## Contributing
50
55
 
51
56
  Bug reports and pull requests are welcome on GitHub at https://github.com/skatkov/rdoc-markdown. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/skatkov/rdoc-markdown/blob/master/CODE_OF_CONDUCT.md).
@@ -32,7 +32,7 @@ class RDoc::Generator::Markdown
32
32
 
33
33
  ##
34
34
  # Classes and modules to be used by this generator, not necessarily
35
- # displayed. See also #modsort
35
+ # displayed.
36
36
 
37
37
  attr_reader :classes
38
38
 
@@ -63,11 +63,9 @@ class RDoc::Generator::Markdown
63
63
  # Generates markdown files and search index file
64
64
 
65
65
  def generate
66
- setup
67
-
68
- debug("Create directory #{@output_dir}")
66
+ debug("Setting things up #{@output_dir}")
69
67
 
70
- output_dir.mkpath
68
+ setup
71
69
 
72
70
  debug("Generate documentation in #{@output_dir}")
73
71
 
@@ -124,7 +122,7 @@ class RDoc::Generator::Markdown
124
122
  result << {
125
123
  name: "#{klass.full_name}.#{method.name}",
126
124
  type: "Method",
127
- path: "#{turn_to_path(klass.full_name)}#meth-#{ActiveSupport::Inflector.parameterize method.name}"
125
+ path: "#{turn_to_path(klass.full_name)}##{method.aref}"
128
126
  }
129
127
  end
130
128
 
@@ -132,7 +130,7 @@ class RDoc::Generator::Markdown
132
130
  result << {
133
131
  name: "#{klass.full_name}.#{const.name}",
134
132
  type: "Constant",
135
- path: "#{turn_to_path(klass.full_name)}#const-#{ActiveSupport::Inflector.parameterize const.name}"
133
+ path: "#{turn_to_path(klass.full_name)}##{ActiveSupport::Inflector.parameterize const.name}"
136
134
  }
137
135
  end
138
136
 
@@ -140,7 +138,7 @@ class RDoc::Generator::Markdown
140
138
  result << {
141
139
  name: "#{klass.full_name}.#{attr.name}",
142
140
  type: "Attribute",
143
- path: "#{turn_to_path(klass.full_name)}#attr-#{ActiveSupport::Inflector.parameterize attr.name}"
141
+ path: "#{turn_to_path(klass.full_name)}##{attr.aref}"
144
142
  }
145
143
  end
146
144
  end
@@ -215,11 +213,11 @@ class RDoc::Generator::Markdown
215
213
  return if instance_variable_defined?(:@output_dir)
216
214
 
217
215
  @output_dir = Pathname.new(@options.op_dir).expand_path(@base_dir)
216
+ @output_dir.mkpath
218
217
 
219
218
  return unless @store
220
219
 
221
220
  @classes = @store.all_classes_and_modules.sort
222
- @modsort = get_sorted_module_list @classes
223
221
  end
224
222
 
225
223
  ##
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rdoc
4
4
  module Markdown
5
- VERSION = "0.2"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -1,24 +1,23 @@
1
1
  # <% if klass.type == 'class' %><%= klass.type.capitalize %>: **<%= klass.full_name %>**<% if klass.superclass %> < <% end %><% unless String === klass.superclass %><%= klass.superclass&.name %> <% else %> <%= klass.superclass %> <% end %> <% else %> <%= klass.type.capitalize %>: <%= klass&.name %> <% end %>
2
- <% if klass.description && !klass.description.empty? %><%= h klass.description %><% end %>
2
+ <%= h klass.description %>
3
3
  <% unless klass.constants.empty? %>
4
- ## Constants
5
- ***
6
- <% klass.constants.sort_by { |x| x.name }.each do |const| %> **<%= const.name %>** [[⚓]](#const-<%= ActiveSupport::Inflector.parameterize const.name%>)
7
- <%= h const.description %>
4
+ | Constants | Description |
5
+ | ------------- | ------------- |
6
+ <% klass.constants.sort_by { |x| x.name }.each do |const| %> |**[<%= const.name %>](#<%= ActiveSupport::Inflector.parameterize const.name%>)** | <%= h const.description %> |
8
7
  <% end %><% end %>
9
8
  <% unless klass.attributes.empty? %>
10
9
  ## Attributes
11
10
  <% klass.attributes.sort_by { |x| x.name }.each do |attr| %>
12
- **[<%= attr.rw %>]** <%= attr.name %> [[⚓]](#attr-<%= ActiveSupport::Inflector.parameterize attr.name %>)
11
+ [[**<%= attr.rw %>**] <%= attr.name %>](#<%= attr.aref %>)
13
12
  <% end %><% end %>
14
13
  <% unless klass_methods.empty? %>
15
14
  ## Public Class Methods
16
15
  ***
17
- <% klass_methods.each do |method| %>### <%= method.name %><%= method.params %> [[⚓]](#meth-<%= ActiveSupport::Inflector.parameterize method.name %>)
16
+ <% klass_methods.each do |method| %>### [<%= method.name %><%= method.params %>](#<%= method.aref %>)
18
17
 
19
18
  <%= h method.description %><% end %><% end %>
20
19
  <% unless instance_methods.empty? %>
21
20
  ## Public Instance Methods
22
- <% instance_methods.each do |method| %>### <%= method.name %><%= method.params %> [[⚓]](#meth-<%= ActiveSupport::Inflector.parameterize method.name %>)
21
+ <% instance_methods.each do |method| %>### [<%= method.name %><%= method.params %>](#<%= method.aref %>)
23
22
 
24
23
  <%= h method.description %><% end %><% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
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: 2022-10-22 00:00:00.000000000 Z
11
+ date: 2022-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -164,8 +164,8 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2.0'
167
- description: rdoc generator that produces markdown files and sqlite database with
168
- index of all file
167
+ description: RDoc plugin to generate markdown documentation and search index as sqlite
168
+ database for entire content.
169
169
  email:
170
170
  - github@skatkov.com
171
171
  executables: []
@@ -216,5 +216,5 @@ requirements: []
216
216
  rubygems_version: 3.1.6
217
217
  signing_key:
218
218
  specification_version: 4
219
- summary: rdoc generator that produces markdown files
219
+ summary: RDoc plugin to generate markdown documentation
220
220
  test_files: []