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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a56e057a573cb2d6a92166279f2b55ad08b4e53
4
- data.tar.gz: b3eb994dedafd68472ec40c26db0e75b33b5baa9
3
+ metadata.gz: 83660dc9a2841755f35abe7e0a6994b2c94b5bf0
4
+ data.tar.gz: 533539ac713e3a53cf80144df9b364c121df621b
5
5
  SHA512:
6
- metadata.gz: fce0ae9fd0f0624a5b6522a26367c98b66c2ec1030f69205ff3c2925f69c7c3d0767d3e6907ec90c6681d2fdcd320732080ef4c56b0a8d77963cd8083eb6f8ff
7
- data.tar.gz: 80f8eae20aaca90303bcc493a2468aac43ba9efab31756a3759e60414c81d4c62a09536624a94ce3b8a9d41a4eea5fcf6193e1f5ece8fc9e339ae0ab46daffa9
6
+ metadata.gz: c79d6dcc680ff20e9ad4467e108695e631aabaa1be5a7a465b0b9b90dca4db5c6af5409761a96be38d2edcfae9bc2d455409e1916499f8e2e103f62ccfaa341b
7
+ data.tar.gz: e3457b32627a5a7ae2552ba3c308635b63b2b0dac365c7a9ec91031e6366ddd3054fee0baa01e9c412ee755444828b3f8724d38b8febe5d96f4c87818683eb56
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module FastererVersion
3
- VERSION = '0.5.2'.freeze
3
+ VERSION = '0.6.0'.freeze
4
4
  end
5
5
  end
@@ -4,17 +4,9 @@ require 'fasterer/config'
4
4
 
5
5
  module Pronto
6
6
  class Fasterer < Runner
7
- def initialize
8
- @config = ::Fasterer::Config.new
9
- end
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| !@config.ignored_speedups.include?(error.name) }
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
@@ -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.5.0')
37
- s.add_development_dependency('rake', '~> 10.4')
38
- s.add_development_dependency('rspec', '~> 3.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.5.2
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-02-28 00:00:00.000000000 Z
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.5.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.5.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: '10.4'
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: '10.4'
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.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.3'
74
+ version: '3.4'
69
75
  - !ruby/object:Gem::Dependency
70
76
  name: rspec-its
71
77
  requirement: !ruby/object:Gem::Requirement