pronto-reek 0.5.0 → 0.5.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: 6e322730eadf996b53e45c2b7e2a61c3632f9cd4
4
- data.tar.gz: 46e0cde35eb75a92d5bb024da7137ead93c037c1
3
+ metadata.gz: a3265de0e97b27322342f17bd9851d2b1a1c8070
4
+ data.tar.gz: 1df339496d8bff8b35d4836dfbee2087e570d86e
5
5
  SHA512:
6
- metadata.gz: bd35d404b2272f5d13e0cd9c7b50bf600cf730fa0260358f3c051fec89c67402aacb5a4e528d5fd257bc20a0296b1a9d05ca11c56b02882d7fa617599750cb42
7
- data.tar.gz: 280036dc4e4dd49b15c61cd19fd5a7de9a95aa890ffa352adb048a20b046dff568d6a107dfcc66a033757863044c8a7cf112d8516c5d7b71e6f6ace79de2b125
6
+ metadata.gz: 022c3167401f954e6707967ec645bf11ae31f8aff2af9e98b9e77b468410783f9413317a28a34cd614bcfb0f3c2ecc89994c0690a5598a75fa3898eeeb971253
7
+ data.tar.gz: 93a585738b8d329a7037da2dba79b427f1ace9d7967e85da68eaaff8530a11445cfd356ed50ea61f230eab6c68127a8bf911e1b3cda59f0ab895e804e0030bb7
data/lib/pronto/reek.rb CHANGED
@@ -10,16 +10,14 @@ module Pronto
10
10
  .select { |patch| ruby_file?(patch.new_file_full_path) }
11
11
  files = patches_with_additions.map(&:new_file_full_path)
12
12
 
13
- if files.any?
14
- files.flat_map do |file|
15
- examiner = ::Reek::Examiner.new(file)
16
- messages_for(patches_with_additions, examiner.smells).compact
17
- end
18
- else
19
- []
13
+ smells = files.flat_map do |file|
14
+ ::Reek::Examiner.new(file).smells
20
15
  end
16
+ messages_for(patches_with_additions, smells).compact
21
17
  end
22
18
 
19
+ private
20
+
23
21
  def messages_for(patches, errors)
24
22
  errors.map do |error|
25
23
  patch = patch_for_error(patches, error)
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module ReekVersion
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
data/pronto-reek.gemspec CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.require_paths = ['lib']
34
34
 
35
35
  s.add_dependency('pronto', '~> 0.5.0')
36
- s.add_dependency('reek', '~> 3.3.0')
36
+ s.add_dependency('reek', '~> 3.7.0')
37
37
  s.add_development_dependency('rake', '~> 10.4')
38
38
  s.add_development_dependency('rspec', '~> 3.3')
39
39
  s.add_development_dependency('rspec-its', '~> 1.2')
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.5.0
4
+ version: 0.5.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: 2015-11-11 00:00:00.000000000 Z
11
+ date: 2015-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.3.0
33
+ version: 3.7.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: 3.3.0
40
+ version: 3.7.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement