code_ownership 2.0.0.pre.3-x86_64-linux → 2.0.0.pre.4-x86_64-linux
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/private/team_finder.rb +19 -2
 - data/lib/code_ownership/version.rb +1 -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: 442f335697ae3f675ce8c32fe64f383c59827c1dac2d391d7692a0a592599530
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 20c27aabe94150d50597612d7f75de260bac0160cd077f79d27bc76fac4a58e1
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 46bb94f09cecacf6676de4e844ab6de6db58a7fb5e52dea670135acb1f039b60a2b233aff1cb7aa9611cc82dd35d8201b6a6b4bf0ce5f5d8e98a6133d13c6122
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2a1097bcc8ef68d57c10de17264d5a37f9bd7df6a3240a5439be2e4df80a0b9bd1c55418f3e504672de016ac0db4d21a61e056916e814a0bcbaefb72bac9f0a7
         
     | 
| 
         @@ -32,12 +32,29 @@ module CodeOwnership 
     | 
|
| 
       32 
32 
     | 
    
         | 
| 
       33 
33 
     | 
    
         
             
                  sig { params(files: T::Array[String], allow_raise: T::Boolean).returns(T::Hash[String, T.nilable(CodeTeams::Team)]) }
         
     | 
| 
       34 
34 
     | 
    
         
             
                  def teams_for_files(files, allow_raise: false)
         
     | 
| 
       35 
     | 
    
         
            -
                     
     | 
| 
      
 35 
     | 
    
         
            +
                    result = {}
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
                    # Collect cached results and identify non-cached files
         
     | 
| 
      
 38 
     | 
    
         
            +
                    not_cached_files = []
         
     | 
| 
      
 39 
     | 
    
         
            +
                    files.each do |file_path|
         
     | 
| 
      
 40 
     | 
    
         
            +
                      if FilePathTeamCache.cached?(file_path)
         
     | 
| 
      
 41 
     | 
    
         
            +
                        result[file_path] = FilePathTeamCache.get(file_path)
         
     | 
| 
      
 42 
     | 
    
         
            +
                      else
         
     | 
| 
      
 43 
     | 
    
         
            +
                        not_cached_files << file_path
         
     | 
| 
      
 44 
     | 
    
         
            +
                      end
         
     | 
| 
      
 45 
     | 
    
         
            +
                    end
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                    return result if not_cached_files.empty?
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                    # Process non-cached files
         
     | 
| 
      
 50 
     | 
    
         
            +
                    ::RustCodeOwners.teams_for_files(not_cached_files).each do |path_team|
         
     | 
| 
       36 
51 
     | 
    
         
             
                      file_path, team = path_team
         
     | 
| 
       37 
52 
     | 
    
         
             
                      found_team = team ? find_team!(team[:team_name], allow_raise: allow_raise) : nil
         
     | 
| 
       38 
53 
     | 
    
         
             
                      FilePathTeamCache.set(file_path, found_team)
         
     | 
| 
       39 
     | 
    
         
            -
                       
     | 
| 
      
 54 
     | 
    
         
            +
                      result[file_path] = found_team
         
     | 
| 
       40 
55 
     | 
    
         
             
                    end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                    result
         
     | 
| 
       41 
58 
     | 
    
         
             
                  end
         
     | 
| 
       42 
59 
     | 
    
         | 
| 
       43 
60 
     | 
    
         
             
                  sig { params(klass: T.nilable(T.any(T::Class[T.anything], Module))).returns(T.nilable(::CodeTeams::Team)) }
         
     | 
    
        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.0.0.pre. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.0.0.pre.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: x86_64-linux
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Gusto Engineers
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2025-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-09-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: code_teams
         
     |