ruby-appraiser-rubocop 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -12,17 +12,19 @@ module RubyAppraiserRubocop
|
|
12
12
|
file_args = Shellwords::join(relevant_files)
|
13
13
|
file_args = '**/*.rb' if file_args.length > 250_000
|
14
14
|
|
15
|
-
rubocop_command = ['rubocop --emacs',
|
15
|
+
rubocop_command = ['rubocop --format emacs',
|
16
16
|
file_args].flatten.join(' ')
|
17
17
|
puts rubocop_command if @options[:verbose]
|
18
18
|
|
19
19
|
rubocop_output = IO.popen(rubocop_command) { |io| io.read }
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
file_line_desc_pattern = /^([^:]+):([0-9]+)(\:[0-9]+\:?)?(.*)/
|
22
|
+
rubocop_output.lines.each do |rubocop_output_line|
|
23
|
+
next unless rubocop_output_line.match(file_line_desc_pattern)
|
23
24
|
file = Regexp::last_match(1)
|
24
25
|
line = Regexp::last_match(2).to_i
|
25
|
-
|
26
|
+
# column = Regexp::last_match(3).to_i # currently throw-away :(
|
27
|
+
desc = Regexp::last_match(4).strip
|
26
28
|
add_defect(file, line, desc)
|
27
29
|
end
|
28
30
|
end
|
@@ -20,6 +20,6 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
21
|
gem.require_paths = ['lib']
|
22
22
|
|
23
|
-
gem.add_runtime_dependency 'rubocop'
|
24
|
-
gem.add_runtime_dependency 'ruby-appraiser'
|
23
|
+
gem.add_runtime_dependency 'rubocop', '~> 0.9'
|
24
|
+
gem.add_runtime_dependency 'ruby-appraiser', '~> 1.0', '>= 1.0.3'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-appraiser-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,40 +9,46 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubocop
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
21
|
+
version: '0.9'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
29
|
+
version: '0.9'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: ruby-appraiser
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.0'
|
35
38
|
- - ! '>='
|
36
39
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
40
|
+
version: 1.0.3
|
38
41
|
type: :runtime
|
39
42
|
prerelease: false
|
40
43
|
version_requirements: !ruby/object:Gem::Requirement
|
41
44
|
none: false
|
42
45
|
requirements:
|
46
|
+
- - ~>
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.0'
|
43
49
|
- - ! '>='
|
44
50
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
51
|
+
version: 1.0.3
|
46
52
|
description: Rubocop adapter for ruby-appraiser
|
47
53
|
email:
|
48
54
|
- ryan@simplymeasured.com
|