tocer 12.0.1 → 12.0.2
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.tar.gz.sig +0 -0
- data/lib/tocer/cli/shell.rb +1 -4
- data/lib/tocer/identity.rb +1 -1
- data/lib/tocer/transformers/finder.rb +1 -4
- data/lib/tocer/writer.rb +3 -1
- 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: e87cdc42651955652ee2d24f27b95c6722561c4b284a0ff5fb6b3341425f9eb8
|
4
|
+
data.tar.gz: 6170cd85486b4e8c5a9168b265ba1d3d6127fab7e662ea26f8095a028f7e9699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 012aca333c7cd34bc26bba320e1ddce5fb25f138f93378efdf551d6c65873eba8745960ccdccc296616569359681f4f6e68342f9c52d0ce10d6eba30b2d1f080
|
7
|
+
data.tar.gz: 3f9a398064fbb8521952cf6ac5e9749eaa2373ff6ca48c865ea23b6eb814d1e11f046e0656e6230264a3e55d35c39838f867817baf44e0124f98e32ae9457dbc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/tocer/cli/shell.rb
CHANGED
@@ -4,10 +4,7 @@ module Tocer
|
|
4
4
|
module CLI
|
5
5
|
# The main Command Line Interface (CLI) object.
|
6
6
|
class Shell
|
7
|
-
PROCESSORS = {
|
8
|
-
config: Processors::Config.new,
|
9
|
-
build: Processors::Build.new
|
10
|
-
}.freeze
|
7
|
+
PROCESSORS = {config: Processors::Config.new, build: Processors::Build.new}.freeze
|
11
8
|
|
12
9
|
def initialize parser: Parsers::Assembler.new, processors: PROCESSORS
|
13
10
|
@parser = parser
|
data/lib/tocer/identity.rb
CHANGED
@@ -4,10 +4,7 @@ module Tocer
|
|
4
4
|
module Transformers
|
5
5
|
# Finds appropriate header transformer for matching pattern.
|
6
6
|
class Finder
|
7
|
-
TRANSFORMERS = {
|
8
|
-
/\[.+\]\(.+\)/ => Transformers::Link,
|
9
|
-
/.*/ => Transformers::Text
|
10
|
-
}.freeze
|
7
|
+
TRANSFORMERS = {/\[.+\]\(.+\)/ => Transformers::Link, /.*/ => Transformers::Text}.freeze
|
11
8
|
|
12
9
|
def initialize transformers: TRANSFORMERS
|
13
10
|
@transformers = transformers
|
data/lib/tocer/writer.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/arrays"
|
3
4
|
require "refinements/pathnames"
|
4
5
|
|
5
6
|
module Tocer
|
6
7
|
# Writes table of contents to a Markdown document.
|
7
8
|
# :reek:DataClump
|
8
9
|
class Writer
|
10
|
+
using Refinements::Arrays
|
9
11
|
using Refinements::Pathnames
|
10
12
|
|
11
13
|
def self.add start_index:, old_lines:, new_lines:
|
@@ -45,7 +47,7 @@ module Tocer
|
|
45
47
|
).join
|
46
48
|
end
|
47
49
|
|
48
|
-
def prepend(lines, label) = content(lines, label)
|
50
|
+
def prepend(lines, label) = [content(lines, label), lines.join].compress.join("\n")
|
49
51
|
|
50
52
|
def content(lines, label) = builder.call(lines, label: label)
|
51
53
|
end
|
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: 12.0.
|
4
|
+
version: 12.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
|
29
29
|
W2A=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2021-
|
31
|
+
date: 2021-05-20 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: refinements
|
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
rubygems_version: 3.2.
|
119
|
+
rubygems_version: 3.2.17
|
120
120
|
signing_key:
|
121
121
|
specification_version: 4
|
122
122
|
summary: A command line interface for generating table of contents for Markdown files.
|
metadata.gz.sig
CHANGED
Binary file
|