rubocop-rspec_parity 1.4.3 → 1.4.4

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: '07035081949c318dcc044f4841d987f4a170cea2faee8aa691974f41d87395a1'
4
- data.tar.gz: 5f2c5db982b0a0703cb4da8f4362ec40379728f4959e916852066a78966339fe
3
+ metadata.gz: 6f0344e2a2bf2511a1bc8739c4ccf449a59526efde141ea4d9209c07b1330be1
4
+ data.tar.gz: a5432ea9890d24e15815ddc8cdfcae8762cdd65b0de0ba9a77ab876d5cc20e53
5
5
  SHA512:
6
- metadata.gz: 6e46579d72c613ad3a55bc829b6404f31d73e5933ca7cdc9d4f3b20f31062019ed7a2d91f017b1ae620c8c3ab3821e7a3c5c4bdef5e6b280a56e4dca48fe81f2
7
- data.tar.gz: 9615debebd296469cf8451fc5908f9410bad9dd655473f8fb9314449abc82e803805d39fd1f1736834d2bcae5d9903f37525577dfe7fa5497777ca554d9a2f7f
6
+ metadata.gz: 85859f89d3a1703a93be6165112cf703a3fbbaf76b32ac0a5b813a6cc585f7351786e58e476a6cb06a4ac70f4576107ebc1914b09dddece59c418c862b2fbc07
7
+ data.tar.gz: 62ed3e43cd3a38c9e71beb8e4f69b4800136102d878820eb2f5e679efa9a1dd01e2f11ba1a1f49d7a427d9f0c707fabb887249aa25e72221f37d2cfd98e8e46b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.4.4] - 2026-03-18
4
+
5
+ Removed: Hardcoded directory lists in `PublicMethodHasSpec` and `SufficientContexts` cops; file selection now relies entirely on department-level `Include`/`Exclude` config
6
+
3
7
  ## [1.4.3] - 2026-03-10
4
8
 
5
9
  Fixed: Department-level custom config keys (`SpecFilePathMappings`, `DescribeAliases`, `SkipMethodDescribeFor`) no longer trigger "unsupported parameter" warnings
@@ -19,7 +19,6 @@ module RuboCop
19
19
  MSG = "Missing spec for public method `%<method_name>s`. " \
20
20
  "Expected %<expected>s in %<spec_path>s"
21
21
 
22
- COVERED_DIRECTORIES = %w[models controllers services jobs mailers helpers].freeze
23
22
  EXCLUDED_METHODS = %w[initialize].freeze
24
23
  EXCLUDED_HOOK_METHODS = %w[included extended inherited prepended].freeze
25
24
  EXCLUDED_PATTERNS = [/^before_/, /^after_/, /^around_/, /^validate_/, /^autosave_/].freeze
@@ -106,7 +105,7 @@ module RuboCop
106
105
  path = processed_source.file_path
107
106
  return false if path.nil? || !path.include?("/app/") || path.end_with?("_spec.rb")
108
107
 
109
- COVERED_DIRECTORIES.any? { |dir| path.include?("/app/#{dir}/") }
108
+ true
110
109
  end
111
110
 
112
111
  def public_method?(node)
@@ -44,14 +44,7 @@ module RuboCop
44
44
  MSG = "Method `%<method_name>s` has %<branches>d %<branch_word>s but only %<contexts>d %<context_word>s " \
45
45
  "in spec. Add %<missing>d more %<missing_word>s to cover all branches."
46
46
 
47
- COVERED_DIRECTORIES = %w[
48
- app/models
49
- app/controllers
50
- app/services
51
- app/jobs
52
- app/mailers
53
- app/helpers
54
- ].freeze
47
+ APP_DIR_PATTERN = %r{/app/}
55
48
 
56
49
  EXCLUDED_METHODS = %w[initialize].freeze
57
50
 
@@ -125,10 +118,7 @@ module RuboCop
125
118
 
126
119
  def in_covered_directory?
127
120
  path = processed_source.path
128
- # Handle both absolute and relative paths
129
- COVERED_DIRECTORIES.any? do |dir|
130
- path.start_with?(dir) || path.include?("/#{dir}/") || path.match?(%r{/#{Regexp.escape(dir)}$})
131
- end
121
+ path.include?("/app/") || path.match?(%r{^app/})
132
122
  end
133
123
 
134
124
  def excluded_method?(method_name)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module RSpecParity
5
- VERSION = "1.4.3"
5
+ VERSION = "1.4.4"
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.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Povilas Jurcys