danger-rubocop 0.9.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +70 -62
- data/README.md +10 -3
- data/danger-rubocop.gemspec +1 -1
- data/lib/danger_plugin.rb +16 -6
- data/lib/version.rb +1 -1
- data/spec/danger_plugin_spec.rb +50 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14d031b9e478c7bff00e541dd0637352a01888939c18ddf48a738525f0954b08
|
4
|
+
data.tar.gz: 4894183f30dbfc5a1b615d93e6361a7ed1f3b828a86a67e0f47abfd2e1dd8f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a34d01243770479c10ce9442655cd00b53ad8cceb3b832afd6ff081de84bb817a0996a083098909da41089de3b63af11eeaba51b6ab81ff075ed5a86fb7afd
|
7
|
+
data.tar.gz: c7e02e4b2389c7d35c33f93b9175a30d9a4ab05a7636e4bf80cd4851e164e039130af6abbd360778ff35ce638492a88cb5742c9ccb0b8cce47ec36e115f5a5e2
|
data/Gemfile.lock
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-rubocop (0.
|
4
|
+
danger-rubocop (0.9.5)
|
5
5
|
danger
|
6
|
-
rubocop
|
6
|
+
rubocop (~> 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
addressable (2.7.0)
|
12
12
|
public_suffix (>= 2.0.2, < 5.0)
|
13
|
-
ast (2.4.
|
13
|
+
ast (2.4.2)
|
14
14
|
bacon (1.2.0)
|
15
15
|
claide (1.0.3)
|
16
16
|
claide-plugins (0.9.2)
|
17
17
|
cork
|
18
18
|
nap
|
19
19
|
open4 (~> 1.3)
|
20
|
-
coderay (1.1.
|
20
|
+
coderay (1.1.3)
|
21
21
|
colored2 (3.1.2)
|
22
22
|
cork (0.3.0)
|
23
23
|
colored2 (~> 3.1)
|
24
|
-
danger (8.
|
24
|
+
danger (8.2.3)
|
25
25
|
claide (~> 1.0)
|
26
26
|
claide-plugins (>= 0.9.2)
|
27
27
|
colored2 (~> 3.1)
|
@@ -29,112 +29,120 @@ GEM
|
|
29
29
|
faraday (>= 0.9.0, < 2.0)
|
30
30
|
faraday-http-cache (~> 2.0)
|
31
31
|
git (~> 1.7)
|
32
|
-
kramdown (~> 2.
|
32
|
+
kramdown (~> 2.3)
|
33
33
|
kramdown-parser-gfm (~> 1.0)
|
34
34
|
no_proxy_fix
|
35
35
|
octokit (~> 4.7)
|
36
|
-
terminal-table (
|
37
|
-
diff-lcs (1.
|
38
|
-
faraday (1.
|
36
|
+
terminal-table (>= 1, < 4)
|
37
|
+
diff-lcs (1.4.4)
|
38
|
+
faraday (1.4.2)
|
39
|
+
faraday-em_http (~> 1.0)
|
40
|
+
faraday-em_synchrony (~> 1.0)
|
41
|
+
faraday-excon (~> 1.1)
|
42
|
+
faraday-net_http (~> 1.0)
|
43
|
+
faraday-net_http_persistent (~> 1.1)
|
39
44
|
multipart-post (>= 1.2, < 3)
|
45
|
+
ruby2_keywords (>= 0.0.4)
|
46
|
+
faraday-em_http (1.0.0)
|
47
|
+
faraday-em_synchrony (1.0.0)
|
48
|
+
faraday-excon (1.1.0)
|
40
49
|
faraday-http-cache (2.2.0)
|
41
50
|
faraday (>= 0.8)
|
42
|
-
|
51
|
+
faraday-net_http (1.0.1)
|
52
|
+
faraday-net_http_persistent (1.1.0)
|
53
|
+
ffi (1.15.0)
|
43
54
|
formatador (0.2.5)
|
44
|
-
git (1.
|
55
|
+
git (1.8.1)
|
45
56
|
rchardet (~> 1.8)
|
46
|
-
guard (2.
|
57
|
+
guard (2.16.2)
|
47
58
|
formatador (>= 0.2.4)
|
48
59
|
listen (>= 2.7, < 4.0)
|
49
|
-
lumberjack (
|
60
|
+
lumberjack (>= 1.0.12, < 2.0)
|
50
61
|
nenv (~> 0.1)
|
51
62
|
notiffany (~> 0.0)
|
52
63
|
pry (>= 0.9.12)
|
53
64
|
shellany (~> 0.0)
|
54
65
|
thor (>= 0.18.1)
|
55
66
|
guard-compat (1.2.1)
|
56
|
-
guard-rspec (4.7.
|
67
|
+
guard-rspec (4.7.3)
|
57
68
|
guard (~> 2.1)
|
58
69
|
guard-compat (~> 1.1)
|
59
70
|
rspec (>= 2.99.0, < 4.0)
|
60
|
-
kramdown (2.3.
|
71
|
+
kramdown (2.3.1)
|
61
72
|
rexml
|
62
73
|
kramdown-parser-gfm (1.1.0)
|
63
74
|
kramdown (~> 2.0)
|
64
75
|
listen (3.0.7)
|
65
76
|
rb-fsevent (>= 0.9.3)
|
66
77
|
rb-inotify (>= 0.9.7)
|
67
|
-
lumberjack (1.
|
68
|
-
|
69
|
-
|
70
|
-
mocha (
|
71
|
-
metaclass (~> 0.0.1)
|
72
|
-
mocha-on-bacon (0.2.2)
|
78
|
+
lumberjack (1.2.8)
|
79
|
+
method_source (1.0.0)
|
80
|
+
mocha (1.12.0)
|
81
|
+
mocha-on-bacon (0.2.3)
|
73
82
|
mocha (>= 0.13.0)
|
74
83
|
multipart-post (2.1.1)
|
75
84
|
nap (1.1.0)
|
76
85
|
nenv (0.3.0)
|
77
86
|
no_proxy_fix (0.1.2)
|
78
|
-
notiffany (0.1.
|
87
|
+
notiffany (0.1.3)
|
79
88
|
nenv (~> 0.1)
|
80
89
|
shellany (~> 0.0)
|
81
|
-
octokit (4.
|
90
|
+
octokit (4.21.0)
|
82
91
|
faraday (>= 0.9)
|
83
92
|
sawyer (~> 0.8.0, >= 0.5.3)
|
84
93
|
open4 (1.3.4)
|
85
|
-
parallel (1.
|
86
|
-
parser (
|
87
|
-
ast (~> 2.4.
|
94
|
+
parallel (1.20.1)
|
95
|
+
parser (3.0.1.1)
|
96
|
+
ast (~> 2.4.1)
|
88
97
|
prettybacon (0.0.2)
|
89
98
|
bacon (~> 1.2)
|
90
|
-
pry (0.
|
91
|
-
coderay (~> 1.1
|
92
|
-
method_source (~> 0
|
93
|
-
|
94
|
-
public_suffix (4.0.5)
|
99
|
+
pry (0.14.1)
|
100
|
+
coderay (~> 1.1)
|
101
|
+
method_source (~> 1.0)
|
102
|
+
public_suffix (4.0.6)
|
95
103
|
rainbow (3.0.0)
|
96
|
-
rake (13.0.
|
97
|
-
rb-fsevent (0.
|
98
|
-
rb-inotify (0.
|
99
|
-
ffi (
|
104
|
+
rake (13.0.3)
|
105
|
+
rb-fsevent (0.10.4)
|
106
|
+
rb-inotify (0.10.1)
|
107
|
+
ffi (~> 1.0)
|
100
108
|
rchardet (1.8.0)
|
101
|
-
regexp_parser (1.
|
102
|
-
rexml (3.2.
|
103
|
-
rspec (3.
|
104
|
-
rspec-core (~> 3.
|
105
|
-
rspec-expectations (~> 3.
|
106
|
-
rspec-mocks (~> 3.
|
107
|
-
rspec-core (3.
|
108
|
-
rspec-support (~> 3.
|
109
|
-
rspec-expectations (3.
|
109
|
+
regexp_parser (2.1.1)
|
110
|
+
rexml (3.2.5)
|
111
|
+
rspec (3.10.0)
|
112
|
+
rspec-core (~> 3.10.0)
|
113
|
+
rspec-expectations (~> 3.10.0)
|
114
|
+
rspec-mocks (~> 3.10.0)
|
115
|
+
rspec-core (3.10.1)
|
116
|
+
rspec-support (~> 3.10.0)
|
117
|
+
rspec-expectations (3.10.1)
|
110
118
|
diff-lcs (>= 1.2.0, < 2.0)
|
111
|
-
rspec-support (~> 3.
|
112
|
-
rspec-mocks (3.
|
119
|
+
rspec-support (~> 3.10.0)
|
120
|
+
rspec-mocks (3.10.2)
|
113
121
|
diff-lcs (>= 1.2.0, < 2.0)
|
114
|
-
rspec-support (~> 3.
|
115
|
-
rspec-support (3.
|
116
|
-
rubocop (
|
122
|
+
rspec-support (~> 3.10.0)
|
123
|
+
rspec-support (3.10.2)
|
124
|
+
rubocop (1.16.0)
|
117
125
|
parallel (~> 1.10)
|
118
|
-
parser (>=
|
126
|
+
parser (>= 3.0.0.0)
|
119
127
|
rainbow (>= 2.2.2, < 4.0)
|
120
|
-
regexp_parser (>= 1.
|
128
|
+
regexp_parser (>= 1.8, < 3.0)
|
121
129
|
rexml
|
122
|
-
rubocop-ast (>= 0.0
|
130
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
123
131
|
ruby-progressbar (~> 1.7)
|
124
|
-
unicode-display_width (>= 1.4.0, <
|
125
|
-
rubocop-ast (
|
126
|
-
parser (>=
|
127
|
-
ruby-progressbar (1.
|
132
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
133
|
+
rubocop-ast (1.7.0)
|
134
|
+
parser (>= 3.0.1.1)
|
135
|
+
ruby-progressbar (1.11.0)
|
136
|
+
ruby2_keywords (0.0.4)
|
128
137
|
sawyer (0.8.2)
|
129
138
|
addressable (>= 2.3.5)
|
130
139
|
faraday (> 0.8, < 2.0)
|
131
140
|
shellany (0.0.1)
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
yard (0.9.20)
|
141
|
+
terminal-table (3.0.1)
|
142
|
+
unicode-display_width (>= 1.1.1, < 3)
|
143
|
+
thor (1.1.0)
|
144
|
+
unicode-display_width (2.0.0)
|
145
|
+
yard (0.9.26)
|
138
146
|
|
139
147
|
PLATFORMS
|
140
148
|
ruby
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Danger Rubocop
|
4
4
|
|
5
|
-
A [Danger](https://github.com/danger/danger) plugin for [Rubocop](https://github.com/bbatsov/rubocop).
|
5
|
+
A [Danger](https://github.com/danger/danger) plugin for [Rubocop](https://github.com/bbatsov/rubocop) (and compatible wrappers such as [Standard](https://github.com/testdouble/standard/)).
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -37,6 +37,12 @@ github.dismiss_out_of_range_messages
|
|
37
37
|
rubocop.lint inline_comment: true
|
38
38
|
```
|
39
39
|
|
40
|
+
> Format using `standardrb` instead of Rubocop
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
rubocop.lint rubocop_cmd: 'standardrb'
|
44
|
+
```
|
45
|
+
|
40
46
|
#### Methods
|
41
47
|
|
42
48
|
`lint(config: Hash)`
|
@@ -46,10 +52,10 @@ Runs Ruby files through Rubocop. Generates a `markdown` list of warnings.
|
|
46
52
|
This method accepts a configuration hash.
|
47
53
|
The following keys are supported:
|
48
54
|
|
49
|
-
* `files`: array of file names or glob patterns to determine files to lint
|
55
|
+
* `files`: array of file names or glob patterns to determine files to lint. If omitted, this will lint only the files changed in the pull request. To lint all files every time, pass an empty string; this is the equivalent of typing `rubocop` without specifying any files, and will follow the rules in your `.rubocop.yml`.
|
50
56
|
* `force_exclusion`: pass `true` to pass `--force-exclusion` argument to Rubocop.
|
51
57
|
(this option will instruct rubocop to ignore the files that your rubocop config ignores,
|
52
|
-
despite the plugin providing the list of files
|
58
|
+
despite the plugin providing the list of files explicitly)
|
53
59
|
* `inline_comment`: pass `true` to comment inline of the diffs.
|
54
60
|
* `fail_on_inline_comment`: pass `true` to use `fail` instead of `warn` on inline comment.
|
55
61
|
* `report_danger`: pass true to report errors to Danger, and break CI.
|
@@ -57,6 +63,7 @@ The following keys are supported:
|
|
57
63
|
* `only_report_new_offenses`: pass `true` to only report offenses that are in current user's scope.
|
58
64
|
Note that this won't mark offenses for _Metrics/XXXLength_ if you add lines to an already existing scope.
|
59
65
|
* `include_cop_names`: Prepends cop names to the output messages. Example: "Layout/EmptyLinesAroundBlockBody: Extra empty line detected at block body end."
|
66
|
+
* `rubocop_cmd`: Allows you to change the rubocop executable that's invoked. This is used to support rubocop wrappers like [Standard](https://github.com/testdouble/standard/) by passing `standardrb` as the value.
|
60
67
|
|
61
68
|
|
62
69
|
Passing `files` as only argument is also supported for backward compatibility.
|
data/danger-rubocop.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
20
|
spec.add_dependency 'danger'
|
21
|
-
spec.add_dependency 'rubocop', '~> 0
|
21
|
+
spec.add_dependency 'rubocop', '~> 1.0'
|
22
22
|
|
23
23
|
# General ruby development
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
data/lib/danger_plugin.rb
CHANGED
@@ -36,9 +36,10 @@ module Danger
|
|
36
36
|
inline_comment = config[:inline_comment] || false
|
37
37
|
fail_on_inline_comment = config[:fail_on_inline_comment] || false
|
38
38
|
include_cop_names = config[:include_cop_names] || false
|
39
|
+
rubocop_cmd = config[:rubocop_cmd] || 'rubocop'
|
39
40
|
|
40
41
|
files_to_lint = fetch_files_to_lint(files)
|
41
|
-
files_to_report = rubocop(files_to_lint, force_exclusion, only_report_new_offenses, config_path: config_path)
|
42
|
+
files_to_report = rubocop(files_to_lint, force_exclusion, only_report_new_offenses, cmd: rubocop_cmd, config_path: config_path)
|
42
43
|
|
43
44
|
return if files_to_report.empty?
|
44
45
|
return report_failures files_to_report if report_danger
|
@@ -52,8 +53,8 @@ module Danger
|
|
52
53
|
|
53
54
|
private
|
54
55
|
|
55
|
-
def rubocop(files_to_lint, force_exclusion, only_report_new_offenses, config_path: nil)
|
56
|
-
base_command = [
|
56
|
+
def rubocop(files_to_lint, force_exclusion, only_report_new_offenses, cmd: 'rubocop', config_path: nil)
|
57
|
+
base_command = [cmd, '-f', 'json', '--only-recognized-file-types']
|
57
58
|
base_command.concat(['--force-exclusion']) if force_exclusion
|
58
59
|
base_command.concat(['--config', config_path.shellescape]) unless config_path.nil?
|
59
60
|
|
@@ -78,14 +79,17 @@ module Danger
|
|
78
79
|
end
|
79
80
|
|
80
81
|
def added_lines(path)
|
81
|
-
git.diff_for_file(path)
|
82
|
+
diff_for_file = git.diff_for_file(path)
|
83
|
+
return [] if diff_for_file.nil?
|
84
|
+
|
85
|
+
diff_for_file
|
82
86
|
.patch
|
83
87
|
.split("\n@@")
|
84
88
|
.tap(&:shift)
|
85
89
|
.flat_map do |chunk|
|
86
90
|
first_line, *diff = chunk.split("\n")
|
87
91
|
# Get start from diff.
|
88
|
-
lineno = first_line.match(/\+(\d+)
|
92
|
+
lineno = first_line.match(/\+(\d+),?(\d?)/).captures.first.to_i
|
89
93
|
diff.each_with_object([]) do |current_line, added_lines|
|
90
94
|
added_lines << lineno if current_line.start_with?('+')
|
91
95
|
lineno += 1 unless current_line.start_with?('-')
|
@@ -142,7 +146,13 @@ module Danger
|
|
142
146
|
end
|
143
147
|
|
144
148
|
def fetch_files_to_lint(files = nil)
|
145
|
-
to_lint =
|
149
|
+
to_lint = if files.nil?
|
150
|
+
# when files are renamed, git.modified_files contains the old name not the new one, so we need to do the convertion
|
151
|
+
renaming_map = (git.renamed_files || []).map { |e| [e[:before], e[:after]] }.to_h
|
152
|
+
(git.modified_files.map { |f| renaming_map[f] || f }) + git.added_files
|
153
|
+
else
|
154
|
+
Dir.glob(files)
|
155
|
+
end
|
146
156
|
Shellwords.join(to_lint)
|
147
157
|
end
|
148
158
|
end
|
data/lib/version.rb
CHANGED
data/spec/danger_plugin_spec.rb
CHANGED
@@ -107,6 +107,36 @@ module Danger
|
|
107
107
|
it 'handles git diff' do
|
108
108
|
expect(@rubocop.send(:added_lines, 'SAMPLE')).to eq([1, 2])
|
109
109
|
end
|
110
|
+
|
111
|
+
context "single line added to a new file" do
|
112
|
+
before do
|
113
|
+
allow(@rubocop.git).to receive(:diff_for_file).with('SAMPLE') do
|
114
|
+
instance_double('Git::Diff::DiffFile', patch: <<~DIFF)
|
115
|
+
diff --git a/SAMPLE b/SAMPLE
|
116
|
+
new file mode 100644
|
117
|
+
index 0000000..7bba8c8
|
118
|
+
--- /dev/null
|
119
|
+
+++ b/SAMPLE
|
120
|
+
@@ -0,0 +1 @@
|
121
|
+
+line 1
|
122
|
+
DIFF
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
it 'handles git diff' do
|
127
|
+
expect(@rubocop.send(:added_lines, 'SAMPLE')).to eq([1])
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
context 'no such file' do
|
132
|
+
before do
|
133
|
+
allow(@rubocop.git).to receive(:diff_for_file).with('SAMPLE').and_return(nil)
|
134
|
+
end
|
135
|
+
|
136
|
+
it 'return empty array' do
|
137
|
+
expect(@rubocop.send(:added_lines, 'SAMPLE')).to eq([])
|
138
|
+
end
|
139
|
+
end
|
110
140
|
end
|
111
141
|
|
112
142
|
describe :lint_files do
|
@@ -211,10 +241,12 @@ module Danger
|
|
211
241
|
it 'handles a rubocop report for files changed in the PR' do
|
212
242
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
213
243
|
allow(@rubocop.git).to receive(:modified_files)
|
214
|
-
.and_return(["spec/fixtures/another_ruby_file.rb"])
|
244
|
+
.and_return(["spec/fixtures/old_file_name.rb", "spec/fixtures/another_ruby_file.rb"])
|
245
|
+
allow(@rubocop.git).to receive(:renamed_files)
|
246
|
+
.and_return([{before: "spec/fixtures/old_file_name.rb", after: "spec/fixtures/new_file_name.rb"}])
|
215
247
|
|
216
248
|
allow(@rubocop).to receive(:`)
|
217
|
-
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/another_ruby_file.rb')
|
249
|
+
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/new_file_name.rb spec/fixtures/another_ruby_file.rb')
|
218
250
|
.and_return(response_another_ruby_file)
|
219
251
|
|
220
252
|
@rubocop.lint
|
@@ -229,6 +261,7 @@ module Danger
|
|
229
261
|
allow(@rubocop.git).to receive(:modified_files)
|
230
262
|
.and_return(['spec/fixtures/ruby_file.rb'])
|
231
263
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
264
|
+
allow(@rubocop.git).to receive(:renamed_files).and_return([])
|
232
265
|
allow(@rubocop).to receive(:`)
|
233
266
|
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/ruby_file.rb')
|
234
267
|
.and_return(response_ruby_file)
|
@@ -251,6 +284,7 @@ EOS
|
|
251
284
|
allow(@rubocop.git).to receive(:modified_files)
|
252
285
|
.and_return(['spec/fixtures/ruby_file.rb'])
|
253
286
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
287
|
+
allow(@rubocop.git).to receive(:renamed_files).and_return([])
|
254
288
|
allow(@rubocop).to receive(:`)
|
255
289
|
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/ruby_file.rb')
|
256
290
|
.and_return(response_ruby_file)
|
@@ -267,6 +301,7 @@ EOS
|
|
267
301
|
allow(@rubocop.git).to receive(:modified_files)
|
268
302
|
.and_return(['spec/fixtures/ruby_file.rb'])
|
269
303
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
304
|
+
allow(@rubocop.git).to receive(:renamed_files).and_return([])
|
270
305
|
allow(@rubocop).to receive(:`)
|
271
306
|
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/ruby_file.rb')
|
272
307
|
.and_return(response_ruby_file)
|
@@ -277,6 +312,17 @@ EOS
|
|
277
312
|
.to eq("Violation Don't do that! { sticky: false, file: spec/fixtures/ruby_file.rb, line: 13, type: error }")
|
278
313
|
end
|
279
314
|
end
|
315
|
+
|
316
|
+
context 'using standardrb cmd' do
|
317
|
+
it 'executes using the standardrb cmd' do
|
318
|
+
allow(@rubocop).to receive(:`)
|
319
|
+
.with('bundle exec standardrb -f json --only-recognized-file-types --config path/to/rubocop.yml spec/fixtures/ruby_file.rb')
|
320
|
+
.and_return(response_ruby_file)
|
321
|
+
|
322
|
+
# Do it
|
323
|
+
@rubocop.lint(files: 'spec/fixtures/ruby*.rb', rubocop_cmd: 'standardrb', config: 'path/to/rubocop.yml')
|
324
|
+
end
|
325
|
+
end
|
280
326
|
end
|
281
327
|
|
282
328
|
describe 'a filename with special characters' do
|
@@ -289,6 +335,7 @@ EOS
|
|
289
335
|
allow(@rubocop.git).to receive(:modified_files)
|
290
336
|
.and_return(modified_files)
|
291
337
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
338
|
+
allow(@rubocop.git).to receive(:renamed_files).and_return([])
|
292
339
|
|
293
340
|
expect { @rubocop.lint }.not_to raise_error
|
294
341
|
end
|
@@ -300,6 +347,7 @@ EOS
|
|
300
347
|
allow(@rubocop.git).to receive(:modified_files)
|
301
348
|
.and_return(['spec/fixtures/ruby_file.rb'])
|
302
349
|
allow(@rubocop.git).to receive(:added_files).and_return([])
|
350
|
+
allow(@rubocop.git).to receive(:renamed_files).and_return([])
|
303
351
|
allow(@rubocop).to receive(:`)
|
304
352
|
.with('bundle exec rubocop -f json --only-recognized-file-types spec/fixtures/ruby_file.rb')
|
305
353
|
.and_return(response_ruby_file)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ash Furrow
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -177,7 +177,7 @@ homepage: https://github.com/ashfurrow/danger-rubocop
|
|
177
177
|
licenses:
|
178
178
|
- MIT
|
179
179
|
metadata: {}
|
180
|
-
post_install_message:
|
180
|
+
post_install_message:
|
181
181
|
rdoc_options: []
|
182
182
|
require_paths:
|
183
183
|
- lib
|
@@ -192,8 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.0.
|
196
|
-
signing_key:
|
195
|
+
rubygems_version: 3.0.2
|
196
|
+
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: A Danger plugin for running Ruby files through Rubocop.
|
199
199
|
test_files:
|