pronto-rubocop 0.4.7 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0798d8be503387f7c82fd03ec3f62583ec0b37a
4
- data.tar.gz: 1149663e0f9e558aa9978786aea8a46ba6eb9c90
3
+ metadata.gz: d414a36219b76ff756a497805f88f1c22bf7dde9
4
+ data.tar.gz: 1c575c0b3cc00dcddefe70f73c4763739fb702fe
5
5
  SHA512:
6
- metadata.gz: 21d83a83a93c7f35c5ea076eb7870d3e80303c3b1d71539a6c970170c97e5c87d626b8e0eddc1e27920051836a0f91e98dc9af12fba93e494d1b36bb8ff21d80
7
- data.tar.gz: 05c4e0af675b7c347900b6f9fa84032f83981dc4d875e9dbbf8e49297e5d5748da728fba36bdcd510b725ed3694366010cf243ef92683b3d4e2610a19e01a3ff
6
+ metadata.gz: e791944c85fd523b8aa7cfcaf411a8b1e7deed5bd7bb262d2f63ff0cd05a7842d65ade106d9e1303b2c6137fcc94be2dfdc7054b12787ba49ec141444d943f95
7
+ data.tar.gz: d3c5c4f22810c0ca2cce08c4f1f8a249d37b2e3684b7f7bd5caec406809aad5263da33a00b6c09e1c63b31663485c95834b2fba3049e3809760e84ed7d517e3c
@@ -29,12 +29,13 @@ module Pronto
29
29
  end
30
30
 
31
31
  def inspect(patch)
32
- processed_source = ::RuboCop::ProcessedSource.from_file(patch.new_file_full_path.to_s)
32
+ processed_source = processed_source_for(patch)
33
33
  offences = @inspector.send(:inspect_file, processed_source).first
34
34
 
35
35
  offences.sort.reject(&:disabled?).map do |offence|
36
- patch.added_lines.select { |line| line.new_lineno == offence.line }
37
- .map { |line| new_message(offence, line) }
36
+ patch.added_lines
37
+ .select { |line| line.new_lineno == offence.line }
38
+ .map { |line| new_message(offence, line) }
38
39
  end
39
40
  end
40
41
 
@@ -50,6 +51,11 @@ module Pronto
50
51
  @config_store.for(path)
51
52
  end
52
53
 
54
+ def processed_source_for(patch)
55
+ path = patch.new_file_full_path.to_s
56
+ ::RuboCop::ProcessedSource.from_file(path)
57
+ end
58
+
53
59
  def level(severity)
54
60
  case severity
55
61
  when :refactor, :convention
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module RubocopVersion
3
- VERSION = '0.4.7'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
@@ -0,0 +1,40 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
4
+ require 'pronto/rubocop/version'
5
+ require 'English'
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = 'pronto-rubocop'
9
+ s.version = Pronto::RubocopVersion::VERSION
10
+ s.platform = Gem::Platform::RUBY
11
+ s.author = 'Mindaugas Mozūras'
12
+ s.email = 'mindaugas.mozuras@gmail.com'
13
+ s.homepage = 'http://github.org/mmozuras/pronto-rubocop'
14
+ s.summary = 'Pronto runner for Rubocop, ruby code analyzer'
15
+
16
+ s.licenses = ['MIT']
17
+ s.required_ruby_version = '>= 1.9.3'
18
+ s.rubygems_version = '1.8.23'
19
+
20
+ s.files = `git ls-files`.split($RS).reject do |file|
21
+ file =~ %r{^(?:
22
+ spec/.*
23
+ |Gemfile
24
+ |Rakefile
25
+ |\.rspec
26
+ |\.gitignore
27
+ |\.rubocop.yml
28
+ |\.travis.yml
29
+ )$}x
30
+ end
31
+ s.test_files = []
32
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
33
+ s.require_paths = ['lib']
34
+
35
+ s.add_runtime_dependency('rubocop', '~> 0.35.0')
36
+ s.add_runtime_dependency('pronto', '~> 0.5.0')
37
+ s.add_development_dependency('rake', '~> 10.4')
38
+ s.add_development_dependency('rspec', '~> 3.3')
39
+ s.add_development_dependency('rspec-its', '~> 1.2')
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.7
4
+ version: 0.5.0
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: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2015-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,80 +16,83 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.34.0
19
+ version: 0.35.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.34.0
26
+ version: 0.35.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pronto
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.0
33
+ version: 0.5.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.4.0
40
+ version: 0.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.3'
47
+ version: '10.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.3'
54
+ version: '10.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '3.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.0'
68
+ version: '3.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-its
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.0'
75
+ version: '1.2'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.0'
82
+ version: '1.2'
83
83
  description:
84
84
  email: mindaugas.mozuras@gmail.com
85
85
  executables: []
86
86
  extensions: []
87
- extra_rdoc_files: []
87
+ extra_rdoc_files:
88
+ - LICENSE
89
+ - README.md
88
90
  files:
89
91
  - LICENSE
90
92
  - README.md
91
93
  - lib/pronto/rubocop.rb
92
94
  - lib/pronto/rubocop/version.rb
95
+ - pronto-rubocop.gemspec
93
96
  homepage: http://github.org/mmozuras/pronto-rubocop
94
97
  licenses:
95
98
  - MIT
@@ -102,12 +105,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
105
  requirements:
103
106
  - - ">="
104
107
  - !ruby/object:Gem::Version
105
- version: '0'
108
+ version: 1.9.3
106
109
  required_rubygems_version: !ruby/object:Gem::Requirement
107
110
  requirements:
108
111
  - - ">="
109
112
  - !ruby/object:Gem::Version
110
- version: 1.3.6
113
+ version: '0'
111
114
  requirements: []
112
115
  rubyforge_project:
113
116
  rubygems_version: 2.4.5