leftovers 0.11.0 → 0.11.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: 16d46e25de2c0e4f243f396b910e3eb61e6342dd626fcceb9f30bd3734196d7b
4
- data.tar.gz: e8c6c55c70e25167126fa2fa5ac3037f41a37b9ae8415f10b86cfea183436be1
3
+ metadata.gz: 99d72b44b74c747074583f8c9254872a175563d0f25135b7798c5e76f42c19ef
4
+ data.tar.gz: 6b4bd9219256b8734df956978892da7ffe028e0539367a1f98d46c73912ae79e
5
5
  SHA512:
6
- metadata.gz: 609975369757068764cc179848f973aa6579dcf422a36ad54a7e7697cb257b1ec1043c3da8b106741869d1a0f113e4aa95bf824c7dca1c9766b05db90cddb7a8
7
- data.tar.gz: c74f1643e44ad2f87490f8f2745c35286f746881bcac839c43bc0400863c0733a5246c5cf4d4b5be88d1501512aa6fb35debc637404262ee0902766e28a87b86
6
+ metadata.gz: d51c93c652bdd0aa55a176c1600e9d557fd29e7e9726411d7ac6eb086178a655e17e96e8d7530c97945f169d32961649358dd712daf9e50cb82b30caa1b55c10
7
+ data.tar.gz: b8ca04321b17c7d9c9b831f3fb2fab47554d859f910d38f08a04d41f344c4585a1008019af12d13b3e2807027fe6ba7d6fd6a4d1eca3fb947d68d6812249bc39
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.11.1
2
+ - Fixed an issue with parsing files that have `MyConstant ||= value` patterns #19 (thanks for the pr - @kamoh)
3
+
1
4
  # v0.11.0
2
5
  - Fixed an issue with active_record's `before_save` with multiple callbacks #18, #17 - thanks @palexvs for raising the issue and creating a pr
3
6
  - Due to this pr, i reviewed everything else that i think calls `ActiveSupport::Callbacks.set_callback`, and ensured they all:
@@ -110,6 +110,7 @@ module Leftovers
110
110
  alias_method :on_module, :on_class
111
111
 
112
112
  # grab Constant = Class.new or CONSTANT = 'string'.freeze
113
+ # or Constant ||= Class.new
113
114
  def on_casgn(node)
114
115
  super
115
116
 
@@ -96,8 +96,9 @@ module Leftovers
96
96
  # just collects the :call=, super will collect the :call
97
97
  when :send, :csend then calls << :"#{node.name}="
98
98
  # just collects the call, super will collect the definition
99
- when :ivasgn, :gvasgn, :cvasgn then calls << node.name
100
- when :lvasgn then nil # we don't care about lvasgn
99
+ when :ivasgn, :gvasgn, :cvasgn, :casgn then calls << node.name
100
+ when :lvasgn then nil # we don't check local variable use, rubocop already covers this
101
+
101
102
  # :nocov:
102
103
  else raise Leftovers::UnexpectedCase, "Unhandled value #{node.type.inspect}"
103
104
  # :nocov:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leftovers
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.1'
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.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Sherson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2022-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport