tocer 14.4.0 → 15.0.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 +6 -4
- data/lib/tocer/rake/{tasks.rb → register.rb} +7 -7
- data/lib/tocer/transformers/link.rb +1 -1
- data/lib/tocer/transformers/text.rb +1 -1
- data/tocer.gemspec +7 -7
- data.tar.gz.sig +0 -0
- metadata +15 -16
- metadata.gz.sig +0 -0
- data/lib/tocer/rake/setup.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14b2b29b848b0f22b8f5c6302c8a34a6ac6f34874aa5ae5f66a024194e5d1c6e
|
4
|
+
data.tar.gz: bed04a46a72eed28fbb0da85b6a8575c10cfe19bc898e9aa88dd0062b0c66c20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b7e55cf821c5226a056050c4e206c552398bccb0c4952d4e5d52b92fdafbb0747b28041b12d3f77076878b042951011a46b5a23c071ca4a2563f4ca68f2e8f
|
7
|
+
data.tar.gz: 74bf6ae370f4bd1592a5afbaba3c611d603d40971ee15a386b5533ecf420ab5246759df5cb752fa37db785766bd2f6c34c6fa618d192358175c82b46259e2ba3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -123,19 +123,21 @@ You can add Rake support by adding the following to your `Rakefile`:
|
|
123
123
|
[source,ruby]
|
124
124
|
----
|
125
125
|
begin
|
126
|
-
require "tocer/rake/
|
126
|
+
require "tocer/rake/register"
|
127
127
|
rescue LoadError => error
|
128
128
|
puts error.message
|
129
129
|
end
|
130
|
+
|
131
|
+
Tocer::Rake::Register.call
|
130
132
|
----
|
131
133
|
|
132
|
-
Once
|
134
|
+
Once required and registered, the following tasks will be available (i.e. `bundle exec rake -T`):
|
133
135
|
|
134
136
|
....
|
135
|
-
rake toc[label,includes] #
|
137
|
+
rake toc[label,includes] # Insert/Update Table of Contents
|
136
138
|
....
|
137
139
|
|
138
|
-
|
140
|
+
You can invoke the task as follows (quotes are only necessary if spaces are used):
|
139
141
|
|
140
142
|
[source,bash]
|
141
143
|
----
|
@@ -1,27 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rake"
|
4
|
-
require "tocer"
|
5
4
|
require "refinements/structs"
|
5
|
+
require "tocer"
|
6
6
|
|
7
7
|
module Tocer
|
8
8
|
module Rake
|
9
|
-
#
|
10
|
-
class
|
9
|
+
# Registers Rake tasks for use.
|
10
|
+
class Register
|
11
11
|
include ::Rake::DSL
|
12
12
|
using Refinements::Structs
|
13
13
|
|
14
|
-
def self.
|
14
|
+
def self.call = new.call
|
15
15
|
|
16
16
|
def initialize configuration = Container[:configuration], runner: Runner.new
|
17
17
|
@configuration = configuration
|
18
18
|
@runner = runner
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
22
|
-
desc "
|
21
|
+
def call
|
22
|
+
desc "Insert/Update Table of Contents"
|
23
23
|
task :toc, %i[label includes] do |_task, arguments|
|
24
|
-
runner.call configuration.merge(
|
24
|
+
runner.call configuration.merge(arguments.to_h)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -14,7 +14,7 @@ module Tocer
|
|
14
14
|
|
15
15
|
def label = parser.content.gsub(embedded_link, embedded_link_label)
|
16
16
|
|
17
|
-
def url = label.downcase.gsub(/\s/, "-").gsub(/[^\w
|
17
|
+
def url = label.downcase.gsub(/\s/, "-").gsub(/[^\w-]+/, "")
|
18
18
|
|
19
19
|
def call(url_suffix: "") = "#{indented_bullet}[#{label}](##{computed_url url_suffix})"
|
20
20
|
|
@@ -14,7 +14,7 @@ module Tocer
|
|
14
14
|
|
15
15
|
def label = parser.content
|
16
16
|
|
17
|
-
def url = label.downcase.gsub(/\s/, "-").gsub(/[^\w
|
17
|
+
def url = label.downcase.gsub(/\s/, "-").gsub(/[^\w-]+/, "")
|
18
18
|
|
19
19
|
def call(url_suffix: "") = "#{indented_bullet}[#{label}](##{computed_url url_suffix})"
|
20
20
|
|
data/tocer.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "tocer"
|
5
|
-
spec.version = "
|
5
|
+
spec.version = "15.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/tocer"
|
@@ -22,13 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version = "~> 3.
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
25
|
+
spec.required_ruby_version = "~> 3.2"
|
26
|
+
spec.add_dependency "cogger", "~> 0.5"
|
27
27
|
spec.add_dependency "dry-container", "~> 0.11"
|
28
|
-
spec.add_dependency "infusible", "~>
|
29
|
-
spec.add_dependency "refinements", "~>
|
30
|
-
spec.add_dependency "runcom", "~>
|
31
|
-
spec.add_dependency "spek", "~> 0
|
28
|
+
spec.add_dependency "infusible", "~> 1.0"
|
29
|
+
spec.add_dependency "refinements", "~> 10.0"
|
30
|
+
spec.add_dependency "runcom", "~> 9.0"
|
31
|
+
spec.add_dependency "spek", "~> 1.0"
|
32
32
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
33
33
|
|
34
34
|
spec.bindir = "exe"
|
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:
|
4
|
+
version: 15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2022-
|
31
|
+
date: 2022-12-26 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
39
|
+
version: '0.5'
|
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: '0.
|
46
|
+
version: '0.5'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: dry-container
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,56 +64,56 @@ dependencies:
|
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '1.0'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '1.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: refinements
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '10.0'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '10.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: runcom
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '9.0'
|
96
96
|
type: :runtime
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '9.0'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: spek
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0
|
109
|
+
version: '1.0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0
|
116
|
+
version: '1.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: zeitwerk
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,8 +158,7 @@ files:
|
|
158
158
|
- lib/tocer/elements/comment_block.rb
|
159
159
|
- lib/tocer/import.rb
|
160
160
|
- lib/tocer/parsers/header.rb
|
161
|
-
- lib/tocer/rake/
|
162
|
-
- lib/tocer/rake/tasks.rb
|
161
|
+
- lib/tocer/rake/register.rb
|
163
162
|
- lib/tocer/runner.rb
|
164
163
|
- lib/tocer/transformers/finder.rb
|
165
164
|
- lib/tocer/transformers/link.rb
|
@@ -185,14 +184,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
185
184
|
requirements:
|
186
185
|
- - "~>"
|
187
186
|
- !ruby/object:Gem::Version
|
188
|
-
version: '3.
|
187
|
+
version: '3.2'
|
189
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
189
|
requirements:
|
191
190
|
- - ">="
|
192
191
|
- !ruby/object:Gem::Version
|
193
192
|
version: '0'
|
194
193
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
194
|
+
rubygems_version: 3.4.1
|
196
195
|
signing_key:
|
197
196
|
specification_version: 4
|
198
197
|
summary: A command line interface for generating table of contents for Markdown files.
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/tocer/rake/setup.rb
DELETED