package_protections 3.1.0 → 3.2.0

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: 217ae8f6eee7f084ff39ce7c4cf0bb06a08c361abff49e411d730a3a79592b71
4
- data.tar.gz: 21a4eea2876078f531a67d3705e7a0d38c11b3bf87cd265e552bda9e8661638a
3
+ metadata.gz: aabad25e536a226f791248e858e8db7fc67410b2d623879326165630bfd0922d
4
+ data.tar.gz: 64b1d4b5ab05315e9c5ecefdd3105af7485a6f2ed0ba59b9ae456c306b824d72
5
5
  SHA512:
6
- metadata.gz: 1633812b257db230cf9f0244c8dd397197d4feb98f37abcd9906e5660adbfb7985c82fc6758254f99771726d49d3796c2e30438a54bd14a75c9ed3b64dbca1a0
7
- data.tar.gz: e1aafb82c4a5a93425cbfc28135bae436b792681f6cbd8257f95e2d51d985a436e80d191313d2959a3e9c37423f970608109bca773a5ffe0ad01af3d6214b6da
6
+ metadata.gz: 58aea344a1b283458d878b224c02fd339e27ca541f2ee025a65970ca94fc717ad5b95137e577760cb512fabf4c5657ccb15f8bc57f78330960294a47c2ad1898
7
+ data.tar.gz: 2700f4963e5fe0c5b987aede413458a7181ee8e471b9689bf0dcd0659bd535e99ffee83487ae88c1acfbcc245e8f62da91c070a77bcbea060a4a59bc00b21e19
@@ -10,36 +10,6 @@ module RuboCop
10
10
  extend T::Sig
11
11
  include ::PackageProtections::RubocopProtectionInterface
12
12
 
13
- # We override `cop_configs` for this protection.
14
- # The default behavior disables cops when a package has turned off a protection.
15
- # However: namespace violations can occur even when one package has TURNED OFF their namespace protection
16
- # but another package has it turned on. Therefore, all packages must always be opted in no matter what.
17
- #
18
- sig do
19
- params(packages: T::Array[::PackageProtections::ProtectedPackage])
20
- .returns(T::Array[::PackageProtections::RubocopProtectionInterface::CopConfig])
21
- end
22
- def cop_configs(packages)
23
- include_packs = T.let([], T::Array[String])
24
- packages.each do |p|
25
- enabled_for_pack = !p.violation_behavior_for(NamespacedUnderPackageName::IDENTIFIER).fail_never?
26
- if enabled_for_pack
27
- include_packs << p.name
28
- end
29
- end
30
-
31
- [
32
- ::PackageProtections::RubocopProtectionInterface::CopConfig.new(
33
- name: cop_name,
34
- enabled: include_packs.any?,
35
- metadata: {
36
- 'IncludePacks' => include_packs,
37
- 'GloballyPermittedNamespaces' => ::RuboCop::Packs.config.globally_permitted_namespaces
38
- }
39
- )
40
- ]
41
- end
42
-
43
13
  sig { override.returns(T::Array[String]) }
44
14
  def included_globs_for_pack
45
15
  [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: package_protections
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers