tocer 9.1.2 → 10.2.0
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/{LICENSE.md → LICENSE.adoc} +29 -30
- data/README.adoc +211 -0
- data/bin/tocer +1 -1
- data/lib/tocer/cli.rb +3 -3
- data/lib/tocer/configuration.rb +1 -1
- data/lib/tocer/elements/comment_block.rb +1 -1
- data/lib/tocer/identity.rb +4 -15
- metadata +51 -106
- metadata.gz.sig +0 -0
- data/README.md +0 -189
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7c8a7b02955ef0ddc8fb3d442cfc3619b17de8e4bbac7e3f2527ca9bb2408a9f
|
|
4
|
+
data.tar.gz: c16d0b17493e764753bd75c60e9b49e5b0e38eddbcc3850a698c635acd8ccf86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e424cb2110bcba92727364afe79fbf985b5bc82d3d2b4dd8f92516d5e552d4718e35f97276a57ff54b28bfcc7205e67ca3ecbb6a401f45c7fab9c15bcdea706f
|
|
7
|
+
data.tar.gz: 34375634ea14212202501c9e854337e1a618009aebe03f7220f3131cd227caae8d77bb0c1d0a98a630a3a189044a82df7c663c1e546ba5d9cb923d9302f8b7b9
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/{LICENSE.md → LICENSE.adoc}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
= Apache License
|
|
2
2
|
|
|
3
3
|
Version 2.0, January 2004
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ http://www.apache.org/licenses
|
|
|
6
6
|
|
|
7
7
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
== 1. Definitions
|
|
10
10
|
|
|
11
11
|
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
|
|
12
12
|
Sections 1 through 9 of this document.
|
|
@@ -54,14 +54,14 @@ Contribution."
|
|
|
54
54
|
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
|
|
55
55
|
Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
== 2. Grant of Copyright License
|
|
58
58
|
|
|
59
59
|
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
|
60
60
|
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
61
61
|
reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
|
|
62
62
|
distribute the Work and such Derivative Works in Source or Object form.
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
== 3. Grant of Patent License
|
|
65
65
|
|
|
66
66
|
Subject to the terms and conditions of this License, each Contributor hereby grants to You a
|
|
67
67
|
perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
|
|
@@ -74,39 +74,38 @@ a Contribution incorporated within the Work constitutes direct or contributory p
|
|
|
74
74
|
then any patent licenses granted to You under this License for that Work shall terminate as of the
|
|
75
75
|
date such litigation is filed.
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
== 4. Redistribution
|
|
78
78
|
|
|
79
79
|
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
|
|
80
80
|
or without modifications, and in Source or Object form, provided that You meet the following
|
|
81
81
|
conditions:
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
. You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
. You must cause any modified files to carry prominent notices stating that You changed the files;
|
|
86
|
+
and
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
|
|
89
|
+
patent, trademark, and attribution notices from the Source form of the Work, excluding those
|
|
90
|
+
notices that do not pertain to any part of the Derivative Works; and
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
construed as modifying the License.
|
|
92
|
+
. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
|
|
93
|
+
that You distribute must include a readable copy of the attribution notices contained within such
|
|
94
|
+
NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
|
|
95
|
+
at least one of the following places: within a NOTICE text file distributed as part of the
|
|
96
|
+
Derivative Works; within the Source form or documentation, if provided along with the Derivative
|
|
97
|
+
Works; or, within a display generated by the Derivative Works, if and wherever such third-party
|
|
98
|
+
notices normally appear. The contents of the NOTICE file are for informational purposes only and
|
|
99
|
+
do not modify the License. You may add Your own attribution notices within Derivative Works that
|
|
100
|
+
You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
|
|
101
|
+
additional attribution notices cannot be construed as modifying the License.
|
|
103
102
|
|
|
104
103
|
You may add Your own copyright statement to Your modifications and may provide additional or
|
|
105
104
|
different license terms and conditions for use, reproduction, or distribution of Your modifications,
|
|
106
105
|
or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
|
|
107
106
|
the Work otherwise complies with the conditions stated in this License.
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
== 5. Submission of Contributions
|
|
110
109
|
|
|
111
110
|
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
|
|
112
111
|
Work by You to the Licensor shall be under the terms and conditions of this License, without any
|
|
@@ -114,13 +113,13 @@ additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
|
114
113
|
the terms of any separate license agreement you may have executed with Licensor regarding such
|
|
115
114
|
Contributions.
|
|
116
115
|
|
|
117
|
-
|
|
116
|
+
== 6. Trademarks
|
|
118
117
|
|
|
119
118
|
This License does not grant permission to use the trade names, trademarks, service marks, or product
|
|
120
119
|
names of the Licensor, except as required for reasonable and customary use in describing the origin
|
|
121
120
|
of the Work and reproducing the content of the NOTICE file.
|
|
122
121
|
|
|
123
|
-
|
|
122
|
+
== 7. Disclaimer of Warranty
|
|
124
123
|
|
|
125
124
|
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
|
|
126
125
|
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
@@ -129,7 +128,7 @@ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
|
|
|
129
128
|
responsible for determining the appropriateness of using or redistributing the Work and assume any
|
|
130
129
|
risks associated with Your exercise of permissions under this License.
|
|
131
130
|
|
|
132
|
-
|
|
131
|
+
== 8. Limitation of Liability
|
|
133
132
|
|
|
134
133
|
In no event and under no legal theory, whether in tort (including negligence), contract, or
|
|
135
134
|
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
|
|
@@ -139,7 +138,7 @@ License or out of the use or inability to use the Work (including but not limite
|
|
|
139
138
|
loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
|
|
140
139
|
damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
141
140
|
|
|
142
|
-
|
|
141
|
+
== 9. Accepting Warranty or Additional Liability
|
|
143
142
|
|
|
144
143
|
While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
|
|
145
144
|
for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
|
|
@@ -151,11 +150,11 @@ additional liability.
|
|
|
151
150
|
|
|
152
151
|
END OF TERMS AND CONDITIONS
|
|
153
152
|
|
|
154
|
-
Copyright
|
|
153
|
+
Copyright link:https://www.alchemists.io[Alchemists].
|
|
155
154
|
|
|
156
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
|
157
|
-
compliance with the License. You may obtain a
|
|
158
|
-
the License.
|
|
156
|
+
compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
|
|
157
|
+
of the License.
|
|
159
158
|
|
|
160
159
|
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
|
161
160
|
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
data/README.adoc
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
:toc: macro
|
|
2
|
+
:toclevels: 5
|
|
3
|
+
:figure-caption!:
|
|
4
|
+
|
|
5
|
+
= Tocer
|
|
6
|
+
|
|
7
|
+
[link=http://badge.fury.io/rb/tocer]
|
|
8
|
+
image::https://badge.fury.io/rb/tocer.svg[Gem Version]
|
|
9
|
+
[link=https://circleci.com/gh/bkuhlmann/tocer]
|
|
10
|
+
image::https://circleci.com/gh/bkuhlmann/tocer.svg?style=svg[Circle CI Status]
|
|
11
|
+
|
|
12
|
+
Tocer (a.k.a. Table of Contenter) is a command line interface for generating table of contents for
|
|
13
|
+
Markdown files.
|
|
14
|
+
|
|
15
|
+
toc::[]
|
|
16
|
+
|
|
17
|
+
== Features
|
|
18
|
+
|
|
19
|
+
* Supports Markdown ATX-style headers. Example: `# Header`.
|
|
20
|
+
** Does not support header suffixes. Example: `# Header #`.
|
|
21
|
+
** Does not support header prefixes without spaces. Example: `#Header`.
|
|
22
|
+
* Supports table of contents generation for single or multiple files.
|
|
23
|
+
* Supports custom label. Default: `## Table of Contents`.
|
|
24
|
+
* Supports file list filtering. Default: `"README.md"`.
|
|
25
|
+
* Prepends table of contents to Markdown documents that don’t have table of contents.
|
|
26
|
+
* Rebuilds Markdown documents that have existing table of contents.
|
|
27
|
+
|
|
28
|
+
== Requirements
|
|
29
|
+
|
|
30
|
+
. A UNIX-based system.
|
|
31
|
+
. link:https://www.ruby-lang.org[Ruby].
|
|
32
|
+
|
|
33
|
+
== Setup
|
|
34
|
+
|
|
35
|
+
=== Production
|
|
36
|
+
|
|
37
|
+
To install, run:
|
|
38
|
+
|
|
39
|
+
[source,bash]
|
|
40
|
+
----
|
|
41
|
+
gem install tocer
|
|
42
|
+
----
|
|
43
|
+
|
|
44
|
+
=== Development
|
|
45
|
+
|
|
46
|
+
To contribute, run:
|
|
47
|
+
|
|
48
|
+
[source,bash]
|
|
49
|
+
----
|
|
50
|
+
git clone https://github.com/bkuhlmann/tocer.git
|
|
51
|
+
cd tocer
|
|
52
|
+
bin/setup
|
|
53
|
+
----
|
|
54
|
+
|
|
55
|
+
You can also use the IRB console for direct access to all objects:
|
|
56
|
+
|
|
57
|
+
[source,bash]
|
|
58
|
+
----
|
|
59
|
+
bin/console
|
|
60
|
+
----
|
|
61
|
+
|
|
62
|
+
== Usage
|
|
63
|
+
|
|
64
|
+
=== Command Line Interface (CLI)
|
|
65
|
+
|
|
66
|
+
From the command line, type: `+tocer --help+`
|
|
67
|
+
|
|
68
|
+
....
|
|
69
|
+
tocer -c, [--config] # Manage gem configuration.
|
|
70
|
+
tocer -g, [--generate=PATH] # Generate table of contents.
|
|
71
|
+
tocer -h, [--help=COMMAND] # Show this message or get help for a command.
|
|
72
|
+
tocer -v, [--version] # Show gem version.
|
|
73
|
+
....
|
|
74
|
+
|
|
75
|
+
For specific `+--generate+` options, run `+tocer --help --generate+` to see the following:
|
|
76
|
+
|
|
77
|
+
....
|
|
78
|
+
-l, [--label=LABEL] # Label
|
|
79
|
+
# Default: ## Table of Contents
|
|
80
|
+
-i, [--includes=one two three] # File include list
|
|
81
|
+
# Default: ["README.md"]
|
|
82
|
+
....
|
|
83
|
+
|
|
84
|
+
To generate the table of contents at a specific position within your Markdown files, add the
|
|
85
|
+
following lines to your file(s) prior to generation:
|
|
86
|
+
|
|
87
|
+
[source,markdown]
|
|
88
|
+
----
|
|
89
|
+
<!-- Tocer[start] -->
|
|
90
|
+
<!-- Tocer[finish] -->
|
|
91
|
+
----
|
|
92
|
+
|
|
93
|
+
Alternatively, you can run `+tocer -g <directory>+` on files that do not have Tocer support and it
|
|
94
|
+
will prepend the table of contents to your file(s), complete with an auto-generated table of
|
|
95
|
+
contents.
|
|
96
|
+
|
|
97
|
+
In the case that Tocer has already auto-generated a table of contents for a Markdown file, the
|
|
98
|
+
existing table of contents has become stale, or placement of the table of contents has changed you
|
|
99
|
+
can re-run Tocer on that file to auto-update it with new table of contents.
|
|
100
|
+
|
|
101
|
+
=== Customization
|
|
102
|
+
|
|
103
|
+
This gem can be configured via a global configuration: `~/.config/tocer/configuration.yml`.
|
|
104
|
+
|
|
105
|
+
It can also be configured via link:https://www.alchemists.io/projects/xdg[XDG] environment
|
|
106
|
+
variables.
|
|
107
|
+
|
|
108
|
+
The default configuration is as follows:
|
|
109
|
+
|
|
110
|
+
[source,yaml]
|
|
111
|
+
----
|
|
112
|
+
:label: "## Table of Contents"
|
|
113
|
+
:includes:
|
|
114
|
+
- "README.md"
|
|
115
|
+
----
|
|
116
|
+
|
|
117
|
+
Feel free to take this default configuration, modify, and save as your own custom
|
|
118
|
+
`configuration.yml`.
|
|
119
|
+
|
|
120
|
+
The `configuration.yml` file can be configured as follows:
|
|
121
|
+
|
|
122
|
+
* `label`: The header label for the table of contents. Default: `"# Table of Contents"`.
|
|
123
|
+
* `includes`: The list of included files. Default: `"*.md"`.
|
|
124
|
+
|
|
125
|
+
There are multiple ways the include list can be defined. Here are some examples:
|
|
126
|
+
|
|
127
|
+
[source,yaml]
|
|
128
|
+
----
|
|
129
|
+
# Use an empty array to ignore all files (a key with no value would work too).
|
|
130
|
+
:includes: []
|
|
131
|
+
|
|
132
|
+
# Use an array of wildcards for groups of files with similar extensions:
|
|
133
|
+
:includes:
|
|
134
|
+
- "*.md"
|
|
135
|
+
- "*.mkd"
|
|
136
|
+
- "*.markdown"
|
|
137
|
+
|
|
138
|
+
# Use a mix of wild cards and relative names/paths to customized as necessary:
|
|
139
|
+
:includes:
|
|
140
|
+
- "README.md"
|
|
141
|
+
- "docs/*.md"
|
|
142
|
+
- "*.markdown"
|
|
143
|
+
|
|
144
|
+
# Use a recursive glob to traverse and update all sub-directories:
|
|
145
|
+
:includes:
|
|
146
|
+
- "**/*.md"
|
|
147
|
+
----
|
|
148
|
+
|
|
149
|
+
=== Rake
|
|
150
|
+
|
|
151
|
+
You can add Rake support by adding the following to your `Rakefile`:
|
|
152
|
+
|
|
153
|
+
[source,ruby]
|
|
154
|
+
----
|
|
155
|
+
begin
|
|
156
|
+
require "tocer/rake/setup"
|
|
157
|
+
rescue LoadError => error
|
|
158
|
+
puts error.message
|
|
159
|
+
end
|
|
160
|
+
----
|
|
161
|
+
|
|
162
|
+
Once configured, the following tasks will be available (i.e. `bundle exec rake -T`):
|
|
163
|
+
|
|
164
|
+
....
|
|
165
|
+
rake toc[label,includes] # Add/Update Table of Contents (README)
|
|
166
|
+
....
|
|
167
|
+
|
|
168
|
+
…which can be called as follows (quotes are not necessary if spaces are not used):
|
|
169
|
+
|
|
170
|
+
[source,bash]
|
|
171
|
+
----
|
|
172
|
+
rake toc["## Example, *.md"]
|
|
173
|
+
----
|
|
174
|
+
|
|
175
|
+
== Tests
|
|
176
|
+
|
|
177
|
+
To test, run:
|
|
178
|
+
|
|
179
|
+
[source,bash]
|
|
180
|
+
----
|
|
181
|
+
bundle exec rake
|
|
182
|
+
----
|
|
183
|
+
|
|
184
|
+
== Versioning
|
|
185
|
+
|
|
186
|
+
Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
|
|
187
|
+
|
|
188
|
+
* Major (X.y.z) - Incremented for any backwards incompatible public API changes.
|
|
189
|
+
* Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
|
190
|
+
* Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
|
191
|
+
|
|
192
|
+
== Code of Conduct
|
|
193
|
+
|
|
194
|
+
Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
|
|
195
|
+
participating in this project you agree to abide by its terms.
|
|
196
|
+
|
|
197
|
+
== Contributions
|
|
198
|
+
|
|
199
|
+
Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
|
|
200
|
+
|
|
201
|
+
== License
|
|
202
|
+
|
|
203
|
+
Read link:LICENSE.adoc[LICENSE] for details.
|
|
204
|
+
|
|
205
|
+
== History
|
|
206
|
+
|
|
207
|
+
Read link:CHANGES.adoc[CHANGES] for details.
|
|
208
|
+
|
|
209
|
+
== Credits
|
|
210
|
+
|
|
211
|
+
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
data/bin/tocer
CHANGED
data/lib/tocer/cli.rb
CHANGED
|
@@ -9,7 +9,7 @@ module Tocer
|
|
|
9
9
|
class CLI < Thor
|
|
10
10
|
include Thor::Actions
|
|
11
11
|
|
|
12
|
-
package_name Identity
|
|
12
|
+
package_name Identity::VERSION_LABEL
|
|
13
13
|
|
|
14
14
|
def initialize args = [], options = {}, config = {}
|
|
15
15
|
super args, options, config
|
|
@@ -57,7 +57,7 @@ module Tocer
|
|
|
57
57
|
type: :boolean,
|
|
58
58
|
default: false
|
|
59
59
|
def config
|
|
60
|
-
path = configuration.
|
|
60
|
+
path = configuration.current
|
|
61
61
|
|
|
62
62
|
if options.edit? then `#{ENV["EDITOR"]} #{path}`
|
|
63
63
|
elsif options.info?
|
|
@@ -69,7 +69,7 @@ module Tocer
|
|
|
69
69
|
desc "-v, [--version]", "Show gem version."
|
|
70
70
|
map %w[-v --version] => :version
|
|
71
71
|
def version
|
|
72
|
-
say Identity
|
|
72
|
+
say Identity::VERSION_LABEL
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
desc "-h, [--help=COMMAND]", "Show this message or get help for a command."
|
data/lib/tocer/configuration.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Tocer
|
|
|
5
5
|
# Represents a table of contents start and finish comment block.
|
|
6
6
|
class CommentBlock
|
|
7
7
|
def self.index lines, id
|
|
8
|
-
(lines.index { |line| line =~
|
|
8
|
+
(lines.index { |line| line =~ /<!--.*#{Regexp.escape id}.*-->/ }).to_i
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def initialize start_id: "Tocer[start]",
|
data/lib/tocer/identity.rb
CHANGED
|
@@ -3,20 +3,9 @@
|
|
|
3
3
|
module Tocer
|
|
4
4
|
# Gem identity information.
|
|
5
5
|
module Identity
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
def self.label
|
|
11
|
-
"Tocer"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def self.version
|
|
15
|
-
"9.1.2"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def self.version_label
|
|
19
|
-
"#{label} #{version}"
|
|
20
|
-
end
|
|
6
|
+
NAME = "tocer"
|
|
7
|
+
LABEL = "Tocer"
|
|
8
|
+
VERSION = "10.2.0"
|
|
9
|
+
VERSION_LABEL = "#{LABEL} #{VERSION}"
|
|
21
10
|
end
|
|
22
11
|
end
|
metadata
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tocer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 10.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain:
|
|
11
11
|
- |
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
|
13
|
-
MIIC/
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MIIC/jCCAeagAwIBAgIBAzANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
|
|
14
|
+
a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMDAzMTUxNDQ1MzJaFw0yMTAzMTUx
|
|
15
|
+
NDQ1MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
|
|
16
16
|
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
|
|
17
17
|
xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
|
|
18
18
|
brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
|
|
@@ -20,15 +20,15 @@ cert_chain:
|
|
|
20
20
|
D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
|
|
21
21
|
3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
|
|
22
22
|
AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
|
|
23
|
-
2CdikiiE3fJhP/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAIHhAlD3po4sTYqacXaQ
|
|
24
|
+
XI9jIhrfMy//2PgbHWcETtlJPBeNUbbSNBABcllUHKqYsVDlSvSmss034KSWNR8F
|
|
25
|
+
bF1GcloicyvcCC4y6IoW4it0COAcdeaaxkxiBSgKdQFpff9REnDlIKK4uQ9lLxIo
|
|
26
|
+
Y2G5xubiziKZkyfWFuSr67PIjW3Bu673D1JVBArhA1qbgQmYQcy1CkGOjo+iO8Nf
|
|
27
|
+
7u/QSfBHb+r/bXhKscDgPpnKwbUmvgO2+94zJG9KsrmIydlzYfsD09aXKx0t6Xy4
|
|
28
|
+
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
|
29
|
+
QWc=
|
|
30
30
|
-----END CERTIFICATE-----
|
|
31
|
-
date:
|
|
31
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
|
32
32
|
dependencies:
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: refinements
|
|
@@ -36,28 +36,28 @@ dependencies:
|
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '7.4'
|
|
40
40
|
type: :runtime
|
|
41
41
|
prerelease: false
|
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
|
44
44
|
- - "~>"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
46
|
+
version: '7.4'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: runcom
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: '
|
|
53
|
+
version: '6.0'
|
|
54
54
|
type: :runtime
|
|
55
55
|
prerelease: false
|
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '
|
|
60
|
+
version: '6.0'
|
|
61
61
|
- !ruby/object:Gem::Dependency
|
|
62
62
|
name: thor
|
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -72,34 +72,6 @@ dependencies:
|
|
|
72
72
|
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
74
|
version: '0.20'
|
|
75
|
-
- !ruby/object:Gem::Dependency
|
|
76
|
-
name: awesome_print
|
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - "~>"
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '1.8'
|
|
82
|
-
type: :development
|
|
83
|
-
prerelease: false
|
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
85
|
-
requirements:
|
|
86
|
-
- - "~>"
|
|
87
|
-
- !ruby/object:Gem::Version
|
|
88
|
-
version: '1.8'
|
|
89
|
-
- !ruby/object:Gem::Dependency
|
|
90
|
-
name: bond
|
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
|
92
|
-
requirements:
|
|
93
|
-
- - "~>"
|
|
94
|
-
- !ruby/object:Gem::Version
|
|
95
|
-
version: '0.5'
|
|
96
|
-
type: :development
|
|
97
|
-
prerelease: false
|
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
99
|
-
requirements:
|
|
100
|
-
- - "~>"
|
|
101
|
-
- !ruby/object:Gem::Version
|
|
102
|
-
version: '0.5'
|
|
103
75
|
- !ruby/object:Gem::Dependency
|
|
104
76
|
name: bundler-audit
|
|
105
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -134,28 +106,28 @@ dependencies:
|
|
|
134
106
|
requirements:
|
|
135
107
|
- - "~>"
|
|
136
108
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: '
|
|
109
|
+
version: '14.2'
|
|
138
110
|
type: :development
|
|
139
111
|
prerelease: false
|
|
140
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
141
113
|
requirements:
|
|
142
114
|
- - "~>"
|
|
143
115
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: '
|
|
116
|
+
version: '14.2'
|
|
145
117
|
- !ruby/object:Gem::Dependency
|
|
146
|
-
name: git-
|
|
118
|
+
name: git-lint
|
|
147
119
|
requirement: !ruby/object:Gem::Requirement
|
|
148
120
|
requirements:
|
|
149
121
|
- - "~>"
|
|
150
122
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: '
|
|
123
|
+
version: '1.0'
|
|
152
124
|
type: :development
|
|
153
125
|
prerelease: false
|
|
154
126
|
version_requirements: !ruby/object:Gem::Requirement
|
|
155
127
|
requirements:
|
|
156
128
|
- - "~>"
|
|
157
129
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '
|
|
130
|
+
version: '1.0'
|
|
159
131
|
- !ruby/object:Gem::Dependency
|
|
160
132
|
name: guard-rspec
|
|
161
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -170,48 +142,34 @@ dependencies:
|
|
|
170
142
|
- - "~>"
|
|
171
143
|
- !ruby/object:Gem::Version
|
|
172
144
|
version: '4.7'
|
|
173
|
-
- !ruby/object:Gem::Dependency
|
|
174
|
-
name: hirb
|
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
|
176
|
-
requirements:
|
|
177
|
-
- - "~>"
|
|
178
|
-
- !ruby/object:Gem::Version
|
|
179
|
-
version: '0.7'
|
|
180
|
-
type: :development
|
|
181
|
-
prerelease: false
|
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
183
|
-
requirements:
|
|
184
|
-
- - "~>"
|
|
185
|
-
- !ruby/object:Gem::Version
|
|
186
|
-
version: '0.7'
|
|
187
145
|
- !ruby/object:Gem::Dependency
|
|
188
146
|
name: pry
|
|
189
147
|
requirement: !ruby/object:Gem::Requirement
|
|
190
148
|
requirements:
|
|
191
149
|
- - "~>"
|
|
192
150
|
- !ruby/object:Gem::Version
|
|
193
|
-
version: '0.
|
|
151
|
+
version: '0.13'
|
|
194
152
|
type: :development
|
|
195
153
|
prerelease: false
|
|
196
154
|
version_requirements: !ruby/object:Gem::Requirement
|
|
197
155
|
requirements:
|
|
198
156
|
- - "~>"
|
|
199
157
|
- !ruby/object:Gem::Version
|
|
200
|
-
version: '0.
|
|
158
|
+
version: '0.13'
|
|
201
159
|
- !ruby/object:Gem::Dependency
|
|
202
160
|
name: pry-byebug
|
|
203
161
|
requirement: !ruby/object:Gem::Requirement
|
|
204
162
|
requirements:
|
|
205
163
|
- - "~>"
|
|
206
164
|
- !ruby/object:Gem::Version
|
|
207
|
-
version: '3.
|
|
165
|
+
version: '3.9'
|
|
208
166
|
type: :development
|
|
209
167
|
prerelease: false
|
|
210
168
|
version_requirements: !ruby/object:Gem::Requirement
|
|
211
169
|
requirements:
|
|
212
170
|
- - "~>"
|
|
213
171
|
- !ruby/object:Gem::Version
|
|
214
|
-
version: '3.
|
|
172
|
+
version: '3.9'
|
|
215
173
|
- !ruby/object:Gem::Dependency
|
|
216
174
|
name: rake
|
|
217
175
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -232,14 +190,14 @@ dependencies:
|
|
|
232
190
|
requirements:
|
|
233
191
|
- - "~>"
|
|
234
192
|
- !ruby/object:Gem::Version
|
|
235
|
-
version: '
|
|
193
|
+
version: '6.0'
|
|
236
194
|
type: :development
|
|
237
195
|
prerelease: false
|
|
238
196
|
version_requirements: !ruby/object:Gem::Requirement
|
|
239
197
|
requirements:
|
|
240
198
|
- - "~>"
|
|
241
199
|
- !ruby/object:Gem::Version
|
|
242
|
-
version: '
|
|
200
|
+
version: '6.0'
|
|
243
201
|
- !ruby/object:Gem::Dependency
|
|
244
202
|
name: rspec
|
|
245
203
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -260,96 +218,82 @@ dependencies:
|
|
|
260
218
|
requirements:
|
|
261
219
|
- - "~>"
|
|
262
220
|
- !ruby/object:Gem::Version
|
|
263
|
-
version: '0.
|
|
221
|
+
version: '0.83'
|
|
264
222
|
type: :development
|
|
265
223
|
prerelease: false
|
|
266
224
|
version_requirements: !ruby/object:Gem::Requirement
|
|
267
225
|
requirements:
|
|
268
226
|
- - "~>"
|
|
269
227
|
- !ruby/object:Gem::Version
|
|
270
|
-
version: '0.
|
|
228
|
+
version: '0.83'
|
|
271
229
|
- !ruby/object:Gem::Dependency
|
|
272
230
|
name: rubocop-performance
|
|
273
231
|
requirement: !ruby/object:Gem::Requirement
|
|
274
232
|
requirements:
|
|
275
233
|
- - "~>"
|
|
276
234
|
- !ruby/object:Gem::Version
|
|
277
|
-
version: '1.
|
|
235
|
+
version: '1.5'
|
|
278
236
|
type: :development
|
|
279
237
|
prerelease: false
|
|
280
238
|
version_requirements: !ruby/object:Gem::Requirement
|
|
281
239
|
requirements:
|
|
282
240
|
- - "~>"
|
|
283
241
|
- !ruby/object:Gem::Version
|
|
284
|
-
version: '1.
|
|
242
|
+
version: '1.5'
|
|
285
243
|
- !ruby/object:Gem::Dependency
|
|
286
244
|
name: rubocop-rake
|
|
287
245
|
requirement: !ruby/object:Gem::Requirement
|
|
288
246
|
requirements:
|
|
289
247
|
- - "~>"
|
|
290
248
|
- !ruby/object:Gem::Version
|
|
291
|
-
version: '0.
|
|
249
|
+
version: '0.5'
|
|
292
250
|
type: :development
|
|
293
251
|
prerelease: false
|
|
294
252
|
version_requirements: !ruby/object:Gem::Requirement
|
|
295
253
|
requirements:
|
|
296
254
|
- - "~>"
|
|
297
255
|
- !ruby/object:Gem::Version
|
|
298
|
-
version: '0.
|
|
256
|
+
version: '0.5'
|
|
299
257
|
- !ruby/object:Gem::Dependency
|
|
300
258
|
name: rubocop-rspec
|
|
301
259
|
requirement: !ruby/object:Gem::Requirement
|
|
302
260
|
requirements:
|
|
303
261
|
- - "~>"
|
|
304
262
|
- !ruby/object:Gem::Version
|
|
305
|
-
version: '1.
|
|
263
|
+
version: '1.39'
|
|
306
264
|
type: :development
|
|
307
265
|
prerelease: false
|
|
308
266
|
version_requirements: !ruby/object:Gem::Requirement
|
|
309
267
|
requirements:
|
|
310
268
|
- - "~>"
|
|
311
269
|
- !ruby/object:Gem::Version
|
|
312
|
-
version: '1.
|
|
270
|
+
version: '1.39'
|
|
313
271
|
- !ruby/object:Gem::Dependency
|
|
314
272
|
name: simplecov
|
|
315
273
|
requirement: !ruby/object:Gem::Requirement
|
|
316
274
|
requirements:
|
|
317
275
|
- - "~>"
|
|
318
276
|
- !ruby/object:Gem::Version
|
|
319
|
-
version: '0.
|
|
277
|
+
version: '0.18'
|
|
320
278
|
type: :development
|
|
321
279
|
prerelease: false
|
|
322
280
|
version_requirements: !ruby/object:Gem::Requirement
|
|
323
281
|
requirements:
|
|
324
282
|
- - "~>"
|
|
325
283
|
- !ruby/object:Gem::Version
|
|
326
|
-
version: '0.
|
|
327
|
-
|
|
328
|
-
name: wirb
|
|
329
|
-
requirement: !ruby/object:Gem::Requirement
|
|
330
|
-
requirements:
|
|
331
|
-
- - "~>"
|
|
332
|
-
- !ruby/object:Gem::Version
|
|
333
|
-
version: '2.1'
|
|
334
|
-
type: :development
|
|
335
|
-
prerelease: false
|
|
336
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
337
|
-
requirements:
|
|
338
|
-
- - "~>"
|
|
339
|
-
- !ruby/object:Gem::Version
|
|
340
|
-
version: '2.1'
|
|
341
|
-
description:
|
|
284
|
+
version: '0.18'
|
|
285
|
+
description:
|
|
342
286
|
email:
|
|
343
287
|
- brooke@alchemists.io
|
|
344
288
|
executables:
|
|
345
289
|
- tocer
|
|
346
290
|
extensions: []
|
|
347
291
|
extra_rdoc_files:
|
|
348
|
-
- README.
|
|
349
|
-
- LICENSE.
|
|
292
|
+
- README.adoc
|
|
293
|
+
- LICENSE.adoc
|
|
350
294
|
files:
|
|
351
|
-
- LICENSE.
|
|
352
|
-
- README.
|
|
295
|
+
- LICENSE.adoc
|
|
296
|
+
- README.adoc
|
|
353
297
|
- bin/tocer
|
|
354
298
|
- lib/tocer.rb
|
|
355
299
|
- lib/tocer/builder.rb
|
|
@@ -365,14 +309,15 @@ files:
|
|
|
365
309
|
- lib/tocer/transformers/link.rb
|
|
366
310
|
- lib/tocer/transformers/text.rb
|
|
367
311
|
- lib/tocer/writer.rb
|
|
368
|
-
homepage: https://
|
|
312
|
+
homepage: https://www.alchemists.io/projects/tocer
|
|
369
313
|
licenses:
|
|
370
314
|
- Apache-2.0
|
|
371
315
|
metadata:
|
|
372
|
-
source_code_uri: https://github.com/bkuhlmann/tocer
|
|
373
|
-
changelog_uri: https://github.com/bkuhlmann/tocer/blob/master/CHANGES.md
|
|
374
316
|
bug_tracker_uri: https://github.com/bkuhlmann/tocer/issues
|
|
375
|
-
|
|
317
|
+
changelog_uri: https://www.alchemists.io/projects/tocer/changes.html
|
|
318
|
+
documentation_uri: https://www.alchemists.io/projects/tocer
|
|
319
|
+
source_code_uri: https://github.com/bkuhlmann/tocer
|
|
320
|
+
post_install_message:
|
|
376
321
|
rdoc_options: []
|
|
377
322
|
require_paths:
|
|
378
323
|
- lib
|
|
@@ -380,15 +325,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
380
325
|
requirements:
|
|
381
326
|
- - "~>"
|
|
382
327
|
- !ruby/object:Gem::Version
|
|
383
|
-
version: '2.
|
|
328
|
+
version: '2.7'
|
|
384
329
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
385
330
|
requirements:
|
|
386
331
|
- - ">="
|
|
387
332
|
- !ruby/object:Gem::Version
|
|
388
333
|
version: '0'
|
|
389
334
|
requirements: []
|
|
390
|
-
rubygems_version: 3.
|
|
391
|
-
signing_key:
|
|
335
|
+
rubygems_version: 3.1.4
|
|
336
|
+
signing_key:
|
|
392
337
|
specification_version: 4
|
|
393
338
|
summary: A command line interface for generating table of contents for Markdown files.
|
|
394
339
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|
data/README.md
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="tocer.png" alt="Tocer Icon"/>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# Tocer
|
|
6
|
-
|
|
7
|
-
[](http://badge.fury.io/rb/tocer)
|
|
8
|
-
[](https://codeclimate.com/github/bkuhlmann/tocer/maintainability)
|
|
9
|
-
[](https://codeclimate.com/github/bkuhlmann/tocer/test_coverage)
|
|
10
|
-
[](https://circleci.com/gh/bkuhlmann/tocer)
|
|
11
|
-
|
|
12
|
-
Tocer (a.k.a. Table of Contenter) is a command line interface for generating table of contents for
|
|
13
|
-
Markdown files.
|
|
14
|
-
|
|
15
|
-
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
|
16
|
-
|
|
17
|
-
## Table of Contents
|
|
18
|
-
|
|
19
|
-
- [Features](#features)
|
|
20
|
-
- [Requirements](#requirements)
|
|
21
|
-
- [Setup](#setup)
|
|
22
|
-
- [Usage](#usage)
|
|
23
|
-
- [Command Line Interface (CLI)](#command-line-interface-cli)
|
|
24
|
-
- [Customization](#customization)
|
|
25
|
-
- [Rake](#rake)
|
|
26
|
-
- [Tests](#tests)
|
|
27
|
-
- [Versioning](#versioning)
|
|
28
|
-
- [Code of Conduct](#code-of-conduct)
|
|
29
|
-
- [Contributions](#contributions)
|
|
30
|
-
- [License](#license)
|
|
31
|
-
- [History](#history)
|
|
32
|
-
- [Credits](#credits)
|
|
33
|
-
|
|
34
|
-
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
|
35
|
-
|
|
36
|
-
## Features
|
|
37
|
-
|
|
38
|
-
- Supports Markdown ATX-style headers. Example: `# Header`.
|
|
39
|
-
- Does not support header suffixes. Example: `# Header #`.
|
|
40
|
-
- Does not support header prefixes without spaces. Example: `#Header`.
|
|
41
|
-
- Supports table of contents generation for single or multiple files.
|
|
42
|
-
- Supports custom label. Default: "## Table of Contents".
|
|
43
|
-
- Supports file list filtering. Default: "README.md".
|
|
44
|
-
- Prepends table of contents to Markdown documents that don't have table of contents.
|
|
45
|
-
- Rebuilds Markdown documents that have existing table of contents.
|
|
46
|
-
|
|
47
|
-
## Requirements
|
|
48
|
-
|
|
49
|
-
1. A UNIX-based system.
|
|
50
|
-
1. [Ruby 2.6.x](https://www.ruby-lang.org).
|
|
51
|
-
|
|
52
|
-
## Setup
|
|
53
|
-
|
|
54
|
-
Type the following to install:
|
|
55
|
-
|
|
56
|
-
gem install tocer
|
|
57
|
-
|
|
58
|
-
## Usage
|
|
59
|
-
|
|
60
|
-
### Command Line Interface (CLI)
|
|
61
|
-
|
|
62
|
-
From the command line, type: `tocer --help`
|
|
63
|
-
|
|
64
|
-
tocer -c, [--config] # Manage gem configuration.
|
|
65
|
-
tocer -g, [--generate=PATH] # Generate table of contents.
|
|
66
|
-
tocer -h, [--help=COMMAND] # Show this message or get help for a command.
|
|
67
|
-
tocer -v, [--version] # Show gem version.
|
|
68
|
-
|
|
69
|
-
For specific `--generate` options, run `tocer --help --generate` to see the following:
|
|
70
|
-
|
|
71
|
-
-l, [--label=LABEL] # Label
|
|
72
|
-
# Default: ## Table of Contents
|
|
73
|
-
-i, [--includes=one two three] # File include list
|
|
74
|
-
# Default: ["README.md"]
|
|
75
|
-
|
|
76
|
-
To generate the table of contents at a specific position within your Markdown files, add the
|
|
77
|
-
following lines to your file(s) prior to generation:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
<!-- Tocer[start] -->
|
|
81
|
-
<!-- Tocer[finish] -->
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Alternatively, you can run `tocer -g <directory>` on files that do not have Tocer support and it
|
|
85
|
-
will prepend the table of contents to your file(s), complete with an auto-generated table of
|
|
86
|
-
contents.
|
|
87
|
-
|
|
88
|
-
In the case that Tocer has already auto-generated a table of contents for a Markdown file, the
|
|
89
|
-
existing table of contents has become stale, or placement of the table of contents has changed you
|
|
90
|
-
can re-run Tocer on that file to auto-update it with new table of contents.
|
|
91
|
-
|
|
92
|
-
### Customization
|
|
93
|
-
|
|
94
|
-
This gem can be configured via a global configuration:
|
|
95
|
-
|
|
96
|
-
~/.config/tocer/configuration.yml
|
|
97
|
-
|
|
98
|
-
It can also be configured via [XDG](https://github.com/bkuhlmann/xdg) environment variables.
|
|
99
|
-
|
|
100
|
-
The default configuration is as follows:
|
|
101
|
-
|
|
102
|
-
:label: "## Table of Contents"
|
|
103
|
-
:includes:
|
|
104
|
-
- "README.md"
|
|
105
|
-
|
|
106
|
-
Feel free to take this default configuration, modify, and save as your own custom
|
|
107
|
-
`configuration.yml`.
|
|
108
|
-
|
|
109
|
-
The `configuration.yml` file can be configured as follows:
|
|
110
|
-
|
|
111
|
-
- `label`: The header label for the table of contents. Default: "# Table of Contents".
|
|
112
|
-
- `includes`: The list of included files. Default: "\*.md".
|
|
113
|
-
|
|
114
|
-
There are multiple ways the include list can be defined. Here are some examples:
|
|
115
|
-
|
|
116
|
-
# Use an empty array to ignore all files (a key with no value would work too).
|
|
117
|
-
:includes: []
|
|
118
|
-
|
|
119
|
-
# Use an array of wildcards for groups of files with similar extensions:
|
|
120
|
-
:includes:
|
|
121
|
-
- "*.md"
|
|
122
|
-
- "*.mkd"
|
|
123
|
-
- "*.markdown"
|
|
124
|
-
|
|
125
|
-
# Use a mix of wild cards and relative names/paths to customized as necessary:
|
|
126
|
-
:includes:
|
|
127
|
-
- "README.md"
|
|
128
|
-
- "docs/*.md"
|
|
129
|
-
- "*.markdown"
|
|
130
|
-
|
|
131
|
-
# Use a recursive glob to traverse and update all sub-directories:
|
|
132
|
-
:includes:
|
|
133
|
-
- "**/*.md"
|
|
134
|
-
|
|
135
|
-
### Rake
|
|
136
|
-
|
|
137
|
-
You can add Rake support by adding the following to your `Rakefile`:
|
|
138
|
-
|
|
139
|
-
begin
|
|
140
|
-
require "tocer/rake/setup"
|
|
141
|
-
rescue LoadError => error
|
|
142
|
-
puts error.message
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
Once configured, the following tasks will be available (i.e. `bundle exec rake -T`):
|
|
146
|
-
|
|
147
|
-
rake toc[label,includes] # Add/Update Table of Contents (README)
|
|
148
|
-
|
|
149
|
-
...which can be called as follows (quotes are not necessary if spaces are not used):
|
|
150
|
-
|
|
151
|
-
rake toc["## Example, *.md"]
|
|
152
|
-
|
|
153
|
-
## Tests
|
|
154
|
-
|
|
155
|
-
To test, run:
|
|
156
|
-
|
|
157
|
-
bundle exec rake
|
|
158
|
-
|
|
159
|
-
## Versioning
|
|
160
|
-
|
|
161
|
-
Read [Semantic Versioning](https://semver.org) for details. Briefly, it means:
|
|
162
|
-
|
|
163
|
-
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
|
|
164
|
-
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
|
165
|
-
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
|
166
|
-
|
|
167
|
-
## Code of Conduct
|
|
168
|
-
|
|
169
|
-
Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
|
|
170
|
-
participating in this project you agree to abide by its terms.
|
|
171
|
-
|
|
172
|
-
## Contributions
|
|
173
|
-
|
|
174
|
-
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
175
|
-
|
|
176
|
-
## License
|
|
177
|
-
|
|
178
|
-
Copyright 2015 [Alchemists](https://www.alchemists.io).
|
|
179
|
-
Read [LICENSE](LICENSE.md) for details.
|
|
180
|
-
|
|
181
|
-
## History
|
|
182
|
-
|
|
183
|
-
Read [CHANGES](CHANGES.md) for details.
|
|
184
|
-
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
|
|
185
|
-
|
|
186
|
-
## Credits
|
|
187
|
-
|
|
188
|
-
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
|
|
189
|
-
[Alchemists](https://www.alchemists.io).
|