danger-wcc 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.rubocop.yml +24 -17
- data/README.md +2 -0
- data/danger-wcc.gemspec +4 -4
- data/lib/version.rb +1 -1
- data/lib/wcc/commit_lint.rb +2 -1
- data/lib/wcc/commit_lint/commit_check.rb +0 -1
- data/lib/wcc/commit_lint/empty_line_check.rb +0 -1
- data/lib/wcc/commit_lint/subject_cap_check.rb +0 -1
- data/lib/wcc/commit_lint/subject_length_check.rb +0 -1
- data/lib/wcc/commit_lint/subject_period_check.rb +0 -1
- data/lib/wcc/commit_lint/subject_words_check.rb +0 -1
- data/lib/wcc/defaults.reek +8 -8
- data/lib/wcc/dependencies.rb +74 -0
- data/lib/wcc/dependencies/yarn_info.rb +83 -0
- data/lib/wcc/jshint.rb +2 -2
- data/lib/wcc/plugin.rb +21 -11
- data/lib/wcc/reek.rb +2 -2
- data/lib/wcc/rubocop_exceptions.rb +13 -8
- data/lib/wcc/todos.rb +5 -4
- data/lib/wcc/utils.rb +17 -5
- data/spec/fixtures/dependencies/package.json +112 -0
- data/spec/fixtures/dependencies/package.json.diff +28 -0
- data/spec/fixtures/dependencies/package.json_patch_bumps_minor.diff +13 -0
- data/spec/fixtures/dependencies/package.json_patch_bumps_minor.json +112 -0
- data/spec/fixtures/dependencies/yarn.lock +19609 -0
- data/spec/fixtures/dependencies/yarn.lock_patch_bumps_minor.lock +19614 -0
- data/spec/fixtures/dependencies/yarn_minor_version.diff +33 -0
- data/spec/fixtures/dependencies/yarn_minor_version.txt +1151 -0
- data/spec/fixtures/dependencies/yarn_old.txt +1152 -0
- data/spec/fixtures/dependencies/yarn_patch_bumps_minor.diff +28 -0
- data/spec/fixtures/exception_inline_disabled_rule.diff +12 -0
- data/spec/fixtures/rubocop_exception.rb +3 -0
- data/spec/fixtures_helper.rb +0 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/wcc/commit_lint_spec.rb +6 -10
- data/spec/wcc/dependencies_spec.rb +95 -0
- data/spec/wcc/github_spec.rb +13 -7
- data/spec/wcc/jshint_spec.rb +1 -1
- data/spec/wcc/plugin_spec.rb +18 -17
- data/spec/wcc/reek_spec.rb +1 -1
- data/spec/wcc/rubocop_exceptions_spec.rb +34 -15
- data/spec/wcc/todos_spec.rb +10 -10
- data/spec/wcc/utils_spec.rb +2 -2
- data/spec/wcc_spec.rb +1 -1
- metadata +49 -9
data/spec/wcc/todos_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require File.expand_path('
|
3
|
+
require File.expand_path('../spec_helper', __dir__)
|
4
4
|
|
5
5
|
module Danger
|
6
6
|
describe Danger::DangerWCC do
|
@@ -27,9 +27,9 @@ module Danger
|
|
27
27
|
.to eq([Violation.new('TODO added in '\
|
28
28
|
'<a href="github_html_link">spec/fixtures/todo.rb</a>'\
|
29
29
|
' - is there a card associated with that?',
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
false,
|
31
|
+
'spec/fixtures/todo.rb',
|
32
|
+
9)])
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'Does not warn when TODO removed' do
|
@@ -68,9 +68,9 @@ module Danger
|
|
68
68
|
'<a href="github_html_link">spec/fixtures/todo.rb</a> '\
|
69
69
|
'referencing [https://zube.io/watermark/asdf1234]'\
|
70
70
|
'(https://zube.io/watermark/asdf1234)',
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
false,
|
72
|
+
'spec/fixtures/todo.rb',
|
73
|
+
13)])
|
74
74
|
end
|
75
75
|
|
76
76
|
it 'Sends message when todo below link' do
|
@@ -87,9 +87,9 @@ module Danger
|
|
87
87
|
'<a href="github_html_link">spec/fixtures/todo.rb</a> '\
|
88
88
|
'referencing [https://www.github.com/watermarkchurch/asdf/1234]'\
|
89
89
|
'(https://www.github.com/watermarkchurch/asdf/1234)',
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
false,
|
91
|
+
'spec/fixtures/todo.rb',
|
92
|
+
18)])
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|
data/spec/wcc/utils_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require File.expand_path('
|
3
|
+
require File.expand_path('../spec_helper', __dir__)
|
4
4
|
|
5
5
|
module Danger
|
6
6
|
describe Danger::DangerWCC do
|
@@ -50,7 +50,7 @@ module Danger
|
|
50
50
|
[
|
51
51
|
load_diff('spec/fixtures/todo.rb', 'no_todo'),
|
52
52
|
load_diff('spec/fixtures/find_in_diff.rb',
|
53
|
-
|
53
|
+
'find_in_diff_2_chunks')
|
54
54
|
]
|
55
55
|
)
|
56
56
|
|
data/spec/wcc_spec.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-wcc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: brakeman
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +72,14 @@ dependencies:
|
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
75
|
+
version: '0.4'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
82
|
+
version: '0.4'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: reek
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,16 +168,16 @@ dependencies:
|
|
154
168
|
name: rubocop
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - "
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
173
|
+
version: '0.81'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - "
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
180
|
+
version: '0.81'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: yard
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,6 +293,8 @@ files:
|
|
279
293
|
- lib/wcc/commit_lint/subject_words_check.rb
|
280
294
|
- lib/wcc/default.jshintrc
|
281
295
|
- lib/wcc/defaults.reek
|
296
|
+
- lib/wcc/dependencies.rb
|
297
|
+
- lib/wcc/dependencies/yarn_info.rb
|
282
298
|
- lib/wcc/github.rb
|
283
299
|
- lib/wcc/jshint.rb
|
284
300
|
- lib/wcc/plugin.rb
|
@@ -290,7 +306,18 @@ files:
|
|
290
306
|
- spec/fixtures/brakeman/b.tmp
|
291
307
|
- spec/fixtures/brakeman/brakeman.diff
|
292
308
|
- spec/fixtures/brakeman/brakeman.out
|
309
|
+
- spec/fixtures/dependencies/package.json
|
310
|
+
- spec/fixtures/dependencies/package.json.diff
|
311
|
+
- spec/fixtures/dependencies/package.json_patch_bumps_minor.diff
|
312
|
+
- spec/fixtures/dependencies/package.json_patch_bumps_minor.json
|
313
|
+
- spec/fixtures/dependencies/yarn.lock
|
314
|
+
- spec/fixtures/dependencies/yarn.lock_patch_bumps_minor.lock
|
315
|
+
- spec/fixtures/dependencies/yarn_minor_version.diff
|
316
|
+
- spec/fixtures/dependencies/yarn_minor_version.txt
|
317
|
+
- spec/fixtures/dependencies/yarn_old.txt
|
318
|
+
- spec/fixtures/dependencies/yarn_patch_bumps_minor.diff
|
293
319
|
- spec/fixtures/exception_context.diff
|
320
|
+
- spec/fixtures/exception_inline_disabled_rule.diff
|
294
321
|
- spec/fixtures/exception_insert_context.diff
|
295
322
|
- spec/fixtures/exception_misspelled.diff
|
296
323
|
- spec/fixtures/exception_multiline_context.diff
|
@@ -318,6 +345,7 @@ files:
|
|
318
345
|
- spec/fixtures_helper.rb
|
319
346
|
- spec/spec_helper.rb
|
320
347
|
- spec/wcc/commit_lint_spec.rb
|
348
|
+
- spec/wcc/dependencies_spec.rb
|
321
349
|
- spec/wcc/github_spec.rb
|
322
350
|
- spec/wcc/jshint_spec.rb
|
323
351
|
- spec/wcc/plugin_spec.rb
|
@@ -346,7 +374,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
346
374
|
version: '0'
|
347
375
|
requirements: []
|
348
376
|
rubyforge_project:
|
349
|
-
rubygems_version: 2.
|
377
|
+
rubygems_version: 2.5.2
|
350
378
|
signing_key:
|
351
379
|
specification_version: 4
|
352
380
|
summary: A Danger plugin for Watermark Church custom rules.
|
@@ -355,7 +383,18 @@ test_files:
|
|
355
383
|
- spec/fixtures/brakeman/b.tmp
|
356
384
|
- spec/fixtures/brakeman/brakeman.diff
|
357
385
|
- spec/fixtures/brakeman/brakeman.out
|
386
|
+
- spec/fixtures/dependencies/package.json
|
387
|
+
- spec/fixtures/dependencies/package.json.diff
|
388
|
+
- spec/fixtures/dependencies/package.json_patch_bumps_minor.diff
|
389
|
+
- spec/fixtures/dependencies/package.json_patch_bumps_minor.json
|
390
|
+
- spec/fixtures/dependencies/yarn.lock
|
391
|
+
- spec/fixtures/dependencies/yarn.lock_patch_bumps_minor.lock
|
392
|
+
- spec/fixtures/dependencies/yarn_minor_version.diff
|
393
|
+
- spec/fixtures/dependencies/yarn_minor_version.txt
|
394
|
+
- spec/fixtures/dependencies/yarn_old.txt
|
395
|
+
- spec/fixtures/dependencies/yarn_patch_bumps_minor.diff
|
358
396
|
- spec/fixtures/exception_context.diff
|
397
|
+
- spec/fixtures/exception_inline_disabled_rule.diff
|
359
398
|
- spec/fixtures/exception_insert_context.diff
|
360
399
|
- spec/fixtures/exception_misspelled.diff
|
361
400
|
- spec/fixtures/exception_multiline_context.diff
|
@@ -383,6 +422,7 @@ test_files:
|
|
383
422
|
- spec/fixtures_helper.rb
|
384
423
|
- spec/spec_helper.rb
|
385
424
|
- spec/wcc/commit_lint_spec.rb
|
425
|
+
- spec/wcc/dependencies_spec.rb
|
386
426
|
- spec/wcc/github_spec.rb
|
387
427
|
- spec/wcc/jshint_spec.rb
|
388
428
|
- spec/wcc/plugin_spec.rb
|