fasterer 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9948b922544838685466166a577f49d09424d93b9d04337fb731198427f15bc
|
4
|
+
data.tar.gz: fad2c9125b232a13454d0bf168236713f59938ff01d85670597a2d8c7374e321
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4645193c53c5b78bda14a72b0368164673df1bf28ea726464c701d5f1e1d3f0a5f102089df55ae656ad090cc90aee0f8d8e488baefbb04d082cc4742479dc2f5
|
7
|
+
data.tar.gz: ce2e88f3d450299b42986cc9f3ee014a281aadf7f833d6413bfd0d5d80a7e43f4a21564060e7e440b664a93c99ff229ddd94d47282a0ee61970a43ffaccbcf35
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/fasterer/version.rb
CHANGED
@@ -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
|
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(
|
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.
|
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-
|
11
|
+
date: 2019-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|