fasterer 0.7.0 → 0.7.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e99fc2f38833d5224d0e6875dee83fbe221c197fb452e655b20613438408abc
|
4
|
+
data.tar.gz: b6289e01ed3ecb79819a2f4e59297bd83291ef10ce2b282f74918d7b4c5cf4c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf39d1f39d954b331d81326cff413cd7a65359b123514655639c34bc91e0c5001c8fdd6ed2f317b9f34ecb519af3efb694fdc1cdc99fdeb210d987271ce798aa
|
7
|
+
data.tar.gz: 5cf1ba87677e9e3bfaa203981052961d0c12b3ea381f2af14bab4471cee7f9e147f0d88b16518d375f543da7e535c8a5883173770e8c32e536874c61a3f831a4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.7.1
|
4
|
+
|
5
|
+
- Fix `check_symbol_to_proc` rule from crashing when there is no receiver [#67](https://github.com/DamirSvrtan/fasterer/pull/67)
|
6
|
+
|
3
7
|
## 0.7.0
|
4
8
|
|
5
9
|
- 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)
|
@@ -130,6 +130,7 @@ module Fasterer
|
|
130
130
|
|
131
131
|
return unless body_method_call.arguments.count.zero?
|
132
132
|
return if body_method_call.has_block?
|
133
|
+
return if body_method_call.receiver.nil?
|
133
134
|
return unless body_method_call.receiver.name == method_call.block_argument_names.first
|
134
135
|
|
135
136
|
add_offense(:block_vs_symbol_to_proc)
|
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 7 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(7)
|
10
10
|
end
|
11
11
|
end
|
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.7.
|
4
|
+
version: 0.7.1
|
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-09-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|