jekyll-toc 0.12.1 → 0.15.0.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,10 +3,11 @@
3
3
  require 'test_helper'
4
4
 
5
5
  class TestConfiguration < Minitest::Test
6
- def test_default_conf1guration
6
+ def test_default_configuration
7
7
  configuration = Jekyll::TableOfContents::Configuration.new({})
8
8
 
9
9
  assert_equal configuration.toc_levels, 1..6
10
+ assert_equal configuration.ordered_list, false
10
11
  assert_equal configuration.no_toc_section_class, 'no_toc_section'
11
12
  assert_equal configuration.list_class, 'section-nav'
12
13
  assert_equal configuration.sublist_class, ''
@@ -18,6 +19,7 @@ class TestConfiguration < Minitest::Test
18
19
  configuration = Jekyll::TableOfContents::Configuration.new('TypeError!')
19
20
 
20
21
  assert_equal configuration.toc_levels, 1..6
22
+ assert_equal configuration.ordered_list, false
21
23
  assert_equal configuration.no_toc_section_class, 'no_toc_section'
22
24
  assert_equal configuration.list_class, 'section-nav'
23
25
  assert_equal configuration.sublist_class, ''
@@ -4,7 +4,7 @@ require 'simplecov'
4
4
  SimpleCov.start
5
5
 
6
6
  require 'minitest/autorun'
7
- require "minitest/reporters"
7
+ require 'minitest/reporters'
8
8
  Minitest::Reporters.use!
9
9
 
10
10
  require 'jekyll'
@@ -20,7 +20,7 @@ SIMPLE_HTML = <<~HTML
20
20
  HTML
21
21
 
22
22
  module TestHelpers
23
- def read_html_and_create_parser
24
- @parser = Jekyll::TableOfContents::Parser.new(SIMPLE_HTML)
23
+ def read_html_and_create_parser(options = {})
24
+ @parser = Jekyll::TableOfContents::Parser.new(SIMPLE_HTML, options)
25
25
  end
26
26
  end
@@ -13,7 +13,7 @@ class TestTableOfContentsTag < Minitest::Test
13
13
 
14
14
  def test_toc_tag
15
15
  context = @stubbed_context.new(
16
- page: @stubbed_context2.new({ 'toc' => false }, '<h1>test</h1>'),
16
+ page: @stubbed_context2.new({ 'toc' => false }, '<h1>test</h1>'),
17
17
  site: @stubbed_context1.new({ 'toc' => nil })
18
18
  )
19
19
  tag = Jekyll::TocTag.parse('toc_tag', '', Tokenizer.new(''), ParseContext.new)
metadata CHANGED
@@ -1,167 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-toc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.15.0.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - toshimaru
8
8
  - torbjoernk
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-07 00:00:00.000000000 Z
12
+ date: 2020-10-13 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: nokogiri
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.9'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '1.9'
28
- - !ruby/object:Gem::Dependency
29
- name: appraisal
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
14
  - !ruby/object:Gem::Dependency
43
15
  name: jekyll
44
16
  requirement: !ruby/object:Gem::Requirement
45
17
  requirements:
46
18
  - - ">="
47
19
  - !ruby/object:Gem::Version
48
- version: '3.5'
49
- type: :development
20
+ version: '3.8'
21
+ type: :runtime
50
22
  prerelease: false
51
23
  version_requirements: !ruby/object:Gem::Requirement
52
24
  requirements:
53
25
  - - ">="
54
26
  - !ruby/object:Gem::Version
55
- version: '3.5'
27
+ version: '3.8'
56
28
  - !ruby/object:Gem::Dependency
57
- name: minitest
29
+ name: nokogiri
58
30
  requirement: !ruby/object:Gem::Requirement
59
31
  requirements:
60
32
  - - "~>"
61
33
  - !ruby/object:Gem::Version
62
- version: '5.11'
63
- type: :development
34
+ version: '1.10'
35
+ type: :runtime
64
36
  prerelease: false
65
37
  version_requirements: !ruby/object:Gem::Requirement
66
38
  requirements:
67
39
  - - "~>"
68
40
  - !ruby/object:Gem::Version
69
- version: '5.11'
70
- - !ruby/object:Gem::Dependency
71
- name: minitest-reporters
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: pry
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rake
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- - !ruby/object:Gem::Dependency
113
- name: rubocop
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- - !ruby/object:Gem::Dependency
127
- name: simplecov
128
- requirement: !ruby/object:Gem::Requirement
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- type: :development
134
- prerelease: false
135
- version_requirements: !ruby/object:Gem::Requirement
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- version: '0'
140
- description: A liquid filter plugin for Jekyll which generates a table of contents.
41
+ version: '1.10'
42
+ description: Jekyll (Ruby static website generator) plugin which generates a table
43
+ of contents.
141
44
  email: me@toshimaru.net
