pronto-flay 0.1.1 → 0.2.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: 6f12c67ef7e1e0d345f1b2c37b6b5876225fc02e
4
- data.tar.gz: 5cf932b409b79da697328c36e68a7f5fe0c3089f
3
+ metadata.gz: 15848cced332bfe8cd241dbeeca3ffcacb9f79ed
4
+ data.tar.gz: 625791169bffadf566a4fdbe38efbf9ceeeb3162
5
5
  SHA512:
6
- metadata.gz: e7a5a52db12f799bd7bf2aa951bfdf34aebb4b83de49f8eae970447f6a6b5e3fe445069b0f4880661ea92c5a6aa71440143fe9c3580ca6843bd13d63adb210eb
7
- data.tar.gz: 4998db70c406dd826205f82c7b84f65c1c087df04a993c13150aff9d6ad87e913354a9fdbc53f363f862f257eb355bf5f2264adcfe7cc0437a435cd55f3d09db
6
+ metadata.gz: 60963703cdd4dd903aedc9f8bcef4b257d671d528b148e1f1d3fa192830ecc033f90adc9b5d5deca4f50a2dd4822615ef04c7fb2ffd251121b84a55c30224518
7
+ data.tar.gz: c96ee24381b7875a0bf0314ef77b95339910e3acafed4b4a021ca21549ab6fe19d31db4240dcae5c32b932549eefc7801f3cd4a59a0f7efaa1deb939400307b9
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Code Climate](https://codeclimate.com/github/mmozuras/pronto-flay.png)](https://codeclimate.com/github/mmozuras/pronto-flay)
4
4
  [![Build Status](https://travis-ci.org/mmozuras/pronto-flay.png)](https://travis-ci.org/mmozuras/pronto-flay)
5
+ [![Gem Version](https://badge.fury.io/rb/pronto-flay.png)](http://badge.fury.io/rb/pronto-flay)
5
6
  [![Dependency Status](https://gemnasium.com/mmozuras/pronto-flay.png)](https://gemnasium.com/mmozuras/pronto-flay)
6
7
 
7
- Pronto runner for Flay, structural similarities analyzer. [What is Pronto?](https://github.com/mmozuras/pronto)
8
+ Pronto runner for [Flay](https://github.com/seattlerb/flay), structural similarities analyzer. [What is Pronto?](https://github.com/mmozuras/pronto)
data/lib/pronto/flay.rb CHANGED
@@ -7,7 +7,7 @@ module Pronto
7
7
  @flay = ::Flay.new
8
8
  end
9
9
 
10
- def run(patches)
10
+ def run(patches, _)
11
11
  return [] unless patches
12
12
 
13
13
  ruby_patches = patches.select { |patch| patch.additions > 0 }
@@ -28,18 +28,18 @@ module Pronto
28
28
  nodes.map do |node|
29
29
  patch = patch_for_node(ruby_patches, node)
30
30
 
31
- line = patch.added_lines.select do |added_line|
31
+ line = patch.added_lines.find do |added_line|
32
32
  added_line.new_lineno == node.line
33
- end.first
33
+ end
34
34
 
35
35
  new_message(line, node) if line
36
36
  end.flatten.compact
37
37
  end
38
38
 
39
39
  def patch_for_node(ruby_patches, node)
40
- ruby_patches.select do |patch|
40
+ ruby_patches.find do |patch|
41
41
  patch.new_file_full_path.to_s == node.file.path
42
- end.first
42
+ end
43
43
  end
44
44
 
45
45
  def new_message(line, node)
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module FlayVersion
3
- VERSION = '0.1.1'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-flay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.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: 2013-09-29 00:00:00.000000000 Z
11
+ date: 2013-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0
19
+ version: 0.2.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.1.0
26
+ version: 0.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: flay
29
29
  requirement: !ruby/object:Gem::Requirement