tocer 2.0.0 → 2.1.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: aa732a63d8e967479bc580511dfa76bcba0c4cc2
4
- data.tar.gz: 0c91b4c7dd2c5f15aaa3999e2266252500d1a8f0
3
+ metadata.gz: ac24c13d33c311c26f78a2d2ff7e0b1879530229
4
+ data.tar.gz: 5cfd0003a9c25046810c964f2e1e98ce9ccdb23b
5
5
  SHA512:
6
- metadata.gz: c796ec3d977fae80e37bffe9fc5534523a9bbee9e1cfc436ceb0e1560105eac411cf97e9b0869ae8e4e928b2d3f2d59c6c667ab480037aa49bba7fdd56034268
7
- data.tar.gz: bd5421c7e5f863d9acacd74784e55c0e31d3c5deac7f5639069b9043b578918b552dae474b041ce52f3d93733c2d68151bc039920e003f1119aec6bac562a297
6
+ metadata.gz: 6357230e4a39dca32f34b7faf1629937e7aaf6d20a324f779a2d5ffd91755622c03a4ca6038989cb26d9a0c73d8ff7459e4b5c282b8b44bdd796f9c3f3e8b95c
7
+ data.tar.gz: 5decd7f245812cc95155330896e2f9cb3c8c3ff26fb7a490a42fd122e282d19a119f4fffad2aaae329c3445fa2547691da78bc7322ec27e78f6fd666c7cbd269
Binary file
Binary file
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  desc "Open IRB console for gem development environment"
4
2
  task :console do
5
3
  require "irb"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "tocer/elements/comment_block"
2
4
  require "tocer/parsers/header"
3
5
  require "tocer/transformers/link"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  # Builds a table of contents for a Markdown document.
3
5
  class Builder
@@ -15,10 +17,12 @@ module Tocer
15
17
  def build
16
18
  return "" if headers.empty?
17
19
 
18
- content = "#{comment_block.start}\n\n"
19
- content << "#{label}\n\n"
20
- content << headers_as_links.join("\n")
21
- content << "\n\n#{comment_block.finish}\n\n"
20
+ [
21
+ "#{comment_block.start}\n\n",
22
+ "#{label}\n\n",
23
+ headers_as_links.join("\n"),
24
+ "\n\n#{comment_block.finish}\n\n"
25
+ ].join
22
26
  end
23
27
 
24
28
  private
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "yaml"
2
4
  require "thor"
3
5
  require "thor/actions"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  # Default configuration for gem with support for custom settings.
3
5
  class Configuration
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  module Elements
3
5
  # Represents a table of contents start and finish comment block.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  # Gem identity information.
3
5
  module Identity
@@ -10,7 +12,7 @@ module Tocer
10
12
  end
11
13
 
12
14
  def self.version
13
- "2.0.0"
15
+ "2.1.0"
14
16
  end
15
17
 
16
18
  def self.version_label
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  module Parsers
3
5
  # Represents a Markdown header.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "refinements/array_extensions"
2
4
 
3
5
  module Tocer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "refinements/array_extensions"
2
4
 
3
5
  module Tocer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tocer
2
4
  # Writes table of contents to a Markdown document.
3
5
  class Writer
metadata CHANGED
@@ -1,14 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tocer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2016-01-17 00:00:00.000000000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nPlSdyvYzJy
28
+ FIAaWGvujOT8xEu4umd45q5aepE8li4bR071i5Z7F0trKNVYYrxjQFmH5SSKYRT/
29
+ fXtICtAh1de3z3SOSK58IMPwjuoApYBxiqlmx0Uhla7mrzCE5+NmLPit3hLH6JFK
30
+ aSif+qBc6oHD7EQWPF5cZkzkIURuwNwPBngZGxIKaMAgRhjGFXzUMAaq++r59cS9
31
+ xTfQ4k6fglKEgpnLAXiKdo2c8Ym+X4rIKFfedQ==
32
+ -----END CERTIFICATE-----
33
+ date: 2016-01-21 00:00:00.000000000 Z
12
34
  dependencies:
13
35
  - !ruby/object:Gem::Dependency
14
36
  name: thor
@@ -66,6 +88,20 @@ dependencies:
66
88
  - - ">="
67
89
  - !ruby/object:Gem::Version
68
90
  version: '0'
91
+ - !ruby/object:Gem::Dependency
92
+ name: gemsmith
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '7.0'
98
+ type: :development
99
+ prerelease: false
100
+ version_requirements: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '7.0'
69
105
  - !ruby/object:Gem::Dependency
70
106
  name: pry
71
107
  requirement: !ruby/object:Gem::Requirement
Binary file