use_packs 0.0.17 → 0.0.19
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 +4 -4
- data/lib/use_packs/private.rb +4 -4
- data/lib/use_packs/rubocop_post_processor.rb +9 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c91cf31b0f2e560b5ea797df175fc15d5480057d622c93a26a6b6dd6dc470f8
|
4
|
+
data.tar.gz: cd7ff3e14cc6a67df490ece991ae2779fef0b88493c9f1bebe67b539c90e4da4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5be0a6fb61d223c991afd30b55baaaf74035cf7d0e66953dd4d10732fd7a8e2cfc4cadc2b4a6bdc6fee88440e041e53c89f478c3005b0701c6915760d2d2f95b
|
7
|
+
data.tar.gz: 251134796f9054ab9ed1b1d3ebab9c6c33ec74302510c1cbd81f7628cb427e3e88be321e130d44ae3f0aa85a37f1cb252d3edbabee12c0b9803c834e1c907ff9
|
data/lib/use_packs/private.rb
CHANGED
@@ -371,20 +371,20 @@ module UsePacks
|
|
371
371
|
# TODO: This should probably be `if defined?(CodeOwnership) && CodeOwnership.configured?`
|
372
372
|
# but we'll need to add an API to CodeOwnership to do this
|
373
373
|
if Pathname.new('config/code_ownership.yml').exist?
|
374
|
-
|
374
|
+
config = {
|
375
375
|
'owner' => team.nil? ? 'MyTeam' : team.name
|
376
376
|
}
|
377
377
|
else
|
378
|
-
|
378
|
+
config = {}
|
379
379
|
end
|
380
380
|
|
381
381
|
package = ParsePackwerk::Package.new(
|
382
382
|
enforce_dependencies: should_enforce_dependenceies,
|
383
383
|
enforce_privacy: enforce_privacy,
|
384
384
|
dependencies: [],
|
385
|
-
metadata:
|
385
|
+
metadata: {},
|
386
386
|
name: pack_name,
|
387
|
-
config:
|
387
|
+
config: config
|
388
388
|
)
|
389
389
|
|
390
390
|
ParsePackwerk.write_package_yml!(package)
|
@@ -7,6 +7,8 @@ module UsePacks
|
|
7
7
|
|
8
8
|
sig { override.params(file_move_operation: Private::FileMoveOperation).void }
|
9
9
|
def before_move_file!(file_move_operation)
|
10
|
+
return unless rubocop_enabled?
|
11
|
+
|
10
12
|
relative_path_to_origin = file_move_operation.origin_pathname
|
11
13
|
relative_path_to_destination = file_move_operation.destination_pathname
|
12
14
|
|
@@ -50,6 +52,8 @@ module UsePacks
|
|
50
52
|
|
51
53
|
sig { params(file_move_operations: T::Array[Private::FileMoveOperation]).void }
|
52
54
|
def after_move_files!(file_move_operations)
|
55
|
+
return unless rubocop_enabled?
|
56
|
+
|
53
57
|
# There could also be no TODOs for this file, but moving it produced TODOs. This could happen if:
|
54
58
|
# 1) The origin pack did not enforce a rubocop, such as typed public APIs
|
55
59
|
# 2) The file satisfied the cop in the origin pack, such as the Packs/RootNamespaceIsPackName, but the desired
|
@@ -63,5 +67,10 @@ module UsePacks
|
|
63
67
|
|
64
68
|
RuboCop::Packs.regenerate_todo(files: files)
|
65
69
|
end
|
70
|
+
|
71
|
+
sig { returns(T::Boolean) }
|
72
|
+
def rubocop_enabled?
|
73
|
+
Pathname.new('.rubocop.yml').exist?
|
74
|
+
end
|
66
75
|
end
|
67
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: use_packs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: code_ownership
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.33.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.33.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colorize
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|