code_ownership 2.1.3-arm64-darwin → 2.2.0-arm64-darwin
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/code_ownership/3.3/code_ownership.bundle +0 -0
- data/lib/code_ownership/3.4/code_ownership.bundle +0 -0
- data/lib/code_ownership/4.0/code_ownership.bundle +0 -0
- data/lib/code_ownership/private/team_finder.rb +3 -3
- data/lib/code_ownership/version.rb +1 -1
- data/lib/code_ownership.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6538bb70b0368b924c8b4dc53f7527cb07a1ab8e82071a94b858c851df193c2c
|
|
4
|
+
data.tar.gz: 2ab3748b627697004f60bccafe80e140f934eed5eb0fe5cf9e4bfa0b69b4b09e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d42d03fef183fc4c6715421083ec9c7ba1fc430969401baf32647844b52171117395ad6d9690a390f4f2b043f78d2c35082b8f6e94c118d0339ed41a55c9dcc2
|
|
7
|
+
data.tar.gz: 566fd29b5dbb3096392782fed3239e124d2bf7ace740f1fe679554b1dce4ae4c14e9cc3d319a28032d66b6d5236c32fbd22348b9ad1356052a065cf00f33d487
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,12 +12,12 @@ module CodeOwnership
|
|
|
12
12
|
|
|
13
13
|
return FilePathTeamCache.get(file_path) if FilePathTeamCache.cached?(file_path)
|
|
14
14
|
|
|
15
|
-
result = T.let(RustCodeOwners.for_file(file_path), T.nilable(
|
|
15
|
+
result = T.let(RustCodeOwners.for_file(file_path), T.nilable(FileOwnershipDetails))
|
|
16
16
|
|
|
17
|
-
if result.nil?
|
|
17
|
+
if result.nil?
|
|
18
18
|
FilePathTeamCache.set(file_path, nil)
|
|
19
19
|
else
|
|
20
|
-
FilePathTeamCache.set(file_path, T.let(find_team!(
|
|
20
|
+
FilePathTeamCache.set(file_path, T.let(find_team!(result[:team_name], allow_raise: allow_raise), T.nilable(CodeTeams::Team)))
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
FilePathTeamCache.get(file_path)
|
data/lib/code_ownership.rb
CHANGED
|
@@ -28,6 +28,11 @@ module CodeOwnership
|
|
|
28
28
|
|
|
29
29
|
GlobsToOwningTeamMap = T.type_alias { T::Hash[String, CodeTeams::Team] }
|
|
30
30
|
|
|
31
|
+
# The `Team` struct that the Rust extension serializes out of `RustCodeOwners.for_file`.
|
|
32
|
+
FileOwnershipDetails = T.type_alias do
|
|
33
|
+
{ team_name: String, team_config_yml: String, reasons: T::Array[String] }
|
|
34
|
+
end
|
|
35
|
+
|
|
31
36
|
# Returns the version of the code_ownership gem and the codeowners-rs gem.
|
|
32
37
|
sig { returns(T::Array[String]) }
|
|
33
38
|
def self.version
|
|
@@ -154,7 +159,7 @@ module CodeOwnership
|
|
|
154
159
|
# @see #for_file for a simpler ownership lookup that returns just the team
|
|
155
160
|
# @see CLI#for_file for the command-line interface that uses this method
|
|
156
161
|
#
|
|
157
|
-
sig { params(file: String).returns(T.nilable(
|
|
162
|
+
sig { params(file: String).returns(T.nilable(FileOwnershipDetails)) }
|
|
158
163
|
def self.for_file_verbose(file)
|
|
159
164
|
::RustCodeOwners.for_file(file)
|
|
160
165
|
end
|
|
@@ -312,10 +317,13 @@ module CodeOwnership
|
|
|
312
317
|
# Namely, the set of files, packages, and directories which are tracked for ownership should not change.
|
|
313
318
|
# The primary reason this is helpful is for clients of CodeOwnership who want to test their code, and each test context
|
|
314
319
|
# has different ownership and tracked files.
|
|
320
|
+
# It also clears the team files that codeowners-rs caches for `for_file(..., from_codeowners: false)`,
|
|
321
|
+
# so call it after adding or editing team files in a long-lived process.
|
|
315
322
|
sig { void }
|
|
316
323
|
def self.bust_caches!
|
|
317
324
|
Private::FilePathTeamCache.bust_cache!
|
|
318
325
|
Private::FilePathFinder.instance_variable_set(:@pwd, nil)
|
|
319
326
|
Private::FilePathFinder.instance_variable_set(:@pwd_prefix, nil)
|
|
327
|
+
::RustCodeOwners.clear_team_cache
|
|
320
328
|
end
|
|
321
329
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: code_ownership
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: arm64-darwin
|
|
6
6
|
authors:
|
|
7
7
|
- Gusto Engineers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: code_teams
|