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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6f0344e2a2bf2511a1bc8739c4ccf449a59526efde141ea4d9209c07b1330be1
|
|
4
|
+
data.tar.gz: a5432ea9890d24e15815ddc8cdfcae8762cdd65b0de0ba9a77ab876d5cc20e53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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)
|