rubocop-rspec_parity 1.3.4 → 1.3.5

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: b634068a8fe93d9576c210988a5ebab48f22f25058cf7c50e21710de1b7fb775
4
- data.tar.gz: 9ac6bd2fc8503e43013e25e03413cb32dd8eb3d6ee44480f1a243f41e006781f
3
+ metadata.gz: 405b1cf99501c2de2098e7f7349191811bc882a303cad1081923d80ca93b9944
4
+ data.tar.gz: 9a6fd07fd98b90b5e6f124191888eff19ed380eb3c3827594b78ca631e29c77f
5
5
  SHA512:
6
- metadata.gz: ab0f3101fd7603ec83438f91772b6991446c9fbb2102cc32ebb948a02df1cfe8a6217e71b2629ba695135b717322d9ba6bd686bfe1a9f58fbe292ea1b70357ba
7
- data.tar.gz: d30491decd3a61710bf1c873bbd268aad7d5a40e6d209b46676bf469871c54087e13a6111a47ad83437d5becb6416e5075cec6ca6a0e00a7b7657c873bb44ce2
6
+ metadata.gz: 34c8cb1ead5f2dd51ab8bce3b2fbd0f3cc3030cdb6d13b77164c8b19ef9c26fe35275da0ec78ebb9a94ce57620639879ded4f2d95650dd1362512d73261f8394
7
+ data.tar.gz: 9bdea0f802338bed6fa80c5593e1577758e7e4aeb06a03e28779193ae71cef90360c602ec6ed06f17e54405bead119c2901fc9edd618db96d89a3f799ce89833
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.3.5] - 2026-03-02
4
+
5
+ Fixed: `PublicMethodHasSpec` now correctly recognizes `private` declarations inside `included do`, `class_eval do`, and `module_eval do` blocks as visibility scopes
6
+
3
7
  ## [1.3.4] - 2026-02-23
4
8
 
5
9
  Added: `PublicMethodHasSpec` now treats methods inside `class_methods do` blocks (ActiveSupport::Concern) as class methods, expecting `.method_name` in specs
@@ -134,7 +134,8 @@ module RuboCop
134
134
 
135
135
  def find_enclosing_scope(node)
136
136
  node.each_ancestor.find do |n|
137
- n.class_type? || n.module_type? || n.sclass_type? || class_methods_block?(n)
137
+ n.class_type? || n.module_type? || n.sclass_type? || class_methods_block?(n) || included_block?(n) ||
138
+ eval_block?(n)
138
139
  end
139
140
  end
140
141
 
@@ -142,6 +143,14 @@ module RuboCop
142
143
  node.block_type? && node.send_node.method_name == :class_methods
143
144
  end
144
145
 
146
+ def included_block?(node)
147
+ node.block_type? && node.send_node.method_name == :included
148
+ end
149
+
150
+ def eval_block?(node)
151
+ node.block_type? && %i[class_eval module_eval].include?(node.send_node.method_name)
152
+ end
153
+
145
154
  def find_class_or_module(node)
146
155
  node.each_ancestor.find { |n| n.class_type? || n.module_type? }
147
156
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RSpecParity
5
- VERSION = "1.3.4"
5
+ VERSION = "1.3.5"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-rspec_parity
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Povilas Jurcys