142
45
  executables: []
143
46
  extensions: []
144
47
  extra_rdoc_files: []
145
48
  files:
49
+ - ".github/workflows/ci.yml"
50
+ - ".github/workflows/coverage.yml"
51
+ - ".github/workflows/rubocop.yml"
146
52
  - ".gitignore"
147
53
  - ".rubocop.yml"
148
- - ".travis.yml"
149
54
  - Appraisals
150
55
  - CHANGELOG.md
151
56
  - Gemfile
152
57
  - LICENSE.md
153
58
  - README.md
154
59
  - Rakefile
155
- - gemfiles/jekyll_3.6.gemfile
156
- - gemfiles/jekyll_3.7.gemfile
157
60
  - gemfiles/jekyll_3.8.gemfile
61
+ - gemfiles/jekyll_3.9.gemfile
62
+ - gemfiles/jekyll_4.0.gemfile
63
+ - gemfiles/jekyll_4.1.gemfile
158
64
  - jekyll-toc.gemspec
159
65
  - lib/jekyll-toc.rb
160
66
  - lib/table_of_contents/configuration.rb
67
+ - lib/table_of_contents/helper.rb
161
68
  - lib/table_of_contents/parser.rb
162
- - lib/version.rb
69
+ - lib/table_of_contents/version.rb
163
70
  - test/parser/test_inject_anchors_filter.rb
164
- - test/parser/test_option_error.rb
71
+ - test/parser/test_invalid_options.rb
72
+ - test/parser/test_ordered_list.rb
165
73
  - test/parser/test_toc_filter.rb
166
74
  - test/parser/test_toc_only_filter.rb
167
75
  - test/parser/test_various_toc_html.rb
@@ -174,7 +82,7 @@ homepage: https://github.com/toshimaru/jekyll-toc
174
82
  licenses:
175
83
  - MIT
176
84
  metadata: {}
177
- post_install_message:
85
+ post_install_message:
178
86
  rdoc_options: []
179
87
  require_paths:
180
88
  - lib
@@ -182,20 +90,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
90
  requirements:
183
91
  - - ">="
184
92
  - !ruby/object:Gem::Version
185
- version: '2.3'
93
+ version: '2.4'
186
94
  required_rubygems_version: !ruby/object:Gem::Requirement
187
95
  requirements:
188
- - - ">="
96
+ - - ">"
189
97
  - !ruby/object:Gem::Version
190
- version: '0'
98
+ version: 1.3.1
191
99
  requirements: []
192
- rubygems_version: 3.0.3
193
- signing_key:
100
+ rubygems_version: 3.1.4
101
+ signing_key:
194
102
  specification_version: 4
195
103
  summary: Jekyll Table of Contents plugin
196
104
  test_files:
197
105
  - test/parser/test_inject_anchors_filter.rb
198
- - test/parser/test_option_error.rb
106
+ - test/parser/test_invalid_options.rb
107
+ - test/parser/test_ordered_list.rb
199
108
  - test/parser/test_toc_filter.rb
200
109
  - test/parser/test_toc_only_filter.rb
201
110
  - test/parser/test_various_toc_html.rb
@@ -1,23 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- env:
4
- global:
5
- - CC_TEST_REPORTER_ID=6b81e393ea6ad38560386f650ea2fb0e57a7beb5e20f8c8364fabee30d5bff07
6
- rvm:
7
- - 2.3.7
8
- - 2.4.4
9
- - 2.5.1
10
- - 2.6.2
11
- # gemfile is generated by appraisal
12
- gemfile:
13
- - gemfiles/jekyll_3.8.gemfile
14
- - gemfiles/jekyll_3.7.gemfile
15
- - gemfiles/jekyll_3.6.gemfile
16
- before_script:
17
- # Download cc-test-reporter
18
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
19
- - chmod +x ./cc-test-reporter
20
- - ./cc-test-reporter before-build
21
- after_success:
22
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
23
- - bundle exec codeclimate-test-reporter
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "jekyll", "3.6"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "jekyll", "3.7"
6
-
7
- gemspec path: "../"
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module JekyllToc
4
- VERSION = '0.12.1'
5
- end