pronto-rubocop 0.5.3 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +1 -1
- data/README.md +1 -0
- data/lib/pronto/rubocop.rb +9 -6
- data/lib/pronto/rubocop/version.rb +1 -1
- data/pronto-rubocop.gemspec +6 -6
- metadata +19 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6213d26b3332b2dfebd43d4ee54afd1f8bd06de03ee73526216ba50ca75fcaf1
|
4
|
+
data.tar.gz: a3426fcfdc4265953fcae3008489dbcd1d619ccc8e0471f566117ddad3c2e7cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eae06e126fb1c8b181a2e0e87d21ff25a65f89dc06d84d4b2d405a6ade8f557d16c8fbe642457cea5dd2093d4e7617f42c24f2839725744357f8ba76fd11e09f
|
7
|
+
data.tar.gz: b901eb7b9ad51b67bee5606bc5b7e5943c11b22686ba06a4fbf5d4a45ea3850e100e26ba2705962bc0880e94190d571cb5f9f9770218dd1830d3e13a8d51859a
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -10,3 +10,4 @@ Pronto runner for [Rubocop](https://github.com/bbatsov/rubocop), ruby code analy
|
|
10
10
|
## Configuration
|
11
11
|
|
12
12
|
Configuring Rubocop via .rubocop.yml will work just fine with pronto-rubocop.
|
13
|
+
You can also specify a custom `.rubocop.yml` location with the environment variable `RUBOCOP_CONFIG`
|
data/lib/pronto/rubocop.rb
CHANGED
@@ -3,15 +3,18 @@ require 'rubocop'
|
|
3
3
|
|
4
4
|
module Pronto
|
5
5
|
class Rubocop < Runner
|
6
|
-
def initialize
|
6
|
+
def initialize(_, _ = nil)
|
7
|
+
super
|
8
|
+
|
7
9
|
@config_store = ::RuboCop::ConfigStore.new
|
10
|
+
@config_store.options_config = ENV['RUBOCOP_CONFIG'] if ENV['RUBOCOP_CONFIG']
|
8
11
|
@inspector = ::RuboCop::Runner.new({}, @config_store)
|
9
12
|
end
|
10
13
|
|
11
|
-
def run
|
12
|
-
return [] unless patches
|
14
|
+
def run
|
15
|
+
return [] unless @patches
|
13
16
|
|
14
|
-
patches.select { |patch| valid_patch?(patch) }
|
17
|
+
@patches.select { |patch| valid_patch?(patch) }
|
15
18
|
.map { |patch| inspect(patch) }
|
16
19
|
.flatten.compact
|
17
20
|
end
|
@@ -43,7 +46,7 @@ module Pronto
|
|
43
46
|
path = line.patch.delta.new_file[:path]
|
44
47
|
level = level(offence.severity.name)
|
45
48
|
|
46
|
-
Message.new(path, line, level, offence.message)
|
49
|
+
Message.new(path, line, level, offence.message, nil, self.class)
|
47
50
|
end
|
48
51
|
|
49
52
|
def config_store_for(patch)
|
@@ -59,7 +62,7 @@ module Pronto
|
|
59
62
|
def level(severity)
|
60
63
|
case severity
|
61
64
|
when :refactor, :convention
|
62
|
-
:
|
65
|
+
:warning
|
63
66
|
when :warning, :error, :fatal
|
64
67
|
severity
|
65
68
|
end
|
data/pronto-rubocop.gemspec
CHANGED
@@ -10,11 +10,11 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.author = 'Mindaugas Mozūras'
|
12
12
|
s.email = 'mindaugas.mozuras@gmail.com'
|
13
|
-
s.homepage = 'http://github.
|
13
|
+
s.homepage = 'http://github.com/mmozuras/pronto-rubocop'
|
14
14
|
s.summary = 'Pronto runner for Rubocop, ruby code analyzer'
|
15
15
|
|
16
16
|
s.licenses = ['MIT']
|
17
|
-
s.required_ruby_version = '>=
|
17
|
+
s.required_ruby_version = '>= 2.0.0'
|
18
18
|
s.rubygems_version = '1.8.23'
|
19
19
|
|
20
20
|
s.files = `git ls-files`.split($RS).reject do |file|
|
@@ -32,9 +32,9 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.extra_rdoc_files = ['LICENSE', 'README.md']
|
33
33
|
s.require_paths = ['lib']
|
34
34
|
|
35
|
-
s.add_runtime_dependency('rubocop', '~> 0.
|
36
|
-
s.add_runtime_dependency('pronto', '~> 0.
|
37
|
-
s.add_development_dependency('rake', '~>
|
38
|
-
s.add_development_dependency('rspec', '~> 3.
|
35
|
+
s.add_runtime_dependency('rubocop', '~> 0.50', '>= 0.49.1')
|
36
|
+
s.add_runtime_dependency('pronto', '~> 0.9.0')
|
37
|
+
s.add_development_dependency('rake', '~> 12.0')
|
38
|
+
s.add_development_dependency('rspec', '~> 3.4')
|
39
39
|
s.add_development_dependency('rspec-its', '~> 1.2')
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-rubocop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mindaugas Mozūras
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,56 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: '0.50'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.49.1
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
29
|
+
version: '0.50'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.49.1
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: pronto
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
39
|
+
version: 0.9.0
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
46
|
+
version: 0.9.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '12.0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '12.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
67
|
+
version: '3.4'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
74
|
+
version: '3.4'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rspec-its
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,7 +99,7 @@ files:
|
|
93
99
|
- lib/pronto/rubocop.rb
|
94
100
|
- lib/pronto/rubocop/version.rb
|
95
101
|
- pronto-rubocop.gemspec
|
96
|
-
homepage: http://github.
|
102
|
+
homepage: http://github.com/mmozuras/pronto-rubocop
|
97
103
|
licenses:
|
98
104
|
- MIT
|
99
105
|
metadata: {}
|
@@ -105,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
111
|
requirements:
|
106
112
|
- - ">="
|
107
113
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
114
|
+
version: 2.0.0
|
109
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
116
|
requirements:
|
111
117
|
- - ">="
|
@@ -113,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
119
|
version: '0'
|
114
120
|
requirements: []
|
115
121
|
rubyforge_project:
|
116
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.7.6
|
117
123
|
signing_key:
|
118
124
|
specification_version: 4
|
119
125
|
summary: Pronto runner for Rubocop, ruby code analyzer
|