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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce1533812fdb7de6d965bafb9e47668b37721c6775dc8fd54a65fe94d086e7ed
4
- data.tar.gz: 102d4434d10b7e1a7625036de44e9180d0ba7a099fd9caccfb4c1351569b2eb1
3
+ metadata.gz: 14b2b29b848b0f22b8f5c6302c8a34a6ac6f34874aa5ae5f66a024194e5d1c6e
4
+ data.tar.gz: bed04a46a72eed28fbb0da85b6a8575c10cfe19bc898e9aa88dd0062b0c66c20
5
5
  SHA512:
6
- metadata.gz: 5d186ee58d4475df89db7e1e3901d186ca643f81d74702b28962f73fb02b38301396a765fb46892855231624b0336ad3f805f7b4842b60dbe8cf03a9f2a9a8c4
7
- data.tar.gz: 7d789e077ed1f864911db24364fab3c4a76d56346132306b8301aa0e5a3e38da34653d74acbeef2fdec5a88e9ee74de5f2a0cef346800960799e0cfb713fc45f
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/setup"
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 configured, the following tasks will be available (i.e. `bundle exec rake -T`):
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] # Add/Update Table of Contents (README)
137
+ rake toc[label,includes] # Insert/Update Table of Contents
136
138
  ....
137
139
 
138
- …which can be called as follows (quotes are not necessary if spaces are not used):
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
- # Provides Rake tasks for convenience.
10
- class Tasks
9
+ # Registers Rake tasks for use.
10
+ class Register
11
11
  include ::Rake::DSL
12
12
  using Refinements::Structs
13
13
 
14
- def self.setup = new.install
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 install
22
- desc "Add/Update Table of Contents (README)"
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(**arguments.to_h)
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 = "14.4.0"
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.1"
26
- spec.add_dependency "cogger", "~> 0.2"
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", "~> 0.0"
29
- spec.add_dependency "refinements", "~> 9.6"
30
- spec.add_dependency "runcom", "~> 8.5"
31
- spec.add_dependency "spek", "~> 0.5"
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: 14.4.0
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-09-16 00:00:00.000000000 Z
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.2'
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.2'
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: '0.0'
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: '0.0'
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: '9.6'
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: '9.6'
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: '8.5'
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: '8.5'
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.5'
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.5'
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/setup.rb
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.1'
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.3.22
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
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "tocer/rake/tasks"
4
- Tocer::Rake::Tasks.setup