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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9472300608a5e54b747a2ea1012b1c1bcde1708
4
- data.tar.gz: 4c0f079dc96c6c64853fbf785874e90f69f70f49
3
+ metadata.gz: 364451d192c18a68dca94f98111f91bc9497c9a2
4
+ data.tar.gz: 8121740b8a7a03151014009133eb1e5187bd8e21
5
5
  SHA512:
6
- metadata.gz: 7a712aed674162eadb62e81c13a4c86679e7995971176f9a316b8943ccd2765fed3a3ee1bcb0db141e3e407dc5237c974a964febf267074884ef320f5afe39dc
7
- data.tar.gz: 8f9b9998b793a68ea73fc155c6666aa260d699ff1709d95afd4365bef4106f86b458cacc35dafd185626a7453702172373caab5b3a7e655aaca2aabe70e5d4c6
6
+ metadata.gz: 690afd875c906b115a1a2f8e99dba18e4cddd7f22fce0cd6293e2fe30bdcbd344cb13e06ab357c5e6ad87e3415f8ce309a5a713c1fd03aa0d75e29c2f41a0dde
7
+ data.tar.gz: 75e09cac2a5c43f65c73ed4e03aa7c920ab2b9e08696237a2d389ca0768c773f19bdba103839217dee2f432408d7876b1c2e54366d77a79c9bd7099926cb6730
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -44,7 +44,7 @@ Markdown files.
44
44
  # Requirements
45
45
 
46
46
  0. A UNIX-based system.
47
- 0. [Ruby 2.3.x](https://www.ruby-lang.org).
47
+ 0. [Ruby 2.4.x](https://www.ruby-lang.org).
48
48
 
49
49
  # Setup
50
50
 
@@ -42,7 +42,7 @@ module Tocer
42
42
  end
43
43
 
44
44
  def acquire_transfomer header
45
- if header =~ /\[.+\]\(.+\)/
45
+ if header.match?(/\[.+\]\(.+\)/)
46
46
  Transformers::Link.new header
47
47
  else
48
48
  Transformers::Text.new header
@@ -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]", finish_id: "Tocer[finish]", message: "Auto-generated, don't remove."
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
@@ -12,7 +12,7 @@ module Tocer
12
12
  end
13
13
 
14
14
  def self.version
15
- "3.3.0"
15
+ "4.0.0"
16
16
  end
17
17
 
18
18
  def self.version_label
@@ -3,7 +3,12 @@
3
3
  module Tocer
4
4
  # Writes table of contents to a Markdown document.
5
5
  class Writer
6
- def initialize file_path, label: "# Table of Contents", builder: Builder, comment_block: Elements::CommentBlock
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, :file_lines, :label, :start_index, :finish_index, :builder, :comment_block
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: 3.3.0
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: 2016-12-18 00:00:00.000000000 Z
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: '4.1'
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: '4.1'
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: '3.1'
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: '3.1'
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.3'
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.3'
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.46'
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.46'
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.3'
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.8
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