danger-toc 0.1.3 → 0.3.0
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/CHANGELOG.md +14 -0
- data/LICENSE.txt +1 -1
- data/README.md +103 -24
- data/lib/toc/config.rb +59 -24
- data/lib/toc/constructors/kramdown_constructor.rb +5 -6
- data/lib/toc/constructors.rb +0 -4
- data/lib/toc/extractor.rb +2 -1
- data/lib/toc/gem_version.rb +1 -1
- data/lib/toc/markdown_file.rb +62 -22
- data/lib/toc/plugin.rb +59 -37
- metadata +18 -163
- data/.gitignore +0 -11
- data/.rspec +0 -2
- data/.rubocop.yml +0 -14
- data/.rubocop_todo.yml +0 -86
- data/.travis.yml +0 -14
- data/CONTRIBUTING.md +0 -125
- data/Dangerfile +0 -4
- data/Gemfile +0 -5
- data/Guardfile +0 -19
- data/RELEASING.md +0 -67
- data/Rakefile +0 -23
- data/danger-toc.gemspec +0 -33
- data/images/toc-missing.png +0 -0
- data/spec/config_spec.rb +0 -66
- data/spec/constructors_spec.rb +0 -23
- data/spec/fixtures/markdown_file/one_section.md +0 -5
- data/spec/fixtures/markdown_file/one_section_with_custom_toc.md +0 -11
- data/spec/fixtures/markdown_file/one_section_with_invalid_toc.md +0 -11
- data/spec/fixtures/markdown_file/one_section_with_toc.md +0 -11
- data/spec/fixtures/markdown_file/one_section_with_toc_level.md +0 -11
- data/spec/fixtures/markdown_file/one_section_with_underscore_in_name.md +0 -11
- data/spec/fixtures/markdown_file/with_quoted_example.md +0 -26
- data/spec/markdown_file/danger_toc_readme_spec.rb +0 -19
- data/spec/markdown_file/one_section_spec.rb +0 -28
- data/spec/markdown_file/one_section_with_toc_level_spec.rb +0 -28
- data/spec/markdown_file/one_section_with_toc_spec.rb +0 -28
- data/spec/markdown_file/with_quoted_example_spec.rb +0 -33
- data/spec/markdown_file/with_underscore_in_section_name_spec.rb +0 -32
- data/spec/spec_helper.rb +0 -38
- data/spec/toc_spec.rb +0 -136
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.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dblock
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -24,20 +24,6 @@ dependencies:
|
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: kramdown
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :runtime
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
27
|
- !ruby/object:Gem::Dependency
|
|
42
28
|
name: danger-plugin-api
|
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,69 +39,27 @@ dependencies:
|
|
|
53
39
|
- !ruby/object:Gem::Version
|
|
54
40
|
version: '1.0'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '1.3'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '1.3'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: guard
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '2.14'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - "~>"
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '2.14'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: guard-rspec
|
|
42
|
+
name: diff-lcs
|
|
85
43
|
requirement: !ruby/object:Gem::Requirement
|
|
86
44
|
requirements:
|
|
87
45
|
- - "~>"
|
|
88
46
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
90
|
-
type: :
|
|
47
|
+
version: '1.5'
|
|
48
|
+
type: :runtime
|
|
91
49
|
prerelease: false
|
|
92
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
51
|
requirements:
|
|
94
52
|
- - "~>"
|
|
95
53
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
54
|
+
version: '1.5'
|
|
97
55
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
|
100
|
-
requirements:
|
|
101
|
-
- - ">="
|
|
102
|
-
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0'
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - ">="
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: pry
|
|
56
|
+
name: kramdown
|
|
113
57
|
requirement: !ruby/object:Gem::Requirement
|
|
114
58
|
requirements:
|
|
115
59
|
- - ">="
|
|
116
60
|
- !ruby/object:Gem::Version
|
|
117
61
|
version: '0'
|
|
118
|
-
type: :
|
|
62
|
+
type: :runtime
|
|
119
63
|
prerelease: false
|
|
120
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
65
|
requirements:
|
|
@@ -123,55 +67,13 @@ dependencies:
|
|
|
123
67
|
- !ruby/object:Gem::Version
|
|
124
68
|
version: '0'
|
|
125
69
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - "~>"
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '10.0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - "~>"
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '10.0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: rspec
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - "~>"
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '3.4'
|
|
146
|
-
type: :development
|
|
147
|
-
prerelease: false
|
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
-
requirements:
|
|
150
|
-
- - "~>"
|
|
151
|
-
- !ruby/object:Gem::Version
|
|
152
|
-
version: '3.4'
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: rubocop
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - '='
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: 0.58.2
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - '='
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: 0.58.2
|
|
167
|
-
- !ruby/object:Gem::Dependency
|
|
168
|
-
name: yard
|
|
70
|
+
name: kramdown-parser-gfm
|
|
169
71
|
requirement: !ruby/object:Gem::Requirement
|
|
170
72
|
requirements:
|
|
171
73
|
- - ">="
|
|
172
74
|
- !ruby/object:Gem::Version
|
|
173
75
|
version: '0'
|
|
174
|
-
type: :
|
|
76
|
+
type: :runtime
|
|
175
77
|
prerelease: false
|
|
176
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
177
79
|
requirements:
|
|
@@ -185,22 +87,9 @@ executables: []
|
|
|
185
87
|
extensions: []
|
|
186
88
|
extra_rdoc_files: []
|
|
187
89
|
files:
|
|
188
|
-
- ".gitignore"
|
|
189
|
-
- ".rspec"
|
|
190
|
-
- ".rubocop.yml"
|
|
191
|
-
- ".rubocop_todo.yml"
|
|
192
|
-
- ".travis.yml"
|
|
193
90
|
- CHANGELOG.md
|
|
194
|
-
- CONTRIBUTING.md
|
|
195
|
-
- Dangerfile
|
|
196
|
-
- Gemfile
|
|
197
|
-
- Guardfile
|
|
198
91
|
- LICENSE.txt
|
|
199
92
|
- README.md
|
|
200
|
-
- RELEASING.md
|
|
201
|
-
- Rakefile
|
|
202
|
-
- danger-toc.gemspec
|
|
203
|
-
- images/toc-missing.png
|
|
204
93
|
- lib/danger_plugin.rb
|
|
205
94
|
- lib/danger_toc.rb
|
|
206
95
|
- lib/toc/config.rb
|
|
@@ -211,28 +100,12 @@ files:
|
|
|
211
100
|
- lib/toc/gem_version.rb
|
|
212
101
|
- lib/toc/markdown_file.rb
|
|
213
102
|
- lib/toc/plugin.rb
|
|
214
|
-
- spec/config_spec.rb
|
|
215
|
-
- spec/constructors_spec.rb
|
|
216
|
-
- spec/fixtures/markdown_file/one_section.md
|
|
217
|
-
- spec/fixtures/markdown_file/one_section_with_custom_toc.md
|
|
218
|
-
- spec/fixtures/markdown_file/one_section_with_invalid_toc.md
|
|
219
|
-
- spec/fixtures/markdown_file/one_section_with_toc.md
|
|
220
|
-
- spec/fixtures/markdown_file/one_section_with_toc_level.md
|
|
221
|
-
- spec/fixtures/markdown_file/one_section_with_underscore_in_name.md
|
|
222
|
-
- spec/fixtures/markdown_file/with_quoted_example.md
|
|
223
|
-
- spec/markdown_file/danger_toc_readme_spec.rb
|
|
224
|
-
- spec/markdown_file/one_section_spec.rb
|
|
225
|
-
- spec/markdown_file/one_section_with_toc_level_spec.rb
|
|
226
|
-
- spec/markdown_file/one_section_with_toc_spec.rb
|
|
227
|
-
- spec/markdown_file/with_quoted_example_spec.rb
|
|
228
|
-
- spec/markdown_file/with_underscore_in_section_name_spec.rb
|
|
229
|
-
- spec/spec_helper.rb
|
|
230
|
-
- spec/toc_spec.rb
|
|
231
103
|
homepage: https://github.com/dblock/danger-toc
|
|
232
104
|
licenses:
|
|
233
105
|
- MIT
|
|
234
|
-
metadata:
|
|
235
|
-
|
|
106
|
+
metadata:
|
|
107
|
+
rubygems_mfa_required: 'true'
|
|
108
|
+
post_install_message:
|
|
236
109
|
rdoc_options: []
|
|
237
110
|
require_paths:
|
|
238
111
|
- lib
|
|
@@ -240,33 +113,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
240
113
|
requirements:
|
|
241
114
|
- - ">="
|
|
242
115
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: '
|
|
116
|
+
version: '3.1'
|
|
244
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
118
|
requirements:
|
|
246
119
|
- - ">="
|
|
247
120
|
- !ruby/object:Gem::Version
|
|
248
121
|
version: '0'
|
|
249
122
|
requirements: []
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
signing_key:
|
|
123
|
+
rubygems_version: 3.5.16
|
|
124
|
+
signing_key:
|
|
253
125
|
specification_version: 4
|
|
254
126
|
summary: A danger.systems plugin for your markdown TOC.
|
|
255
|
-
test_files:
|
|
256
|
-
- spec/config_spec.rb
|
|
257
|
-
- spec/constructors_spec.rb
|
|
258
|
-
- spec/fixtures/markdown_file/one_section.md
|
|
259
|
-
- spec/fixtures/markdown_file/one_section_with_custom_toc.md
|
|
260
|
-
- spec/fixtures/markdown_file/one_section_with_invalid_toc.md
|
|
261
|
-
- spec/fixtures/markdown_file/one_section_with_toc.md
|
|
262
|
-
- spec/fixtures/markdown_file/one_section_with_toc_level.md
|
|
263
|
-
- spec/fixtures/markdown_file/one_section_with_underscore_in_name.md
|
|
264
|
-
- spec/fixtures/markdown_file/with_quoted_example.md
|
|
265
|
-
- spec/markdown_file/danger_toc_readme_spec.rb
|
|
266
|
-
- spec/markdown_file/one_section_spec.rb
|
|
267
|
-
- spec/markdown_file/one_section_with_toc_level_spec.rb
|
|
268
|
-
- spec/markdown_file/one_section_with_toc_spec.rb
|
|
269
|
-
- spec/markdown_file/with_quoted_example_spec.rb
|
|
270
|
-
- spec/markdown_file/with_underscore_in_section_name_spec.rb
|
|
271
|
-
- spec/spec_helper.rb
|
|
272
|
-
- spec/toc_spec.rb
|
|
127
|
+
test_files: []
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/.rubocop_todo.yml
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2018-08-15 11:59:49 -0400 using RuboCop version 0.58.2.
|
|
4
|
-
# The point is for the user to remove these configuration records
|
|
5
|
-
# one by one as the offenses are removed from the code base.
|
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
-
|
|
9
|
-
# Offense count: 3
|
|
10
|
-
# Cop supports --auto-correct.
|
|
11
|
-
# Configuration parameters: EnforcedStyle.
|
|
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: 2
|
|
19
|
-
Lint/DuplicateMethods:
|
|
20
|
-
Exclude:
|
|
21
|
-
- 'lib/toc/config.rb'
|
|
22
|
-
|
|
23
|
-
# Offense count: 4
|
|
24
|
-
Metrics/AbcSize:
|
|
25
|
-
Max: 19
|
|
26
|
-
|
|
27
|
-
# Offense count: 8
|
|
28
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
29
|
-
# ExcludedMethods: refine
|
|
30
|
-
Metrics/BlockLength:
|
|
31
|
-
Max: 109
|
|
32
|
-
|
|
33
|
-
# Offense count: 3
|
|
34
|
-
# Configuration parameters: CountComments.
|
|
35
|
-
Metrics/MethodLength:
|
|
36
|
-
Max: 21
|
|
37
|
-
|
|
38
|
-
# Offense count: 2
|
|
39
|
-
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
|
|
40
|
-
# NamePrefix: is_, has_, have_
|
|
41
|
-
# NamePrefixBlacklist: is_, has_, have_
|
|
42
|
-
# NameWhitelist: is_a?
|
|
43
|
-
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
44
|
-
Naming/PredicateName:
|
|
45
|
-
Exclude:
|
|
46
|
-
- 'spec/**/*'
|
|
47
|
-
- 'lib/toc/markdown_file.rb'
|
|
48
|
-
- 'lib/toc/plugin.rb'
|
|
49
|
-
|
|
50
|
-
# Offense count: 3
|
|
51
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
52
|
-
# AllowedNames: io, id, to, by, on, in, at, ip
|
|
53
|
-
Naming/UncommunicativeMethodParamName:
|
|
54
|
-
Exclude:
|
|
55
|
-
- 'lib/toc/constructors/kramdown_constructor.rb'
|
|
56
|
-
- 'lib/toc/extractor.rb'
|
|
57
|
-
|
|
58
|
-
# Offense count: 8
|
|
59
|
-
Style/Documentation:
|
|
60
|
-
Exclude:
|
|
61
|
-
- 'spec/**/*'
|
|
62
|
-
- 'test/**/*'
|
|
63
|
-
- 'lib/toc/config.rb'
|
|
64
|
-
- 'lib/toc/constructors.rb'
|
|
65
|
-
- 'lib/toc/constructors/github_constructor.rb'
|
|
66
|
-
- 'lib/toc/constructors/kramdown_constructor.rb'
|
|
67
|
-
- 'lib/toc/extractor.rb'
|
|
68
|
-
- 'lib/toc/markdown_file.rb'
|
|
69
|
-
- 'lib/toc/plugin.rb'
|
|
70
|
-
|
|
71
|
-
# Offense count: 3
|
|
72
|
-
Style/DoubleNegation:
|
|
73
|
-
Exclude:
|
|
74
|
-
- 'lib/toc/markdown_file.rb'
|
|
75
|
-
|
|
76
|
-
# Offense count: 2
|
|
77
|
-
# Configuration parameters: MinBodyLength.
|
|
78
|
-
Style/GuardClause:
|
|
79
|
-
Exclude:
|
|
80
|
-
- 'lib/toc/markdown_file.rb'
|
|
81
|
-
|
|
82
|
-
# Offense count: 26
|
|
83
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
84
|
-
# URISchemes: http, https
|
|
85
|
-
Metrics/LineLength:
|
|
86
|
-
Max: 119
|
data/.travis.yml
DELETED
data/CONTRIBUTING.md
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
# Contributing to Danger-Toc
|
|
2
|
-
|
|
3
|
-
This project is work of [many contributors](https://github.com/dblock/danger-toc/graphs/contributors).
|
|
4
|
-
|
|
5
|
-
You're encouraged to submit [pull requests](https://github.com/dblock/danger-toc/pulls), [propose features and discuss issues](https://github.com/dblock/danger-toc/issues).
|
|
6
|
-
|
|
7
|
-
In the examples below, substitute your Github username for `contributor` in URLs.
|
|
8
|
-
|
|
9
|
-
### Fork the Project
|
|
10
|
-
|
|
11
|
-
Fork the [project on Github](https://github.com/dblock/danger-toc) and check out your copy.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
git clone https://github.com/contributor/danger-toc.git
|
|
15
|
-
cd danger-toc
|
|
16
|
-
git remote add upstream https://github.com/dblock/danger-toc.git
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Bundle Install and Test
|
|
20
|
-
|
|
21
|
-
Ensure that you can build the project and run tests.
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
bundle install
|
|
25
|
-
bundle exec rake
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Contribute Code
|
|
29
|
-
|
|
30
|
-
### Create a Topic Branch
|
|
31
|
-
|
|
32
|
-
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
git checkout master
|
|
36
|
-
git pull upstream master
|
|
37
|
-
git checkout -b my-feature-branch
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Write Tests
|
|
41
|
-
|
|
42
|
-
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add tests to [spec](spec).
|
|
43
|
-
|
|
44
|
-
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
|
45
|
-
|
|
46
|
-
### Write Code
|
|
47
|
-
|
|
48
|
-
Implement your feature or bug fix.
|
|
49
|
-
|
|
50
|
-
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally ingored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
|
|
51
|
-
|
|
52
|
-
Make sure that `bundle exec rake` completes without errors.
|
|
53
|
-
|
|
54
|
-
### Write Documentation
|
|
55
|
-
|
|
56
|
-
Document any external behavior in the [README](README.md).
|
|
57
|
-
|
|
58
|
-
### Update Toc
|
|
59
|
-
|
|
60
|
-
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Don't remove *Your contribution here*.
|
|
61
|
-
|
|
62
|
-
Make it look like every other line, including a link to the issue being fixed, your name and link to your Github account.
|
|
63
|
-
|
|
64
|
-
### Commit Changes
|
|
65
|
-
|
|
66
|
-
Make sure git knows your name and email address:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
git config --global user.name "Your Name"
|
|
70
|
-
git config --global user.email "contributor@example.com"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Writing good commit logs is important. A commit log should describe what changed and why.
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
git add ...
|
|
77
|
-
git commit
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Push
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
git push origin my-feature-branch
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Make a Pull Request
|
|
87
|
-
|
|
88
|
-
Go to https://github.com/contributor/danger-toc and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
|
89
|
-
|
|
90
|
-
### Update CHANGELOG Again
|
|
91
|
-
|
|
92
|
-
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
* [#123](https://github.com/dblock/danger-toc/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Amend your previous commit and force push the changes.
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
git commit --amend
|
|
102
|
-
git push origin my-feature-branch -f
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Rebase
|
|
106
|
-
|
|
107
|
-
If you've been working on a change for a while, rebase with upstream/master.
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
git fetch upstream
|
|
111
|
-
git rebase upstream/master
|
|
112
|
-
git push origin my-feature-branch -f
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Check on Your Pull Request
|
|
116
|
-
|
|
117
|
-
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
|
118
|
-
|
|
119
|
-
### Be Patient
|
|
120
|
-
|
|
121
|
-
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
|
|
122
|
-
|
|
123
|
-
## Thank You
|
|
124
|
-
|
|
125
|
-
Please do know that we really appreciate and value your time and work. We love you, really.
|
data/Dangerfile
DELETED
data/Gemfile
DELETED
data/Guardfile
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# A guardfile for making Danger Plugins
|
|
2
|
-
# For more info see https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
# To run, use `bundle exec guard`.
|
|
5
|
-
|
|
6
|
-
guard :rspec, cmd: 'bundle exec rspec' do
|
|
7
|
-
require 'guard/rspec/dsl'
|
|
8
|
-
dsl = Guard::RSpec::Dsl.new(self)
|
|
9
|
-
|
|
10
|
-
# RSpec files
|
|
11
|
-
rspec = dsl.rspec
|
|
12
|
-
watch(rspec.spec_helper) { rspec.spec_dir }
|
|
13
|
-
watch(rspec.spec_support) { rspec.spec_dir }
|
|
14
|
-
watch(rspec.spec_files)
|
|
15
|
-
|
|
16
|
-
# Ruby files
|
|
17
|
-
ruby = dsl.ruby
|
|
18
|
-
dsl.watch_spec_files_for(ruby.lib_files)
|
|
19
|
-
end
|
data/RELEASING.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Releasing Danger-Toc
|
|
2
|
-
|
|
3
|
-
There're no hard rules about when to release danger-toc. Release bug fixes frequently, features not so frequently and breaking API changes rarely.
|
|
4
|
-
|
|
5
|
-
### Release
|
|
6
|
-
|
|
7
|
-
Install bundle, run tests, check that all tests succeed locally.
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
bundle install
|
|
11
|
-
rake
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Check that the last build succeeded in [Travis CI](https://travis-ci.org/dblock/danger-toc) for all supported platforms.
|
|
15
|
-
|
|
16
|
-
Increment the version, modify [lib/toc/gem_version.rb](lib/toc/gem_version.rb).
|
|
17
|
-
|
|
18
|
-
Following the [Semantic Versioning](http://semver.org/):
|
|
19
|
-
* Increment the third number if the release has bug fixes and/or very minor features with backward compatibility, only (eg. change `0.2.1` to `0.2.2`).
|
|
20
|
-
* Increment the second number if the release contains major features or breaking API changes (eg. change `0.2.1` to `0.3.0`).
|
|
21
|
-
|
|
22
|
-
Create a new version and mark it as Next in [CHANGELOG.md](CHANGELOG.md).
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
### 0.2.2 (12/03/2016)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Remove the line with "* Your contribution here.", since there will be no more contributions to this release.
|
|
29
|
-
|
|
30
|
-
Commit your changes.
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
git add CHANGELOG.md lib/toc/gem_version.rb
|
|
34
|
-
git commit -m "Preparing for release, 0.2.2."
|
|
35
|
-
git push origin master
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Release.
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
$ rake release
|
|
42
|
-
|
|
43
|
-
danger-toc 0.2.2 built to pkg/danger-toc-0.2.2.gem.
|
|
44
|
-
Tagged v0.2.2.
|
|
45
|
-
Pushed git commits and tags.
|
|
46
|
-
Pushed danger-toc 0.2.2 to rubygems.org.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Prepare for the Next Version
|
|
50
|
-
|
|
51
|
-
Add the next release to [CHANGELOG.md](CHANGELOG.md).
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
### 0.2.3 (Next)
|
|
55
|
-
|
|
56
|
-
* Your contribution here.
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Increment the third version number in [lib/toc/gem_version.rb](lib/toc/gem_version.rb).
|
|
60
|
-
|
|
61
|
-
Commit your changes.
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
git add CHANGELOG.md lib/toc/gem_version.rb
|
|
65
|
-
git commit -m "Preparing for next development iteration, 0.2.3."
|
|
66
|
-
git push origin master
|
|
67
|
-
```
|
data/Rakefile
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require 'bundler/gem_tasks'
|
|
2
|
-
require 'rspec/core/rake_task'
|
|
3
|
-
require 'rubocop/rake_task'
|
|
4
|
-
|
|
5
|
-
RSpec::Core::RakeTask.new(:specs)
|
|
6
|
-
|
|
7
|
-
task default: %i[rubocop specs]
|
|
8
|
-
|
|
9
|
-
task :spec do
|
|
10
|
-
Rake::Task['specs'].invoke
|
|
11
|
-
Rake::Task['rubocop'].invoke
|
|
12
|
-
Rake::Task['spec_docs'].invoke
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
desc 'Run RuboCop on the lib/specs directory'
|
|
16
|
-
RuboCop::RakeTask.new(:rubocop) do |task|
|
|
17
|
-
task.patterns = ['lib/**/*.rb', 'spec/**/*.rb']
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
desc 'Ensure that the plugin passes `danger plugins lint`'
|
|
21
|
-
task :spec_docs do
|
|
22
|
-
sh 'bundle exec danger plugins lint'
|
|
23
|
-
end
|
data/danger-toc.gemspec
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
lib = File.expand_path('lib', __dir__)
|
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
-
require 'toc/gem_version.rb'
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = 'danger-toc'
|
|
7
|
-
spec.version = Toc::VERSION
|
|
8
|
-
spec.authors = ['dblock']
|
|
9
|
-
spec.email = ['dblock@dblock.org']
|
|
10
|
-
spec.description = 'A danger.systems plugin for your markdown TOC.'
|
|
11
|
-
spec.summary = 'A danger.systems plugin for your markdown TOC.'
|
|
12
|
-
spec.homepage = 'https://github.com/dblock/danger-toc'
|
|
13
|
-
spec.license = 'MIT'
|
|
14
|
-
|
|
15
|
-
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
|
16
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
17
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
18
|
-
spec.require_paths = ['lib']
|
|
19
|
-
|
|
20
|
-
spec.add_dependency 'activesupport'
|
|
21
|
-
spec.add_dependency 'kramdown'
|
|
22
|
-
spec.add_runtime_dependency 'danger-plugin-api', '~> 1.0'
|
|
23
|
-
|
|
24
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
25
|
-
spec.add_development_dependency 'guard', '~> 2.14'
|
|
26
|
-
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
|
27
|
-
spec.add_development_dependency 'listen'
|
|
28
|
-
spec.add_development_dependency 'pry'
|
|
29
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
|
30
|
-
spec.add_development_dependency 'rspec', '~> 3.4'
|
|
31
|
-
spec.add_development_dependency 'rubocop', '0.58.2'
|
|
32
|
-
spec.add_development_dependency 'yard'
|
|
33
|
-
end
|
data/images/toc-missing.png
DELETED
|
Binary file
|