tocer 15.1.1 → 15.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +26 -10
- data/lib/tocer/cli/actions/insert.rb +2 -2
- data/lib/tocer/cli/shell.rb +4 -4
- data/lib/tocer/container.rb +1 -1
- data/tocer.gemspec +5 -5
- data.tar.gz.sig +0 -0
- metadata +32 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 243224018a4fff16b6b0127a6131ef9ac45268a6eb8324b80093ca401901017b
|
4
|
+
data.tar.gz: f6c960e90162dc393b6e79f1aef75d87cf861b7aeda7daedd02a5e0dfc6e2b19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f224aeeca9421ed4b9d0aa9f2a97f172ff10b82051e5aaeb7425bc49259f898aece309080d2996f198907f0dee36b2722738c53d901719df6af6df118d32cec0
|
7
|
+
data.tar.gz: b9beb16da6edd1c70876e3b8477939f0084ca794566a05d4bc64d4727acddf2c7e252b59cb6183dea12f97159cda930fd7de8439a47ad9762fc8648d32b797d2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -28,13 +28,29 @@ toc::[]
|
|
28
28
|
|
29
29
|
== Setup
|
30
30
|
|
31
|
-
To install, run:
|
31
|
+
To install _with_ security, run:
|
32
|
+
|
33
|
+
[source,bash]
|
34
|
+
----
|
35
|
+
# 💡 Skip this line if you already have the public certificate installed.
|
36
|
+
gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
|
37
|
+
gem install tocer --trust-policy HighSecurity
|
38
|
+
----
|
39
|
+
|
40
|
+
To install _without_ security, run:
|
32
41
|
|
33
42
|
[source,bash]
|
34
43
|
----
|
35
44
|
gem install tocer
|
36
45
|
----
|
37
46
|
|
47
|
+
You can also add the gem directly to your project:
|
48
|
+
|
49
|
+
[source,bash]
|
50
|
+
----
|
51
|
+
bundle add tocer
|
52
|
+
----
|
53
|
+
|
38
54
|
== Usage
|
39
55
|
|
40
56
|
=== Command Line Interface (CLI)
|
@@ -70,7 +86,7 @@ re-run Tocer on that file to auto-update it with new table of contents.
|
|
70
86
|
|
71
87
|
This gem can be configured via a global configuration: `~/.config/tocer/configuration.yml`.
|
72
88
|
|
73
|
-
It can also be configured via link:https://
|
89
|
+
It can also be configured via link:https://alchemists.io/projects/xdg[XDG] environment
|
74
90
|
variables.
|
75
91
|
|
76
92
|
The default configuration is as follows:
|
@@ -171,19 +187,19 @@ To test, run:
|
|
171
187
|
bin/rake
|
172
188
|
----
|
173
189
|
|
174
|
-
== link:https://
|
190
|
+
== link:https://alchemists.io/policies/license[License]
|
175
191
|
|
176
|
-
== link:https://
|
192
|
+
== link:https://alchemists.io/policies/security[Security]
|
177
193
|
|
178
|
-
== link:https://
|
194
|
+
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
|
179
195
|
|
180
|
-
== link:https://
|
196
|
+
== link:https://alchemists.io/policies/contributions[Contributions]
|
181
197
|
|
182
|
-
== link:https://
|
198
|
+
== link:https://alchemists.io/projects/tocer/versions[Versions]
|
183
199
|
|
184
|
-
== link:https://
|
200
|
+
== link:https://alchemists.io/community[Community]
|
185
201
|
|
186
202
|
== Credits
|
187
203
|
|
188
|
-
* Built with link:https://
|
189
|
-
* Engineered by link:https://
|
204
|
+
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
|
205
|
+
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
@@ -5,7 +5,7 @@ module Tocer
|
|
5
5
|
module Actions
|
6
6
|
# Handles the insert action.
|
7
7
|
class Insert
|
8
|
-
include Tocer::Import[:
|
8
|
+
include Tocer::Import[:kernel]
|
9
9
|
|
10
10
|
def initialize(runner: Runner.new, **)
|
11
11
|
super(**)
|
@@ -13,7 +13,7 @@ module Tocer
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def call configuration
|
16
|
-
runner.call(configuration) { |path|
|
16
|
+
runner.call(configuration).each { |path| kernel.puts " #{path}" }
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
data/lib/tocer/cli/shell.rb
CHANGED
@@ -6,7 +6,7 @@ module Tocer
|
|
6
6
|
module CLI
|
7
7
|
# The main Command Line Interface (CLI) object.
|
8
8
|
class Shell
|
9
|
-
include Actions::Import[:config, :insert, :
|
9
|
+
include Actions::Import[:config, :insert, :kernel, :logger, :specification]
|
10
10
|
|
11
11
|
def initialize(parser: Parser.new, **)
|
12
12
|
super(**)
|
@@ -16,7 +16,7 @@ module Tocer
|
|
16
16
|
def call arguments = Core::EMPTY_ARRAY
|
17
17
|
act_on parser.call(arguments)
|
18
18
|
rescue OptionParser::ParseError => error
|
19
|
-
|
19
|
+
logger.error { error.message }
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
@@ -27,8 +27,8 @@ module Tocer
|
|
27
27
|
case configuration
|
28
28
|
in action_config: Symbol => action then config.call action
|
29
29
|
in action_insert: true then insert.call configuration
|
30
|
-
in action_version: true then
|
31
|
-
else
|
30
|
+
in action_version: true then kernel.puts specification.labeled_version
|
31
|
+
else kernel.puts parser.to_s
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
data/lib/tocer/container.rb
CHANGED
@@ -12,6 +12,6 @@ module Tocer
|
|
12
12
|
register(:configuration) { Configuration::Loader.call }
|
13
13
|
register(:specification) { Spek::Loader.call "#{__dir__}/../../tocer.gemspec" }
|
14
14
|
register(:kernel) { Kernel }
|
15
|
-
register(:logger) { Cogger
|
15
|
+
register(:logger) { Cogger.new formatter: :emoji }
|
16
16
|
end
|
17
17
|
end
|
data/tocer.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "tocer"
|
5
|
-
spec.version = "15.
|
5
|
+
spec.version = "15.2.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
|
-
spec.homepage = "https://
|
8
|
+
spec.homepage = "https://alchemists.io/projects/tocer"
|
9
9
|
spec.summary = "A command line interface for generating table of contents for Markdown files."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/tocer/issues",
|
14
|
-
"changelog_uri" => "https://
|
15
|
-
"documentation_uri" => "https://
|
14
|
+
"changelog_uri" => "https://alchemists.io/projects/tocer/versions",
|
15
|
+
"documentation_uri" => "https://alchemists.io/projects/tocer",
|
16
16
|
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
17
17
|
"label" => "Tocer",
|
18
18
|
"rubygems_mfa_required" => "true",
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.2"
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
26
|
+
spec.add_dependency "cogger", "~> 0.8"
|
27
27
|
spec.add_dependency "core", "~> 0.1"
|
28
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
29
29
|
spec.add_dependency "infusible", "~> 1.0"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tocer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.
|
4
|
+
version: 15.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,25 +10,32 @@ bindir: exe
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
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TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFAFgmv0tYMZnItuPycSM
|
27
|
+
F5wykJEVMB8GA1UdEQQYMBaBFGJyb29rZUBhbGNoZW1pc3RzLmlvMB8GA1UdEgQY
|
28
|
+
MBaBFGJyb29rZUBhbGNoZW1pc3RzLmlvMA0GCSqGSIb3DQEBCwUAA4IBgQAX+EGY
|
29
|
+
9RLYGxF1VLZz+G1ACQc4uyrCB6kXwI06kzUa5dF9tPXqTX9ffnz3/W8ck2IQhKzu
|
30
|
+
MKO2FVijzbDWTsZeZGglS4E+4Jxpau1lU9HhOIcKolv6LeC6UdALTFudY+GLb8Xw
|
31
|
+
REXgaJkjzzhkUSILmEnRwEbY08dVSl7ZAaxVI679vfI2yapLlIwpbBgmQTiTvPr3
|
32
|
+
qyyLUno9flYEOv9fmGHunSrM+gE0/0niGTXa5GgXBXYGS2he4LQGgSBfGp/cTwMU
|
33
|
+
rDKJRcusZ12lNBeDfgqACz/BBJF8FLodgk6rGMRZz7+ZmjjHEmpG5bQpR6Q2BuWL
|
34
|
+
XMtYk/QzaWuhiR7pWjiF8jbdd7RO6or0ohq7iFkokz/5xrtQ/vPzU2RQ3Qc6YaKw
|
35
|
+
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
|
+
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
30
37
|
-----END CERTIFICATE-----
|
31
|
-
date: 2023-
|
38
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
32
39
|
dependencies:
|
33
40
|
- !ruby/object:Gem::Dependency
|
34
41
|
name: cogger
|
@@ -36,14 +43,14 @@ dependencies:
|
|
36
43
|
requirements:
|
37
44
|
- - "~>"
|
38
45
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
46
|
+
version: '0.8'
|
40
47
|
type: :runtime
|
41
48
|
prerelease: false
|
42
49
|
version_requirements: !ruby/object:Gem::Requirement
|
43
50
|
requirements:
|
44
51
|
- - "~>"
|
45
52
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
53
|
+
version: '0.8'
|
47
54
|
- !ruby/object:Gem::Dependency
|
48
55
|
name: core
|
49
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,13 +186,13 @@ files:
|
|
179
186
|
- lib/tocer/transformers/text.rb
|
180
187
|
- lib/tocer/writer.rb
|
181
188
|
- tocer.gemspec
|
182
|
-
homepage: https://
|
189
|
+
homepage: https://alchemists.io/projects/tocer
|
183
190
|
licenses:
|
184
191
|
- Hippocratic-2.1
|
185
192
|
metadata:
|
186
193
|
bug_tracker_uri: https://github.com/bkuhlmann/tocer/issues
|
187
|
-
changelog_uri: https://
|
188
|
-
documentation_uri: https://
|
194
|
+
changelog_uri: https://alchemists.io/projects/tocer/versions
|
195
|
+
documentation_uri: https://alchemists.io/projects/tocer
|
189
196
|
funding_uri: https://github.com/sponsors/bkuhlmann
|
190
197
|
label: Tocer
|
191
198
|
rubygems_mfa_required: 'true'
|
@@ -205,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
212
|
- !ruby/object:Gem::Version
|
206
213
|
version: '0'
|
207
214
|
requirements: []
|
208
|
-
rubygems_version: 3.4.
|
215
|
+
rubygems_version: 3.4.12
|
209
216
|
signing_key:
|
210
217
|
specification_version: 4
|
211
218
|
summary: A command line interface for generating table of contents for Markdown files.
|
metadata.gz.sig
CHANGED
Binary file
|