jekyll-toc 0.1.1 → 0.2.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: 5f0601165123bc065a76d355ae7fff00c7143c59
4
- data.tar.gz: a6debb0a1f9999f1714a0db81993dade1f514cc0
3
+ metadata.gz: bbddbd6bb394ec1243767ad0b733114aa23b5578
4
+ data.tar.gz: 05a92654374c3bfa4007c899f1da2b9c5e4d4564
5
5
  SHA512:
6
- metadata.gz: aadfda21dacca72d16ef4ac3577f18bd00753d6c21dd2e74f1cf63f70afb559760bb43d23770a00aece77f671320090dc1b33ba27da8d8764b9bc877e54e1bed
7
- data.tar.gz: 2eaf6f22f02f2b9444540f4cd3484224c1e37319233fc7a44b3d4d0e7004a3e5fdf80434322654b98986da64c492ab1045d6f69335a4f772b27ff256b453cbe8
6
+ metadata.gz: aa6f2079888e3ffca856dcf8f10f294a87094b2f871b5625aef907be9f112cba64c8cf9e4c089882c36a67c0a8b3ce6968ae037dbf4e9e275f4463bc4b625604
7
+ data.tar.gz: 8dee11cb55c9459a5dc4c7ea3a2c7cfd09cff538196967ab0266d89b01b3c341b2e77e4c116b7492de2438b490088fe3244ee43395a64c6751f397b6639e5987
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  *.gem
2
- Gemfile.lock
3
- .bundle/
2
+ /Gemfile.lock
3
+ /.bundle/
4
+ /coverage
@@ -1,12 +1,21 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
- - 2.0
4
4
  - 2.1
5
5
  - 2.2
6
+ - 2.3.1
7
+ - 2.4.0
8
+ # Put this in your .travis.yml
6
9
  gemfile:
10
+ - gemfiles/jekyll_3.3.gemfile
11
+ - gemfiles/jekyll_3.2.gemfile
7
12
  - gemfiles/jekyll_3.1.gemfile
8
13
  - gemfiles/jekyll_3.gemfile
9
14
  - gemfiles/jekyll_2.gemfile
15
+ matrix:
16
+ exclude:
17
+ - rvm: 2.4.0
18
+ gemfile: gemfiles/jekyll_2.gemfile
10
19
  addons:
11
20
  code_climate:
12
21
  repo_token: 6b81e393ea6ad38560386f650ea2fb0e57a7beb5e20f8c8364fabee30d5bff07
data/Appraisals CHANGED
@@ -1,3 +1,11 @@
1
+ appraise "jekyll-3.3" do
2
+ gem "jekyll", "3.3.1"
3
+ end
4
+
5
+ appraise "jekyll-3.2" do
6
+ gem "jekyll", "3.2.1"
7
+ end
8
+
1
9
  appraise "jekyll-3.1" do
2
10
  gem "jekyll", "3.1.2"
3
11
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "jekyll", "3.2.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "jekyll", "3.3.1"
6
+
7
+ gemspec :path => "../"
@@ -15,11 +15,13 @@ Gem::Specification.new do |spec|
15
15
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
16
  spec.require_paths = ["lib"]
17
17
 
18
+ spec.required_ruby_version = ">= 2.1.0"
19
+
18
20
  spec.add_runtime_dependency "nokogiri", "~> 1.6"
19
21
 
20
22
  spec.add_development_dependency 'minitest', "~> 5.0"
21
23
  spec.add_development_dependency "appraisal"
22
- spec.add_development_dependency "codeclimate-test-reporter"
23
- spec.add_development_dependency "jekyll", "~> 2.0"
24
+ spec.add_development_dependency "codeclimate-test-reporter", "~> 1.0"
25
+ spec.add_development_dependency "jekyll", ">= 2.0"
24
26
  spec.add_development_dependency "rake"
25
27
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllToc
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -1,5 +1,5 @@
1
- require "codeclimate-test-reporter"
2
- CodeClimate::TestReporter.start
1
+ require 'simplecov'
2
+ SimpleCov.start
3
3
 
4
4
  require 'jekyll'
5
5
  require 'minitest/autorun'
@@ -16,6 +16,6 @@ EOL
16
16
  module TestHelpers
17
17
  def read_html_and_create_parser
