fasterer 0.6.0 → 0.7.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
  SHA256:
3
- metadata.gz: f8497be57df6a101c8259f8909a2977b68727e0595de1c2b09bec0492b80d806
4
- data.tar.gz: 7364812466aa12114dbada36fc6cb3865e4497478d60d8df0a4c4aad58f50d5d
3
+ metadata.gz: d9948b922544838685466166a577f49d09424d93b9d04337fb731198427f15bc
4
+ data.tar.gz: fad2c9125b232a13454d0bf168236713f59938ff01d85670597a2d8c7374e321
5
5
  SHA512:
6
- metadata.gz: f8d177745b079e9b2608a698757165b595c0b9d25b4af28387194d8ecd308014487e19f228358fdcfdedfcfa3638846f23606b7b60c2bd9071a7f9a9b4946a50
7
- data.tar.gz: a51a0dcc58688bb1bb2673543f9b2961381d9345e19f6e3c3fc0691eeea2c199792afeb6157303a45140962b4a9f034fd095c9bfc5fcd823725ba3611c1a7e80
6
+ metadata.gz: 4645193c53c5b78bda14a72b0368164673df1bf28ea726464c701d5f1e1d3f0a5f102089df55ae656ad090cc90aee0f8d8e488baefbb04d082cc4742479dc2f5
7
+ data.tar.gz: ce2e88f3d450299b42986cc9f3ee014a281aadf7f833d6413bfd0d5d80a7e43f4a21564060e7e440b664a93c99ff229ddd94d47282a0ee61970a43ffaccbcf35
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.0
4
+
5
+ - More inclusive `check_symbol_to_proc` rule - don't only look at #each but any method that could leverage the symbol to proc rule. Merged through [#41](https://github.com/DamirSvrtan/fasterer/pull/41)
6
+
3
7
  ## 0.6.0
4
8
 
5
9
  - Enable placing the `.fasterer.yml` file not just in the current dir, but in any parent directory as well.
@@ -44,6 +44,8 @@ module Fasterer
44
44
  when :include?
45
45
  check_range_include_offense
46
46
  end
47
+
48
+ check_symbol_to_proc
47
49
  end
48
50
 
49
51
  def check_module_eval_offense
@@ -98,8 +100,6 @@ module Fasterer
98
100
  when :keys
99
101
  add_offense(:keys_each_vs_each_key)
100
102
  end
101
-
102
- check_symbol_to_proc
103
103
  end
104
104
 
105
105
  def check_flatten_offense
@@ -1,3 +1,3 @@
1
1
  module Fasterer
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
@@ -3,9 +3,9 @@ require 'spec_helper'
3
3
  describe Fasterer::Analyzer do
4
4
  let(:test_file_path) { RSpec.root.join('support', 'analyzer', '18_block_vs_symbol_to_proc.rb') }
5
5
 
6
- it 'should block that could be called with symbol 2 times' do
6
+ it 'should block that could be called with symbol 6 times' do
7
7
  analyzer = Fasterer::Analyzer.new(test_file_path)
8
8
  analyzer.scan
9
- expect(analyzer.errors[:block_vs_symbol_to_proc].count).to eq(2)
9
+ expect(analyzer.errors[:block_vs_symbol_to_proc].count).to eq(6)
10
10
  end
11
11
  end
@@ -28,3 +28,9 @@ route_sets.each do |routes|
28
28
  end
29
29
 
30
30
  route_sets.each { |routes| routes.finalize! }
31
+
32
+ numbers = [1, 2, 3, 4, 5]
33
+ numbers.each { |number| number.to_s }
34
+ numbers.map { |number| number.to_s }
35
+ numbers.any? { |number| number.even? }
36
+ numbers.find { |number| number.even? }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fasterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damir Svrtan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-05 00:00:00.000000000 Z
11
+ date: 2019-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize