pronto-fasterer 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pronto/fasterer/version.rb +1 -1
- data/lib/pronto/fasterer.rb +8 -12
- data/pronto-fasterer.gemspec +4 -4
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83660dc9a2841755f35abe7e0a6994b2c94b5bf0
|
4
|
+
data.tar.gz: 533539ac713e3a53cf80144df9b364c121df621b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c79d6dcc680ff20e9ad4467e108695e631aabaa1be5a7a465b0b9b90dca4db5c6af5409761a96be38d2edcfae9bc2d455409e1916499f8e2e103f62ccfaa341b
|
7
|
+
data.tar.gz: e3457b32627a5a7ae2552ba3c308635b63b2b0dac365c7a9ec91031e6366ddd3054fee0baa01e9c412ee755444828b3f8724d38b8febe5d96f4c87818683eb56
|
data/lib/pronto/fasterer.rb
CHANGED
@@ -4,17 +4,9 @@ require 'fasterer/config'
|
|
4
4
|
|
5
5
|
module Pronto
|
6
6
|
class Fasterer < Runner
|
7
|
-
def
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def run(patches, _)
|
12
|
-
return [] unless patches
|
13
|
-
|
14
|
-
valid_patches = patches.select do |patch|
|
15
|
-
patch.additions > 0 &&
|
16
|
-
ruby_file?(patch.new_file_full_path) &&
|
17
|
-
!@config.ignored_files.include?(patch.delta.new_file[:path])
|
7
|
+
def run
|
8
|
+
valid_patches = ruby_patches.reject do |patch|
|
9
|
+
config.ignored_files.include?(patch.delta.new_file[:path])
|
18
10
|
end
|
19
11
|
|
20
12
|
valid_patches.map { |patch| inspect(patch) }.flatten.compact
|
@@ -28,7 +20,7 @@ module Pronto
|
|
28
20
|
analyzer.errors.each { |error| errors << error }
|
29
21
|
|
30
22
|
errors
|
31
|
-
.select { |error|
|
23
|
+
.select { |error| !config.ignored_speedups.include?(error.name) }
|
32
24
|
.flat_map do |error|
|
33
25
|
patch.added_lines
|
34
26
|
.select { |line| line.new_lineno == error.line }
|
@@ -40,5 +32,9 @@ module Pronto
|
|
40
32
|
path = line.patch.delta.new_file[:path]
|
41
33
|
Message.new(path, line, :warning, error.explanation)
|
42
34
|
end
|
35
|
+
|
36
|
+
def config
|
37
|
+
@config ||= ::Fasterer::Config.new
|
38
|
+
end
|
43
39
|
end
|
44
40
|
end
|
data/pronto-fasterer.gemspec
CHANGED
@@ -32,9 +32,9 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.extra_rdoc_files = ['LICENSE', 'README.md']
|
33
33
|
s.require_paths = ['lib']
|
34
34
|
|
35
|
-
s.add_runtime_dependency('fasterer', '~> 0.3.0')
|
36
|
-
s.add_runtime_dependency('pronto', '~> 0.
|
37
|
-
s.add_development_dependency('rake', '~>
|
38
|
-
s.add_development_dependency('rspec', '~> 3.
|
35
|
+
s.add_runtime_dependency('fasterer', '~> 0.3', '>= 0.3.0')
|
36
|
+
s.add_runtime_dependency('pronto', '~> 0.6.0')
|
37
|
+
s.add_development_dependency('rake', '~> 11.0')
|
38
|
+
s.add_development_dependency('rspec', '~> 3.4')
|
39
39
|
s.add_development_dependency('rspec-its', '~> 1.2')
|
40
40
|
end
|
metadata
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-fasterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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: 2016-
|
11
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fasterer
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.3'
|
20
|
+
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 0.3.0
|
20
23
|
type: :runtime
|
@@ -22,6 +25,9 @@ dependencies:
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.3'
|
30
|
+
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 0.3.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
@@ -30,42 +36,42 @@ dependencies:
|
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
39
|
+
version: 0.6.0
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
46
|
+
version: 0.6.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: rake
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '11.0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '11.0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rspec
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
67
|
+
version: '3.4'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
74
|
+
version: '3.4'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rspec-its
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|