tocer 16.0.1 → 16.0.3
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/exe/tocer +1 -1
- data/lib/tocer/cli/actions/label.rb +1 -4
- data/lib/tocer/cli/actions/pattern.rb +1 -4
- data/lib/tocer/cli/actions/root.rb +1 -4
- data/lib/tocer/container.rb +7 -7
- data/tocer.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- 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: 26351956c1c87e0820bb41c8073583156fa2319f4bc9631f4d775ee1d0a5d42f
|
4
|
+
data.tar.gz: bc85af5138d02e2995c55f5629c07cfa6e30fe30f0552292fa78d7c886026ae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e24e8f28221a13a7badd9ff0257062a75e96e4d6aa6d7c749200b09e7c6aec12eb5857ec5bd37cf9f3749f9c6058c148e2217acc170e3e3de31502321082a810
|
7
|
+
data.tar.gz: a5fbe569ad20cd59193ca115d183e0eaccefbee0defcbbb8d554383aa9e7297402d31bd64db9dce9f91d3e0def76fc6121f4bf9cb291ace128b86656d73ede00
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/exe/tocer
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/structs"
|
4
3
|
require "sod"
|
5
4
|
|
6
5
|
module Tocer
|
@@ -10,15 +9,13 @@ module Tocer
|
|
10
9
|
class Label < Sod::Action
|
11
10
|
include Import[:input]
|
12
11
|
|
13
|
-
using Refinements::Structs
|
14
|
-
|
15
12
|
description "Set label."
|
16
13
|
|
17
14
|
on %w[-l --label], argument: "[TEXT]"
|
18
15
|
|
19
16
|
default { Container[:configuration].label }
|
20
17
|
|
21
|
-
def call(label =
|
18
|
+
def call(label = nil) = input.label = label || default
|
22
19
|
end
|
23
20
|
end
|
24
21
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/structs"
|
4
3
|
require "sod"
|
5
4
|
|
6
5
|
module Tocer
|
@@ -10,15 +9,13 @@ module Tocer
|
|
10
9
|
class Pattern < Sod::Action
|
11
10
|
include Import[:input]
|
12
11
|
|
13
|
-
using Refinements::Structs
|
14
|
-
|
15
12
|
description "Set file patterns."
|
16
13
|
|
17
14
|
on %w[-p --patterns], argument: "[a,b,c]"
|
18
15
|
|
19
16
|
default { Container[:configuration].patterns }
|
20
17
|
|
21
|
-
def call(patterns =
|
18
|
+
def call(patterns = nil) = input.patterns = Array(patterns || default)
|
22
19
|
end
|
23
20
|
end
|
24
21
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/structs"
|
4
3
|
require "sod"
|
5
4
|
|
6
5
|
module Tocer
|
@@ -10,15 +9,13 @@ module Tocer
|
|
10
9
|
class Root < Sod::Action
|
11
10
|
include Import[:input]
|
12
11
|
|
13
|
-
using Refinements::Structs
|
14
|
-
|
15
12
|
description "Set root directory."
|
16
13
|
|
17
14
|
on %w[-r --root], argument: "[PATH]"
|
18
15
|
|
19
16
|
default { Container[:configuration].root_dir }
|
20
17
|
|
21
|
-
def call(path =
|
18
|
+
def call(path = nil) = input.root_dir = Pathname(path || default)
|
22
19
|
end
|
23
20
|
end
|
24
21
|
end
|
data/lib/tocer/container.rb
CHANGED
@@ -11,21 +11,21 @@ module Tocer
|
|
11
11
|
module Container
|
12
12
|
extend Dry::Container::Mixin
|
13
13
|
|
14
|
-
register :configuration do
|
14
|
+
register :configuration, memoize: true do
|
15
15
|
self[:defaults].add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
|
16
16
|
.then { |registry| Etcher.call registry }
|
17
17
|
end
|
18
18
|
|
19
|
-
register :defaults do
|
19
|
+
register :defaults, memoize: true do
|
20
20
|
Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
|
21
21
|
.add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
|
22
22
|
end
|
23
23
|
|
24
24
|
register(:input, memoize: true) { self[:configuration].dup }
|
25
|
-
register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
|
26
|
-
register(:xdg_config) { Runcom::Config.new "tocer/configuration.yml" }
|
27
|
-
register(:specification) { Spek::Loader.call "#{__dir__}/../../tocer.gemspec" }
|
28
|
-
register(:
|
29
|
-
register
|
25
|
+
register(:defaults_path, memoize: true) { Pathname(__dir__).join("configuration/defaults.yml") }
|
26
|
+
register(:xdg_config, memoize: true) { Runcom::Config.new "tocer/configuration.yml" }
|
27
|
+
register(:specification, memoize: true) { Spek::Loader.call "#{__dir__}/../../tocer.gemspec" }
|
28
|
+
register(:logger, memoize: true) { Cogger.new formatter: :emoji }
|
29
|
+
register :kernel, Kernel
|
30
30
|
end
|
31
31
|
end
|
data/tocer.gemspec
CHANGED
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: 16.0.
|
4
|
+
version: 16.0.3
|
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: 2023-
|
38
|
+
date: 2023-07-23 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -251,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.4.
|
254
|
+
rubygems_version: 3.4.17
|
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
|