leftovers 0.12.1 → 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: 7e52a1e28bb2607d09a74d36c1602a7bdbabd0f7ec58f542bd836b1d509f9c8a
4
- data.tar.gz: 73df5d8f0694d5bd44c6a99f9268f64474cebc4f1097a2261233fee3596e235f
3
+ metadata.gz: 377b77ca4cf2a1322042a4ea36fc01c3ac28f40be3ddcc52a8f67ce627325bed
4
+ data.tar.gz: 119961a95dacb598e8c8722b2ad2f64eae37eaba1786472322f225e5853c8a95
5
5
  SHA512:
6
- metadata.gz: 07a7d1443f20c26d39b3e030fc86469435fb6a067fb292d6c2c5bef8b4f7a34f19f7899c20c4d38f588612f6ea0b4e028d74319879cb14a7fa043deaf1ef7566
7
- data.tar.gz: 1ab0edb8d8382e3c4fdef6cbd5dc78c57cd87a391baba773f1ced92fb3080528f8a80dd642c4c4f1db9c08c863b2532079d8bd764931b4b659a4e12d61fe357a
6
+ metadata.gz: 06b9c3e26a4c1b21bbb12dda75c0581e5a4c3a0a3415747325838cdd18082beace0c9a968d62edb9d1ea8e503c16ae227218711bed09bfba04b7e200f08bfa99
7
+ data.tar.gz: d3e99478863220169cacf9a4523d80c6123266a9c1cc993a36e46493f53df694a2011de9be1a128ccd2b927e9da27f8923b06b662ab728bcb4ff787f87d71cad
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
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
+
1
4
  # v0.12.1
2
5
 
3
- - handle anonymous block arguments e.g. `def method(&); other_method(&); end`. thanks @sclarsen and @orien and @juanlujoanne
6
+ - handle anonymous block arguments e.g. `def method(&); other_method(&); end`. thanks @sclarson and @orien and @juanlujoanne
4
7
 
5
8
  # v0.12.0
6
9
  - improve error handling when a file can't be 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
- if set.definitions.length == 1
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leftovers
4
- VERSION = '0.12.1'
4
+ VERSION = '0.12.2'
5
5
  end
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.1
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-02-15 00:00:00.000000000 Z
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.1.6
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