18
18
  @parser = Jekyll::TableOfContents::Parser.new(SIMPLE_HTML)
19
- assert_match /Simple H1/, @parser.doc.inner_html
19
+ assert_match(/Simple H1/, @parser.doc.inner_html)
20
20
  end
21
21
  end
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
  require_relative '../lib/jekyll-toc'
3
3
 
4
-
5
4
  class TestTOCOnlyFilter < Minitest::Test
6
5
  include TestHelpers
7
6
 
@@ -12,12 +11,12 @@ class TestTOCOnlyFilter < Minitest::Test
12
11
  def test_injects_anchors_into_content
13
12
  html = @parser.inject_anchors_into_html
14
13
 
15
- assert_match /<a id="simple\-h1" class="anchor" href="#simple\-h1" aria\-hidden="true"><span.*span><\/a>Simple H1/, html
14
+ assert_match(/<a id="simple\-h1" class="anchor" href="#simple\-h1" aria\-hidden="true"><span.*span><\/a>Simple H1/, html)
16
15
  end
17
16
 
18
17
  def test_does_not_inject_toc
19
18
  html = @parser.inject_anchors_into_html
20
19
 
21
- assert_nil /<ul class="section-nav">/ =~ html
20
+ assert_nil(/<ul class="section-nav">/ =~ html)
22
21
  end
23
22
  end
@@ -12,12 +12,12 @@ class TestTOCFilter < Minitest::Test
12
12
  def test_injects_anchors
13
13
  html = @parser.toc
14
14
 
15
- assert_match /<a id="simple\-h1" class="anchor" href="#simple\-h1" aria\-hidden="true"><span.*span><\/a>Simple H1/, html
15
+ assert_match(/<a id="simple\-h1" class="anchor" href="#simple\-h1" aria\-hidden="true"><span.*span><\/a>Simple H1/, html)
16
16
  end
17
17
 
18
18
  def test_injects_toc_container
19
19
  html = @parser.toc
20
20
 
21
- assert_match /<ul class="section-nav">/, html
21
+ assert_match(/<ul class="section-nav">/, html)
22
22
  end
23
23
  end
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
  require_relative '../lib/jekyll-toc'
3
3
 
4
-
5
4
  class TestTOCOnlyFilter < Minitest::Test
6
5
  include TestHelpers
7
6
 
@@ -12,12 +11,12 @@ class TestTOCOnlyFilter < Minitest::Test
12
11
  def test_injects_toc_container
13
12
  html = @parser.build_toc
14
13
 
15
- assert_match /<ul class="section-nav">/, html
14
+ assert_match(/<ul class="section-nav">/, html)
16
15
  end
17
16
 
18
17
  def test_does_not_return_content
19
18
  html = @parser.build_toc
20
19
 
21
- assert_nil /<h1>Simple H1<\/h1>/ =~ html
20
+ assert_nil(/<h1>Simple H1<\/h1>/ =~ html)
22
21
  end
23
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-toc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshimaru
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-17 00:00:00.000000000 Z
12
+ date: 2017-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -57,28 +57,28 @@ dependencies:
57
57
  name: codeclimate-test-reporter
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: '1.0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: '1.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jekyll
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '2.0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '2.0'
84
84
  - !ruby/object:Gem::Dependency
@@ -111,6 +111,8 @@ files:
111
111
  - Rakefile
112
112
  - gemfiles/jekyll_2.gemfile
113
113
  - gemfiles/jekyll_3.1.gemfile
114
+ - gemfiles/jekyll_3.2.gemfile
115
+ - gemfiles/jekyll_3.3.gemfile
114
116
  - gemfiles/jekyll_3.gemfile
115
117
  - jekyll-toc.gemspec
116
118
  - lib/jekyll-toc.rb
@@ -132,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
134
  requirements:
133
135
  - - ">="
134
136
  - !ruby/object:Gem::Version
135
- version: '0'
137
+ version: 2.1.0
136
138
  required_rubygems_version: !ruby/object:Gem::Requirement
137
139
  requirements:
138
140
  - - ">="
@@ -140,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  version: '0'
141
143
  requirements: []
142
144
  rubyforge_project:
143
- rubygems_version: 2.4.5.1
145
+ rubygems_version: 2.5.2
144
146
  signing_key:
145
147
  specification_version: 4
146
148
  summary: Jekyll Table of Contents plugin