paraxial 1.0.1 → 1.0.2

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: a679f1421bdbb16b511672a5f45ada85ac38811d657a4eebe3c2f25805fa7bc9
4
- data.tar.gz: 24fc51622351b5fee13c9108bea3f4276857a73bd87f4ea0f6ca33dcccc4474d
3
+ metadata.gz: 3849213ba15a24d63699e026fbf59c0c3633d66c2f9c3a20a787ecbb43d6a727
4
+ data.tar.gz: ea7d9cf3fcd4909b51c98c0922b83e834c7d04a5df204cfc64e44b2701e0eb09
5
5
  SHA512:
6
- metadata.gz: fffaca550500aa79a5df9761f87a493eb94d35461c1e3cdb0d4b03fbfac00bc8289948a051adcab4237a5088f82c34e93b6be5178622096c2378d73773b15fd5
7
- data.tar.gz: 1f8b328b62b810db88d7d1f496325d98f4f8fe05a627cf6f371d52ffb6aed5cedb13905b4fa0567014bf36d5a530977e5b2bfccaab5380157acf8b46c551cec5
6
+ metadata.gz: 860660578753aa78749fbadedcf1fc5789bc41ad1d89d1afbf17b60c10dfc6ddc8f6900a082d99b4e915db65e3e99c9c36ee490c05e49853dd681071865546a7
7
+ data.tar.gz: fb5bfb5f315482914d0fad182489180558be34975f8e1224ce07f906b29ca59c7642d153505b0ec6cb5903e8c7b24e492ca301e91a2015c64b0379ae93d01e8d
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paraxial
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -86,6 +86,10 @@ module RuboCop
86
86
  where
87
87
  ].freeze
88
88
 
89
+ def_node_matcher :object_manipulation?, <<~'PATTERN'
90
+ (send _ _ (send ...)) # Matches object methods (send node within a send)
91
+ PATTERN
92
+
89
93
  def_node_matcher :non_literal_condition?, <<~'PATTERN'
90
94
  (
91
95
  send _ _ # Match `where` and `Model.find_by`
@@ -100,6 +104,8 @@ module RuboCop
100
104
  end
101
105
 
102
106
  def on_send(node)
107
+ return if object_manipulation?(node)
108
+
103
109
  return unless non_literal_condition?(node)
104
110
 
105
111
  add_offense(node)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paraxial
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Lubas