danger-toc 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +6 -0
- data/.rubocop_todo.yml +16 -46
- data/CHANGELOG.md +5 -0
- data/README.md +7 -2
- data/Rakefile +1 -1
- data/danger-toc.gemspec +1 -1
- data/lib/toc/config.rb +8 -0
- data/lib/toc/constructor.rb +1 -1
- data/lib/toc/extractor.rb +1 -1
- data/lib/toc/gem_version.rb +1 -1
- data/lib/toc/plugin.rb +3 -3
- data/spec/config_spec.rb +21 -3
- data/spec/fixtures/markdown_file/{ONE-SECTION.md → one_section.md} +0 -0
- data/spec/fixtures/markdown_file/one_section_with_custom_toc.md +11 -0
- data/spec/fixtures/markdown_file/{ONE-SECTION-WITH-INVALID-TOC.md → one_section_with_invalid_toc.md} +0 -0
- data/spec/fixtures/markdown_file/{ONE-SECTION-WITH-TOC.md → one_section_with_toc.md} +0 -0
- data/spec/fixtures/markdown_file/{ONE-SECTION-WITH-TOC-LEVEL.md → one_section_with_toc_level.md} +0 -0
- data/spec/fixtures/markdown_file/{WITH-QUOTED-EXAMPLE.md → with_quoted_example.md} +0 -0
- data/spec/markdown_file/danger_toc_readme_spec.rb +1 -1
- data/spec/markdown_file/one_section_spec.rb +2 -2
- data/spec/markdown_file/one_section_with_toc_level_spec.rb +2 -2
- data/spec/markdown_file/one_section_with_toc_spec.rb +2 -2
- data/spec/markdown_file/with_quoted_example_spec.rb +2 -2
- data/spec/toc_spec.rb +52 -3
- metadata +17 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 11cf1615f816fb91537d90ee61bf5e53123e1127
|
|
4
|
+
data.tar.gz: 8391ad24cabe41e7989ab2b8b154d3b6a45a900b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6331b825f408b1c52a9b70cce3a1532c1df3e8cc469a3048b695edf6b6af973e028abb77af0ed2356202933fe26518c133262e5efc5f32fbbdb8c0c7aedec7cd
|
|
7
|
+
data.tar.gz: 6ff29b16f78ecb185a433c2ddc12f3c22e65d4424d2e7550938024600214c4dd9bf0cd6752156d85a294824ffa69000d5f0ca29c013b9e3d681662b50fa2e3a2
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2018-03-23 17:04:14 +0300 using RuboCop version 0.41.2.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 3
|
|
10
|
-
# Cop supports --auto-correct.
|
|
11
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
12
|
-
# SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
|
|
13
|
-
Layout/IndentHeredoc:
|
|
14
|
-
Exclude:
|
|
15
|
-
- 'lib/toc/plugin.rb'
|
|
16
|
-
- 'spec/toc_spec.rb'
|
|
17
|
-
|
|
18
|
-
# Offense count: 1
|
|
19
|
-
Lint/DuplicateMethods:
|
|
20
|
-
Exclude:
|
|
21
|
-
- 'lib/toc/config.rb'
|
|
22
|
-
|
|
23
9
|
# Offense count: 4
|
|
24
10
|
Metrics/AbcSize:
|
|
25
|
-
Max:
|
|
11
|
+
Max: 19
|
|
26
12
|
|
|
27
|
-
# Offense count:
|
|
28
|
-
# Configuration parameters:
|
|
29
|
-
Metrics/BlockLength:
|
|
30
|
-
Max: 69
|
|
31
|
-
|
|
32
|
-
# Offense count: 20
|
|
33
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
13
|
+
# Offense count: 24
|
|
14
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
|
34
15
|
# URISchemes: http, https
|
|
35
16
|
Metrics/LineLength:
|
|
36
17
|
Max: 119
|
|
@@ -40,28 +21,6 @@ Metrics/LineLength:
|
|
|
40
21
|
Metrics/MethodLength:
|
|
41
22
|
Max: 21
|
|
42
23
|
|
|
43
|
-
# Offense count: 4
|
|
44
|
-
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
45
|
-
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
|
46
|
-
Naming/FileName:
|
|
47
|
-
Exclude:
|
|
48
|
-
- 'Dangerfile'
|
|
49
|
-
- 'Gemfile'
|
|
50
|
-
- 'Guardfile'
|
|
51
|
-
- 'danger-toc.gemspec'
|
|
52
|
-
|
|
53
|
-
# Offense count: 2
|
|
54
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
|
55
|
-
# NamePrefix: is_, has_, have_
|
|
56
|
-
# NamePrefixBlacklist: is_, has_, have_
|
|
57
|
-
# NameWhitelist: is_a?
|
|
58
|
-
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
59
|
-
Naming/PredicateName:
|
|
60
|
-
Exclude:
|
|
61
|
-
- 'spec/**/*'
|
|
62
|
-
- 'lib/toc/markdown_file.rb'
|
|
63
|
-
- 'lib/toc/plugin.rb'
|
|
64
|
-
|
|
65
24
|
# Offense count: 6
|
|
66
25
|
Style/Documentation:
|
|
67
26
|
Exclude:
|
|
@@ -78,7 +37,7 @@ Style/DoubleNegation:
|
|
|
78
37
|
Exclude:
|
|
79
38
|
- 'lib/toc/markdown_file.rb'
|
|
80
39
|
|
|
81
|
-
# Offense count:
|
|
40
|
+
# Offense count: 1
|
|
82
41
|
# Configuration parameters: MinBodyLength.
|
|
83
42
|
Style/GuardClause:
|
|
84
43
|
Exclude:
|
|
@@ -90,3 +49,14 @@ Style/GuardClause:
|
|
|
90
49
|
Style/ModuleFunction:
|
|
91
50
|
Exclude:
|
|
92
51
|
- 'lib/toc/config.rb'
|
|
52
|
+
|
|
53
|
+
# Offense count: 2
|
|
54
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
|
55
|
+
# NamePrefix: is_, has_, have_
|
|
56
|
+
# NamePrefixBlacklist: is_, has_, have_
|
|
57
|
+
# NameWhitelist: is_a?
|
|
58
|
+
Style/PredicateName:
|
|
59
|
+
Exclude:
|
|
60
|
+
- 'spec/**/*'
|
|
61
|
+
- 'lib/toc/markdown_file.rb'
|
|
62
|
+
- 'lib/toc/plugin.rb'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 0.1.1 (2018/03/27)
|
|
4
|
+
|
|
5
|
+
* [#3](https://github.com/dblock/danger-toc/issues/3): Configure "Table of Contents" header with `toc.header` - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#11](https://github.com/dblock/danger-toc/pull/11): Fix bug "undefined method #filename" in the method #toc_changes? - [@mr-dxdy](https://github.com/mr-dxdy).
|
|
7
|
+
|
|
3
8
|
### 0.1.0 (2017/11/5)
|
|
4
9
|
|
|
5
10
|
* Initial public release - [@dblock](https://github.com/dblock).
|
data/README.md
CHANGED
|
@@ -12,6 +12,7 @@ A plugin for [danger.systems](http://danger.systems) that makes sure your projec
|
|
|
12
12
|
- [Configuration](#configuration)
|
|
13
13
|
- [Methods and Attributes](#methods-and-attributes)
|
|
14
14
|
- [toc.files](#tocfiles)
|
|
15
|
+
- [toc.header](#tocheader)
|
|
15
16
|
- [toc.check](#toccheck)
|
|
16
17
|
- [Contributing](#contributing)
|
|
17
18
|
- [Copyright](#copyright)
|
|
@@ -34,10 +35,10 @@ Add `toc.check` to your Dangerfile. Make a pull request and see this plugin in a
|
|
|
34
35
|
|
|
35
36
|
The plugin supports following configuration options:
|
|
36
37
|
|
|
37
|
-
You can configure plugin using following code:
|
|
38
38
|
```ruby
|
|
39
39
|
Danger::Toc.configure do |config|
|
|
40
40
|
config.files = [ 'README.md' ]
|
|
41
|
+
config.header = 'Table of Contents'
|
|
41
42
|
end
|
|
42
43
|
```
|
|
43
44
|
|
|
@@ -47,7 +48,11 @@ Methods and attributes from this plugin are available in your `Dangerfile` under
|
|
|
47
48
|
|
|
48
49
|
#### toc.files
|
|
49
50
|
|
|
50
|
-
List of files to ensure TOC in.
|
|
51
|
+
List of files to ensure TOC in, default is `README.md`.
|
|
52
|
+
|
|
53
|
+
#### toc.header
|
|
54
|
+
|
|
55
|
+
The Table of Contents header, without `#`, default is `Table of Contents`.
|
|
51
56
|
|
|
52
57
|
#### toc.check
|
|
53
58
|
|
data/Rakefile
CHANGED
data/danger-toc.gemspec
CHANGED
|
@@ -28,6 +28,6 @@ Gem::Specification.new do |spec|
|
|
|
28
28
|
spec.add_development_dependency 'pry'
|
|
29
29
|
spec.add_development_dependency 'rake', '~> 10.0'
|
|
30
30
|
spec.add_development_dependency 'rspec', '~> 3.4'
|
|
31
|
-
spec.add_development_dependency 'rubocop', '~> 0.41'
|
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.41.0'
|
|
32
32
|
spec.add_development_dependency 'yard', '~> 0.8'
|
|
33
33
|
end
|
data/lib/toc/config.rb
CHANGED
|
@@ -4,13 +4,21 @@ module Danger
|
|
|
4
4
|
extend self
|
|
5
5
|
|
|
6
6
|
attr_accessor :files
|
|
7
|
+
attr_accessor :header
|
|
7
8
|
|
|
9
|
+
# Files to process
|
|
8
10
|
def files=(value)
|
|
9
11
|
@files = value
|
|
10
12
|
end
|
|
11
13
|
|
|
14
|
+
# Table of Contents Header
|
|
15
|
+
def header=(value)
|
|
16
|
+
@header = value
|
|
17
|
+
end
|
|
18
|
+
|
|
12
19
|
def reset
|
|
13
20
|
self.files = ['README.md']
|
|
21
|
+
self.header = 'Table of Contents'
|
|
14
22
|
end
|
|
15
23
|
|
|
16
24
|
reset
|
data/lib/toc/constructor.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Danger
|
|
|
26
26
|
has_toc = false
|
|
27
27
|
headers = []
|
|
28
28
|
toc.each do |line|
|
|
29
|
-
if !has_toc && line[:text] ==
|
|
29
|
+
if !has_toc && line[:text] == Danger::Toc.config.header
|
|
30
30
|
headers = [] # drop any headers prior to TOC
|
|
31
31
|
has_toc = true
|
|
32
32
|
else
|
data/lib/toc/extractor.rb
CHANGED
|
@@ -11,7 +11,7 @@ module Danger
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def convert(el)
|
|
14
|
-
if el.type == :header && el.options[:raw_text] ==
|
|
14
|
+
if el.type == :header && el.options[:raw_text] == Danger::Toc.config.header
|
|
15
15
|
@in_toc = true
|
|
16
16
|
@toc_start = el.options[:location]
|
|
17
17
|
elsif el.type == :header
|
data/lib/toc/gem_version.rb
CHANGED
data/lib/toc/plugin.rb
CHANGED
|
@@ -29,10 +29,10 @@ module Danger
|
|
|
29
29
|
is_toc_correct?
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# Has the
|
|
32
|
+
# Has the README file been modified?
|
|
33
33
|
# @return [boolean]
|
|
34
34
|
def toc_changes?
|
|
35
|
-
(git.modified_files &
|
|
35
|
+
(git.modified_files & filenames).any? || (git.added_files & filenames).any?
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
# Is the TOC format correct?
|
|
@@ -50,7 +50,7 @@ module Danger
|
|
|
50
50
|
Here's the expected TOC for #{filename}:
|
|
51
51
|
|
|
52
52
|
```markdown
|
|
53
|
-
#
|
|
53
|
+
# #{Danger::Toc.config.header}
|
|
54
54
|
|
|
55
55
|
#{toc_file.toc_from_headers.join("\n")}
|
|
56
56
|
```
|
data/spec/config_spec.rb
CHANGED
|
@@ -7,22 +7,40 @@ describe Danger::Toc::Config do
|
|
|
7
7
|
|
|
8
8
|
describe 'configure' do
|
|
9
9
|
describe 'files' do
|
|
10
|
-
context '
|
|
10
|
+
context 'default' do
|
|
11
11
|
it 'assumes README.md' do
|
|
12
12
|
expect(Danger::Toc.config.files).to eq ['README.md']
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
|
-
context '
|
|
15
|
+
context 'custom value' do
|
|
16
16
|
before do
|
|
17
17
|
Danger::Toc.configure do |config|
|
|
18
18
|
config.files = ['README.md', 'SOMETHING.md']
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
it '
|
|
22
|
+
it 'is set' do
|
|
23
23
|
expect(Danger::Toc.config.files).to eq ['README.md', 'SOMETHING.md']
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
|
+
describe 'header' do
|
|
28
|
+
context 'default' do
|
|
29
|
+
it 'assumes Table of Contents' do
|
|
30
|
+
expect(Danger::Toc.config.header).to eq 'Table of Contents'
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
context 'custom value' do
|
|
34
|
+
before do
|
|
35
|
+
Danger::Toc.configure do |config|
|
|
36
|
+
config.header = 'Custom TOC'
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
it 'is set' do
|
|
41
|
+
expect(Danger::Toc.config.header).to eq 'Custom TOC'
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
27
45
|
end
|
|
28
46
|
end
|
|
File without changes
|
data/spec/fixtures/markdown_file/{ONE-SECTION-WITH-INVALID-TOC.md → one_section_with_invalid_toc.md}
RENAMED
|
File without changes
|
|
File without changes
|
data/spec/fixtures/markdown_file/{ONE-SECTION-WITH-TOC-LEVEL.md → one_section_with_toc_level.md}
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe Danger::Toc::MarkdownFile do
|
|
4
|
-
describe '
|
|
5
|
-
let(:filename) { File.expand_path('../../fixtures/markdown_file/
|
|
4
|
+
describe 'with a single section' do
|
|
5
|
+
let(:filename) { File.expand_path('../../fixtures/markdown_file/one_section.md', __FILE__) }
|
|
6
6
|
subject do
|
|
7
7
|
Danger::Toc::MarkdownFile.new(filename)
|
|
8
8
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe Danger::Toc::MarkdownFile do
|
|
4
|
-
describe '
|
|
5
|
-
let(:filename) { File.expand_path('../../fixtures/markdown_file/
|
|
4
|
+
describe 'one section that is not at the root level' do
|
|
5
|
+
let(:filename) { File.expand_path('../../fixtures/markdown_file/one_section_with_toc_level.md', __FILE__) }
|
|
6
6
|
subject do
|
|
7
7
|
Danger::Toc::MarkdownFile.new(filename)
|
|
8
8
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe Danger::Toc::MarkdownFile do
|
|
4
|
-
describe '
|
|
5
|
-
let(:filename) { File.expand_path('../../fixtures/markdown_file/
|
|
4
|
+
describe 'one section with TOC' do
|
|
5
|
+
let(:filename) { File.expand_path('../../fixtures/markdown_file/one_section_with_toc.md', __FILE__) }
|
|
6
6
|
subject do
|
|
7
7
|
Danger::Toc::MarkdownFile.new(filename)
|
|
8
8
|
end
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
3
|
describe Danger::Toc::MarkdownFile do
|
|
4
|
-
describe '
|
|
5
|
-
let(:filename) { File.expand_path('../../fixtures/markdown_file/
|
|
4
|
+
describe 'with a code example' do
|
|
5
|
+
let(:filename) { File.expand_path('../../fixtures/markdown_file/with_quoted_example.md', __FILE__) }
|
|
6
6
|
subject do
|
|
7
7
|
Danger::Toc::MarkdownFile.new(filename)
|
|
8
8
|
end
|
data/spec/toc_spec.rb
CHANGED
|
@@ -10,7 +10,7 @@ describe Danger::Toc do
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
describe 'with Dangerfile' do
|
|
13
|
-
let(:filename) { File.expand_path('../fixtures/markdown_file/
|
|
13
|
+
let(:filename) { File.expand_path('../fixtures/markdown_file/one_section_with_toc.md', __FILE__) }
|
|
14
14
|
let(:dangerfile) { testing_dangerfile }
|
|
15
15
|
let(:toc) do
|
|
16
16
|
dangerfile.toc.filenames = [filename]
|
|
@@ -18,6 +18,29 @@ describe Danger::Toc do
|
|
|
18
18
|
end
|
|
19
19
|
let(:status_report) { toc.status_report }
|
|
20
20
|
|
|
21
|
+
context 'toc_changes?' do
|
|
22
|
+
it 'should find modified files' do
|
|
23
|
+
allow(toc.git).to receive(:modified_files).and_return([filename])
|
|
24
|
+
allow(toc.git).to receive(:added_files).and_return([])
|
|
25
|
+
|
|
26
|
+
expect(toc).to be_toc_changes
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
it 'should find added files' do
|
|
30
|
+
allow(toc.git).to receive(:modified_files).and_return([])
|
|
31
|
+
allow(toc.git).to receive(:added_files).and_return([filename])
|
|
32
|
+
|
|
33
|
+
expect(toc).to be_toc_changes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'should not found changed files' do
|
|
37
|
+
allow(toc.git).to receive(:modified_files).and_return([])
|
|
38
|
+
allow(toc.git).to receive(:added_files).and_return([])
|
|
39
|
+
|
|
40
|
+
expect(toc).not_to be_toc_changes
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
21
44
|
context 'is_toc_correct?' do
|
|
22
45
|
subject do
|
|
23
46
|
toc.is_toc_correct?
|
|
@@ -46,7 +69,7 @@ describe Danger::Toc do
|
|
|
46
69
|
end
|
|
47
70
|
|
|
48
71
|
context 'with missing TOC' do
|
|
49
|
-
let(:filename) { File.expand_path('../fixtures/markdown_file/
|
|
72
|
+
let(:filename) { File.expand_path('../fixtures/markdown_file/one_section.md', __FILE__) }
|
|
50
73
|
it 'reports errors' do
|
|
51
74
|
expect(subject).to be false
|
|
52
75
|
expect(status_report[:errors]).to eq ["The #{filename} file is missing a TOC."]
|
|
@@ -65,7 +88,7 @@ MARKDOWN
|
|
|
65
88
|
end
|
|
66
89
|
|
|
67
90
|
context 'with invalid TOC' do
|
|
68
|
-
let(:filename) { File.expand_path('../fixtures/markdown_file/
|
|
91
|
+
let(:filename) { File.expand_path('../fixtures/markdown_file/one_section_with_invalid_toc.md', __FILE__) }
|
|
69
92
|
it 'reports errors' do
|
|
70
93
|
expect(subject).to be false
|
|
71
94
|
expect(status_report[:errors]).to eq ["The TOC found in #{filename} doesn't match the sections of the file."]
|
|
@@ -82,6 +105,32 @@ MARKDOWN
|
|
|
82
105
|
]
|
|
83
106
|
end
|
|
84
107
|
end
|
|
108
|
+
|
|
109
|
+
context 'with a custom toc header' do
|
|
110
|
+
before do
|
|
111
|
+
Danger::Toc.configure do |config|
|
|
112
|
+
config.header = 'Custom TOC'
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
context 'with missing TOC' do
|
|
117
|
+
let(:filename) { File.expand_path('../fixtures/markdown_file/one_section.md', __FILE__) }
|
|
118
|
+
it 'reports errors' do
|
|
119
|
+
expect(subject).to be false
|
|
120
|
+
expect(status_report[:markdowns].first.message).to include "\n# Custom TOC\n"
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
context 'with a custom TOC' do
|
|
125
|
+
let(:filename) { File.expand_path('../fixtures/markdown_file/one_section_with_custom_toc.md', __FILE__) }
|
|
126
|
+
it 'has no complaints' do
|
|
127
|
+
expect(subject).to be true
|
|
128
|
+
expect(status_report[:errors]).to eq []
|
|
129
|
+
expect(status_report[:warnings]).to eq []
|
|
130
|
+
expect(status_report[:markdowns]).to eq []
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
85
134
|
end
|
|
86
135
|
end
|
|
87
136
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-toc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dblock
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -156,14 +156,14 @@ dependencies:
|
|
|
156
156
|
requirements:
|
|
157
157
|
- - "~>"
|
|
158
158
|
- !ruby/object:Gem::Version
|
|
159
|
-
version:
|
|
159
|
+
version: 0.41.0
|
|
160
160
|
type: :development
|
|
161
161
|
prerelease: false
|
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
163
|
requirements:
|
|
164
164
|
- - "~>"
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
|
-
version:
|
|
166
|
+
version: 0.41.0
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
168
|
name: yard
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -210,11 +210,12 @@ files:
|
|
|
210
210
|
- lib/toc/markdown_file.rb
|
|
211
211
|
- lib/toc/plugin.rb
|
|
212
212
|
- spec/config_spec.rb
|
|
213
|
-
- spec/fixtures/markdown_file/
|
|
214
|
-
- spec/fixtures/markdown_file/
|
|
215
|
-
- spec/fixtures/markdown_file/
|
|
216
|
-
- spec/fixtures/markdown_file/
|
|
217
|
-
- spec/fixtures/markdown_file/
|
|
213
|
+
- spec/fixtures/markdown_file/one_section.md
|
|
214
|
+
- spec/fixtures/markdown_file/one_section_with_custom_toc.md
|
|
215
|
+
- spec/fixtures/markdown_file/one_section_with_invalid_toc.md
|
|
216
|
+
- spec/fixtures/markdown_file/one_section_with_toc.md
|
|
217
|
+
- spec/fixtures/markdown_file/one_section_with_toc_level.md
|
|
218
|
+
- spec/fixtures/markdown_file/with_quoted_example.md
|
|
218
219
|
- spec/markdown_file/danger_toc_readme_spec.rb
|
|
219
220
|
- spec/markdown_file/one_section_spec.rb
|
|
220
221
|
- spec/markdown_file/one_section_with_toc_level_spec.rb
|
|
@@ -242,17 +243,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
242
243
|
version: '0'
|
|
243
244
|
requirements: []
|
|
244
245
|
rubyforge_project:
|
|
245
|
-
rubygems_version: 2.6.
|
|
246
|
+
rubygems_version: 2.6.11
|
|
246
247
|
signing_key:
|
|
247
248
|
specification_version: 4
|
|
248
249
|
summary: A danger.systems plugin for your markdown TOC.
|
|
249
250
|
test_files:
|
|
250
251
|
- spec/config_spec.rb
|
|
251
|
-
- spec/fixtures/markdown_file/
|
|
252
|
-
- spec/fixtures/markdown_file/
|
|
253
|
-
- spec/fixtures/markdown_file/
|
|
254
|
-
- spec/fixtures/markdown_file/
|
|
255
|
-
- spec/fixtures/markdown_file/
|
|
252
|
+
- spec/fixtures/markdown_file/one_section.md
|
|
253
|
+
- spec/fixtures/markdown_file/one_section_with_custom_toc.md
|
|
254
|
+
- spec/fixtures/markdown_file/one_section_with_invalid_toc.md
|
|
255
|
+
- spec/fixtures/markdown_file/one_section_with_toc.md
|
|
256
|
+
- spec/fixtures/markdown_file/one_section_with_toc_level.md
|
|
257
|
+
- spec/fixtures/markdown_file/with_quoted_example.md
|
|
256
258
|
- spec/markdown_file/danger_toc_readme_spec.rb
|
|
257
259
|
- spec/markdown_file/one_section_spec.rb
|
|
258
260
|
- spec/markdown_file/one_section_with_toc_level_spec.rb
|