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 +4 -4
- data/README.md +2 -1
- data/lib/pronto/flay.rb +5 -5
- data/lib/pronto/flay/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15848cced332bfe8cd241dbeeca3ffcacb9f79ed
|
4
|
+
data.tar.gz: 625791169bffadf566a4fdbe38efbf9ceeeb3162
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
31
|
+
line = patch.added_lines.find do |added_line|
|
32
32
|
added_line.new_lineno == node.line
|
33
|
-
end
|
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.
|
40
|
+
ruby_patches.find do |patch|
|
41
41
|
patch.new_file_full_path.to_s == node.file.path
|
42
|
-
end
|
42
|
+
end
|
43
43
|
end
|
44
44
|
|
45
45
|
def new_message(line, node)
|
data/lib/pronto/flay/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: flay
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|