leftovers 0.12.0 → 0.12.2
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: 377b77ca4cf2a1322042a4ea36fc01c3ac28f40be3ddcc52a8f67ce627325bed
|
4
|
+
data.tar.gz: 119961a95dacb598e8c8722b2ad2f64eae37eaba1786472322f225e5853c8a95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06b9c3e26a4c1b21bbb12dda75c0581e5a4c3a0a3415747325838cdd18082beace0c9a968d62edb9d1ea8e503c16ae227218711bed09bfba04b7e200f08bfa99
|
7
|
+
data.tar.gz: d3e99478863220169cacf9a4523d80c6123266a9c1cc993a36e46493f53df694a2011de9be1a128ccd2b927e9da27f8923b06b662ab728bcb4ff787f87d71cad
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# v0.12.2
|
2
|
+
- fix for structures like activerecord `attribute a_variable_we_cant_get_a_string_out_of` leaving empty definition sets. thanks @gentlemich
|
3
|
+
|
4
|
+
# v0.12.1
|
5
|
+
|
6
|
+
- handle anonymous block arguments e.g. `def method(&); other_method(&); end`. thanks @sclarson and @orien and @juanlujoanne
|
7
|
+
|
1
8
|
# v0.12.0
|
2
9
|
- improve error handling when a file can't be processed
|
3
10
|
- fail rather than warn when encountering a syntax error in a file being processed
|
@@ -13,15 +13,18 @@ module Leftovers
|
|
13
13
|
freeze
|
14
14
|
end
|
15
15
|
|
16
|
-
def process(str, current_node, matched_node, acc)
|
16
|
+
def process(str, current_node, matched_node, acc) # rubocop:disable Metrics/MethodLength
|
17
17
|
set = DefinitionNodeSet.new
|
18
18
|
|
19
19
|
@processors.each do |processor|
|
20
20
|
processor.process(str, current_node, matched_node, set)
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
case set.definitions.length
|
24
|
+
when 1
|
24
25
|
acc.add_definition_node set.definitions.first
|
26
|
+
when 0
|
27
|
+
nil
|
25
28
|
else
|
26
29
|
acc.add_definition_set set
|
27
30
|
end
|
data/lib/leftovers/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leftovers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dana Sherson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -320,7 +320,6 @@ files:
|
|
320
320
|
- docs/Custom-Precompilers.md
|
321
321
|
- exe/leftovers
|
322
322
|
- leftovers.gemspec
|
323
|
-
- lib/.DS_Store
|
324
323
|
- lib/config/actioncable.yml
|
325
324
|
- lib/config/actionmailbox.yml
|
326
325
|
- lib/config/actionmailer.yml
|
@@ -585,7 +584,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
585
584
|
- !ruby/object:Gem::Version
|
586
585
|
version: '0'
|
587
586
|
requirements: []
|
588
|
-
rubygems_version: 3.
|
587
|
+
rubygems_version: 3.3.26
|
589
588
|
signing_key:
|
590
589
|
specification_version: 4
|
591
590
|
summary: Find unused methods and classes/modules
|
data/lib/.DS_Store
DELETED
Binary file
|