tocer 15.1.2 → 15.2.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: b2f83114e81d42e9a9ecf75882638aa429b6410378ae094f9b20ec4997aea614
4
- data.tar.gz: 99f969f100d87661f8f3928efe3fb6fd5dc0712987377566e18b516ed24ddee2
3
+ metadata.gz: 243224018a4fff16b6b0127a6131ef9ac45268a6eb8324b80093ca401901017b
4
+ data.tar.gz: f6c960e90162dc393b6e79f1aef75d87cf861b7aeda7daedd02a5e0dfc6e2b19
5
5
  SHA512:
6
- metadata.gz: 9626eebe778cbefa8f1127f17f3ed6a3bcae0ab85d12e609b40c8df3ade998e74654f3969aa874540675b556725d2100923c776181ca8062b3066a89735f97ba
7
- data.tar.gz: c6a4f9b2e8d216d164dba9205b64a541f2a5b83eea3780144a1d9995da55beae2b8ddb8f2698921919a10ffcce273d8cea656845e4646d9cf21034bd1e5cf0ae
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)
@@ -5,7 +5,7 @@ module Tocer
5
5
  module Actions
6
6
  # Handles the insert action.
7
7
  class Insert
8
- include Tocer::Import[:logger]
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| logger.info { " #{path}" } }
16
+ runner.call(configuration).each { |path| kernel.puts " #{path}" }
17
17
  end
18
18
 
19
19
  private
@@ -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, :specification, :logger]
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
- puts error.message
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 logger.info { specification.labeled_version }
31
- else logger.any { parser.to_s }
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
@@ -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::Client.new }
15
+ register(:logger) { Cogger.new formatter: :emoji }
16
16
  end
17
17
  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 = "15.1.2"
5
+ spec.version = "15.2.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/tocer"
@@ -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.5"
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.1.2
4
+ version: 15.2.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: 2023-03-22 00:00:00.000000000 Z
38
+ date: 2023-04-13 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.5'
46
+ version: '0.8'
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.5'
53
+ version: '0.8'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: core
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.4.9
215
+ rubygems_version: 3.4.12
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: A command line interface for generating table of contents for Markdown files.
metadata.gz.sig CHANGED
Binary file