tocer 16.2.0 → 17.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/lib/tocer/cli/commands/upsert.rb +1 -1
- data/lib/tocer/rake/register.rb +2 -2
- data/lib/tocer/runner.rb +2 -2
- data/lib/tocer/transformers/link.rb +2 -2
- data/lib/tocer/transformers/text.rb +2 -2
- data/lib/tocer/writer.rb +4 -4
- data/lib/tocer.rb +3 -1
- data/tocer.gemspec +10 -10
- data.tar.gz.sig +0 -0
- metadata +20 -20
- 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: 57bace70c08cf113afbccf5a0a89dcb1ef8ef7ac3e6b3346d72496f7b8a9c807
|
4
|
+
data.tar.gz: 936d4ad6899359e5e9f6dc6dab4f963522677d4860c58d4b715c41e44bb220ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55713b6c1e9e4c71dee8105250395ee8d89813a0210562052925e6f73c6a65c4352f133b4ccd10dd41a402323f0e187a339c9406bac9fe96d84e62b719ea7d42
|
7
|
+
data.tar.gz: '0237081d87e3fea34d005994bae54ea650b78ca190491498b1c4f631ea4d93f44091ccc8657f4e06a2a43540471ceb3f49ab93a8c94611cd35efc6f680386316'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/tocer/rake/register.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rake"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/struct"
|
5
5
|
require "tocer"
|
6
6
|
|
7
7
|
module Tocer
|
@@ -9,7 +9,7 @@ module Tocer
|
|
9
9
|
# Registers Rake tasks for use.
|
10
10
|
class Register
|
11
11
|
include ::Rake::DSL
|
12
|
-
using Refinements::
|
12
|
+
using Refinements::Struct
|
13
13
|
|
14
14
|
def self.call = new.call
|
15
15
|
|
data/lib/tocer/runner.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/pathname"
|
4
4
|
|
5
5
|
module Tocer
|
6
6
|
# Generates/updates Table of Contents for files in root path.
|
7
7
|
class Runner
|
8
8
|
include Import[:kernel]
|
9
9
|
|
10
|
-
using Refinements::
|
10
|
+
using Refinements::Pathname
|
11
11
|
|
12
12
|
def initialize(writer: Writer.new, **)
|
13
13
|
super(**)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "core"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/array"
|
5
5
|
|
6
6
|
module Tocer
|
7
7
|
module Transformers
|
8
8
|
# Transforms a Markdown header (embedded link) into a table of contents link.
|
9
9
|
class Link
|
10
|
-
using Refinements::
|
10
|
+
using Refinements::Array
|
11
11
|
|
12
12
|
def initialize text, parser: Parsers::Header
|
13
13
|
@parser = parser.new text
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "core"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/array"
|
5
5
|
|
6
6
|
module Tocer
|
7
7
|
module Transformers
|
8
8
|
# Transforms a Markdown header (plain text) into a table of contents link.
|
9
9
|
class Text
|
10
|
-
using Refinements::
|
10
|
+
using Refinements::Array
|
11
11
|
|
12
12
|
def initialize text, parser: Parsers::Header
|
13
13
|
@parser = parser.new text
|
data/lib/tocer/writer.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
4
|
-
require "refinements/
|
3
|
+
require "refinements/array"
|
4
|
+
require "refinements/pathname"
|
5
5
|
|
6
6
|
module Tocer
|
7
7
|
# Writes table of contents to a Markdown document.
|
8
8
|
# :reek:DataClump
|
9
9
|
class Writer
|
10
|
-
using Refinements::
|
11
|
-
using Refinements::
|
10
|
+
using Refinements::Array
|
11
|
+
using Refinements::Pathname
|
12
12
|
|
13
13
|
def self.add start_index:, old_lines:, new_lines:
|
14
14
|
computed_new_lines = start_index.zero? ? new_lines : new_lines + "\n"
|
data/lib/tocer.rb
CHANGED
@@ -12,5 +12,7 @@ end
|
|
12
12
|
|
13
13
|
# Main namespace.
|
14
14
|
module Tocer
|
15
|
-
def self.loader
|
15
|
+
def self.loader registry = Zeitwerk::Registry
|
16
|
+
@loader ||= registry.loaders.find { |loader| loader.tag == File.basename(__FILE__, ".rb") }
|
17
|
+
end
|
16
18
|
end
|
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 = "17.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/tocer"
|
@@ -22,17 +22,17 @@ 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.
|
27
|
-
spec.add_dependency "core", "~> 0
|
25
|
+
spec.required_ruby_version = "~> 3.3"
|
26
|
+
spec.add_dependency "cogger", "~> 0.15"
|
27
|
+
spec.add_dependency "core", "~> 1.0"
|
28
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
29
29
|
spec.add_dependency "dry-schema", "~> 1.13"
|
30
|
-
spec.add_dependency "etcher", "~> 0
|
31
|
-
spec.add_dependency "infusible", "~>
|
32
|
-
spec.add_dependency "refinements", "~>
|
33
|
-
spec.add_dependency "runcom", "~>
|
34
|
-
spec.add_dependency "sod", "~> 0.
|
35
|
-
spec.add_dependency "spek", "~>
|
30
|
+
spec.add_dependency "etcher", "~> 1.0"
|
31
|
+
spec.add_dependency "infusible", "~> 3.0"
|
32
|
+
spec.add_dependency "refinements", "~> 12.0"
|
33
|
+
spec.add_dependency "runcom", "~> 11.0"
|
34
|
+
spec.add_dependency "sod", "~> 0.4"
|
35
|
+
spec.add_dependency "spek", "~> 3.0"
|
36
36
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
37
37
|
|
38
38
|
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: 17.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date:
|
38
|
+
date: 2024-01-01 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -43,28 +43,28 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.15'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.15'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: core
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0
|
60
|
+
version: '1.0'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0
|
67
|
+
version: '1.0'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: dry-container
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,84 +99,84 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0
|
102
|
+
version: '1.0'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0
|
109
|
+
version: '1.0'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: infusible
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '3.0'
|
117
117
|
type: :runtime
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '3.0'
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: refinements
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '12.0'
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
137
|
+
version: '12.0'
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: runcom
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
144
|
+
version: '11.0'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
151
|
+
version: '11.0'
|
152
152
|
- !ruby/object:Gem::Dependency
|
153
153
|
name: sod
|
154
154
|
requirement: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '0.
|
158
|
+
version: '0.4'
|
159
159
|
type: :runtime
|
160
160
|
prerelease: false
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0.
|
165
|
+
version: '0.4'
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
167
|
name: spek
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
172
|
+
version: '3.0'
|
173
173
|
type: :runtime
|
174
174
|
prerelease: false
|
175
175
|
version_requirements: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
179
|
+
version: '3.0'
|
180
180
|
- !ruby/object:Gem::Dependency
|
181
181
|
name: zeitwerk
|
182
182
|
requirement: !ruby/object:Gem::Requirement
|
@@ -244,14 +244,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
requirements:
|
245
245
|
- - "~>"
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version: '3.
|
247
|
+
version: '3.3'
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - ">="
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
254
|
+
rubygems_version: 3.5.3
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: A command line interface for generating Markdown table of contents.
|
metadata.gz.sig
CHANGED
Binary file
|