pronto-reek 0.2.0 → 0.2.1

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: ee8534a7fd74af031ac28c83521cbac34220be4c
4
- data.tar.gz: 1d79763ed660703ebfb240a02e5ebde952c0379f
3
+ metadata.gz: f4d7f23c7c65e6dd1faf00da8ec593edc5c1d2dd
4
+ data.tar.gz: 4634f5e59f2c3bf96d07c74a7a22030d05e089bd
5
5
  SHA512:
6
- metadata.gz: bd87f0da5c6308bb76c222188af05b6f6c522c9b76aba662b0af6b86ffcc825cd8eff03cb57c8cfa9bae7fee473b1d0add7b81edbb386df54967d4ad34d97d6a
7
- data.tar.gz: 4476c104feed4e0d78e74940ffd9fa3fa77a9755b9203a77d89c2604da7b8162152d9a6f7b9b4dc00ae9713285299a427d62641551e6970ab7cb7beedc4af3bf
6
+ metadata.gz: b8424ddfe8b34f2d3b2a2fb8a51d86040c6ccc20cd3ccf195469f37a882abc2a155d25eb73318461475ef510eb8583a1bd7f09804a9e1723afcf189e19b519f5
7
+ data.tar.gz: 34ba29abd7c6033043faef6dd0859645028587e02270264be34dfe91abd377851ec8debb2dbfee96fee99085ecc394ed49ffea22094f998f435075ef9a491596
@@ -7,6 +7,7 @@ module Pronto
7
7
  return [] unless patches
8
8
 
9
9
  patches_with_additions = patches.select { |patch| patch.additions > 0 }
10
+ .select { |patch| ruby_file?(patch.new_file_full_path) }
10
11
  files = patches_with_additions.map { |patch| patch.new_file_full_path.to_s }
11
12
 
12
13
  if files.any?
@@ -20,14 +21,13 @@ module Pronto
20
21
  def messages_for(patches, errors)
21
22
  errors.map do |error|
22
23
  patch = patch_for_error(patches, error)
24
+ next if patch.nil?
23
25
 
24
- if patch
25
- line = patch.added_lines.find do |added_line|
26
- error.lines.find { |error_line| error_line == added_line.new_lineno }
27
- end
28
-
29
- new_message(line, error) if line
26
+ line = patch.added_lines.find do |added_line|
27
+ error.lines.find { |error_line| error_line == added_line.new_lineno }
30
28
  end
29
+
30
+ new_message(line, error) if line
31
31
  end
32
32
  end
33
33
 
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module ReekVersion
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-reek
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.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: 2014-03-02 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -72,10 +72,10 @@ executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
- - lib/pronto/reek/version.rb
76
- - lib/pronto/reek.rb
77
75
  - LICENSE
78
76
  - README.md
77
+ - lib/pronto/reek.rb
78
+ - lib/pronto/reek/version.rb
79
79
  homepage: http://github.org/mmozuras/pronto-reek
80
80
  licenses:
81
81
  - MIT
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: 1.3.6
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.0.7
99
+ rubygems_version: 2.3.0
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: Pronto runner for Reek, code smell detector for Ruby