tocer 3.3.0 → 4.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.tar.gz.sig +0 -0
- data/README.md +1 -1
- data/lib/tocer/builder.rb +1 -1
- data/lib/tocer/elements/comment_block.rb +4 -1
- data/lib/tocer/identity.rb +1 -1
- data/lib/tocer/writer.rb +13 -2
- metadata +12 -26
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364451d192c18a68dca94f98111f91bc9497c9a2
|
4
|
+
data.tar.gz: 8121740b8a7a03151014009133eb1e5187bd8e21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 690afd875c906b115a1a2f8e99dba18e4cddd7f22fce0cd6293e2fe30bdcbd344cb13e06ab357c5e6ad87e3415f8ce309a5a713c1fd03aa0d75e29c2f41a0dde
|
7
|
+
data.tar.gz: 75e09cac2a5c43f65c73ed4e03aa7c920ab2b9e08696237a2d389ca0768c773f19bdba103839217dee2f432408d7876b1c2e54366d77a79c9bd7099926cb6730
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
data/lib/tocer/builder.rb
CHANGED
@@ -4,7 +4,10 @@ module Tocer
|
|
4
4
|
module Elements
|
5
5
|
# Represents a table of contents start and finish comment block.
|
6
6
|
class CommentBlock
|
7
|
-
def initialize start_id: "Tocer[start]",
|
7
|
+
def initialize start_id: "Tocer[start]",
|
8
|
+
finish_id: "Tocer[finish]",
|
9
|
+
message: "Auto-generated, don't remove."
|
10
|
+
|
8
11
|
@start_id = start_id
|
9
12
|
@finish_id = finish_id
|
10
13
|
@message = message
|
data/lib/tocer/identity.rb
CHANGED
data/lib/tocer/writer.rb
CHANGED
@@ -3,7 +3,12 @@
|
|
3
3
|
module Tocer
|
4
4
|
# Writes table of contents to a Markdown document.
|
5
5
|
class Writer
|
6
|
-
|
6
|
+
# rubocop:disable Metrics/ParameterLists
|
7
|
+
def initialize file_path,
|
8
|
+
label: "# Table of Contents",
|
9
|
+
builder: Builder,
|
10
|
+
comment_block: Elements::CommentBlock
|
11
|
+
|
7
12
|
@file_path = file_path
|
8
13
|
@file_lines = File.open(file_path).to_a
|
9
14
|
@label = label
|
@@ -18,7 +23,13 @@ module Tocer
|
|
18
23
|
|
19
24
|
private
|
20
25
|
|
21
|
-
attr_reader :file_path,
|
26
|
+
attr_reader :file_path,
|
27
|
+
:file_lines,
|
28
|
+
:label,
|
29
|
+
:start_index,
|
30
|
+
:finish_index,
|
31
|
+
:builder,
|
32
|
+
:comment_block
|
22
33
|
|
23
34
|
def setup_indexes comment_block, lines
|
24
35
|
@start_index = comment_block.start_index lines
|
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: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
|
31
31
|
3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2017-01-22 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: thor
|
@@ -52,42 +52,42 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '5.0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '5.0'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: refinements
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '4.0'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '4.0'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: runcom
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '0.
|
83
|
+
version: '0.5'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0.
|
90
|
+
version: '0.5'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rake
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,20 +102,6 @@ dependencies:
|
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '12.0'
|
105
|
-
- !ruby/object:Gem::Dependency
|
106
|
-
name: gemsmith
|
107
|
-
requirement: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '8.2'
|
112
|
-
type: :development
|
113
|
-
prerelease: false
|
114
|
-
version_requirements: !ruby/object:Gem::Requirement
|
115
|
-
requirements:
|
116
|
-
- - "~>"
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version: '8.2'
|
119
105
|
- !ruby/object:Gem::Dependency
|
120
106
|
name: pry
|
121
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,14 +262,14 @@ dependencies:
|
|
276
262
|
requirements:
|
277
263
|
- - "~>"
|
278
264
|
- !ruby/object:Gem::Version
|
279
|
-
version: '0.
|
265
|
+
version: '0.47'
|
280
266
|
type: :development
|
281
267
|
prerelease: false
|
282
268
|
version_requirements: !ruby/object:Gem::Requirement
|
283
269
|
requirements:
|
284
270
|
- - "~>"
|
285
271
|
- !ruby/object:Gem::Version
|
286
|
-
version: '0.
|
272
|
+
version: '0.47'
|
287
273
|
- !ruby/object:Gem::Dependency
|
288
274
|
name: codeclimate-test-reporter
|
289
275
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,7 +319,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
333
319
|
requirements:
|
334
320
|
- - "~>"
|
335
321
|
- !ruby/object:Gem::Version
|
336
|
-
version: '2.
|
322
|
+
version: '2.4'
|
337
323
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
338
324
|
requirements:
|
339
325
|
- - ">="
|
@@ -341,7 +327,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
327
|
version: '0'
|
342
328
|
requirements: []
|
343
329
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.6.
|
330
|
+
rubygems_version: 2.6.9
|
345
331
|
signing_key:
|
346
332
|
specification_version: 4
|
347
333
|
summary: A command line interface for generating table of contents for Markdown files.
|
metadata.gz.sig
CHANGED
Binary file
|