optify-config 1.4.0-arm64-darwin → 1.4.2-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/optify_ruby/3.2/optify_ruby.bundle +0 -0
 - data/lib/optify_ruby/3.4/optify_ruby.bundle +0 -0
 - data/lib/optify_ruby/provider_module.rb +15 -9
 - metadata +12 -12
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: e779a97a74b26e0cf5aceffbebea898c746233e4b4fa1aacd95eca0599634b2d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 25b677edc0a575c5530026a8f3dae5e8d5bb0f8f177a373e8c16698a0b0d9133
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f186ef47218ead45c7c44d98c822be784a58e7120670ad872de6351b06912a86f6c37fb6398eb8da8af99c1bcbc4a60fab1cf8e23e2e97e2632cfcc951e9f7d6
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ba10c02c03e40e863d788293bd3f3cb572d02125b9f962ea2d4892b363c5a8ea31f521279cbff1a87b65bc680a6b6f695bc9cb242eeaefda8726a724e3a1305a
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -11,7 +11,7 @@ module Optify 
     | 
|
| 
       11 
11 
     | 
    
         
             
                #: (Array[String] feature_names) -> Array[String]
         
     | 
| 
       12 
12 
     | 
    
         
             
                def get_canonical_feature_names(feature_names)
         
     | 
| 
       13 
13 
     | 
    
         
             
                  # Try to optimize a typical case where there are just a few features.
         
     | 
| 
       14 
     | 
    
         
            -
                  # Ideally in production, a single feature that imports many other features is used for the most common  
     | 
| 
      
 14 
     | 
    
         
            +
                  # Ideally in production, a single feature that imports many other features is used for the most common scenarios.
         
     | 
| 
       15 
15 
     | 
    
         
             
                  # Benchmarks show that it is faster to use a loop than to call the Rust implementation which involves making a `Vec<String>` and returning a `Vec<String>`.
         
     | 
| 
       16 
16 
     | 
    
         
             
                  if feature_names.length < 4
         
     | 
| 
       17 
17 
     | 
    
         
             
                    feature_names.map { |feature_name| get_canonical_feature_name(feature_name) }
         
     | 
| 
         @@ -93,19 +93,25 @@ module Optify 
     | 
|
| 
       93 
93 
     | 
    
         
             
                  end
         
     | 
| 
       94 
94 
     | 
    
         | 
| 
       95 
95 
     | 
    
         
             
                  init unless @cache
         
     | 
| 
       96 
     | 
    
         
            -
                  unless preferences&.skip_feature_name_conversion
         
     | 
| 
       97 
     | 
    
         
            -
                    # When there are just a few names, then it can be faster to convert them one by one in a loop to avoid working with an array in Rust.
         
     | 
| 
       98 
     | 
    
         
            -
                    # When there are over 7 names, then it is faster to convert them with one call to Rust.
         
     | 
| 
       99 
     | 
    
         
            -
                    feature_names = get_canonical_feature_names(feature_names)
         
     | 
| 
       100 
     | 
    
         
            -
                  end
         
     | 
| 
      
 96 
     | 
    
         
            +
                  feature_names = get_canonical_feature_names(feature_names) unless preferences&.skip_feature_name_conversion
         
     | 
| 
       101 
97 
     | 
    
         | 
| 
       102 
98 
     | 
    
         
             
                  cache_key = [key, feature_names, config_class]
         
     | 
| 
       103 
99 
     | 
    
         
             
                  result = @cache&.fetch(cache_key, NOT_FOUND_IN_CACHE_SENTINEL)
         
     | 
| 
       104 
100 
     | 
    
         
             
                  return result unless result.equal?(NOT_FOUND_IN_CACHE_SENTINEL)
         
     | 
| 
       105 
101 
     | 
    
         | 
| 
       106 
     | 
    
         
            -
                  #  
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
                   
     | 
| 
      
 102 
     | 
    
         
            +
                  # Handle a cache miss.
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                  # We can avoid converting the features names because they're already converted, if that was desired.
         
     | 
| 
      
 105 
     | 
    
         
            +
                  if preferences.nil?
         
     | 
| 
      
 106 
     | 
    
         
            +
                    preferences = GetOptionsPreferences.new
         
     | 
| 
      
 107 
     | 
    
         
            +
                    preferences.skip_feature_name_conversion = true
         
     | 
| 
      
 108 
     | 
    
         
            +
                  else
         
     | 
| 
      
 109 
     | 
    
         
            +
                    # Indeed the copying of preferences could be wasteful, but this only happens on a cache miss
         
     | 
| 
      
 110 
     | 
    
         
            +
                    # and when no custom preferences are provided.
         
     | 
| 
      
 111 
     | 
    
         
            +
                    preferences = preferences.dup
         
     | 
| 
      
 112 
     | 
    
         
            +
                    preferences.skip_feature_name_conversion = true
         
     | 
| 
      
 113 
     | 
    
         
            +
                  end
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
       109 
115 
     | 
    
         
             
                  result = get_options(key, feature_names, config_class, nil, preferences)
         
     | 
| 
       110 
116 
     | 
    
         | 
| 
       111 
117 
     | 
    
         
             
                  T.must(@cache)[cache_key] = result
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: optify-config
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.4.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: arm64-darwin
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Justin D. Harris
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2025-05- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-05-15 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: sorbet-runtime
         
     | 
| 
         @@ -16,56 +16,56 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: 0.5. 
     | 
| 
      
 19 
     | 
    
         
            +
                    version: 0.5.12083
         
     | 
| 
       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: 0.5. 
     | 
| 
      
 26 
     | 
    
         
            +
                    version: 0.5.12083
         
     | 
| 
       27 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       28 
28 
     | 
    
         
             
              name: rake-compiler
         
     | 
| 
       29 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       30 
30 
     | 
    
         
             
                requirements:
         
     | 
| 
       31 
31 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       32 
32 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       33 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 1.3.0
         
     | 
| 
       34 
34 
     | 
    
         
             
              type: :development
         
     | 
| 
       35 
35 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       36 
36 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       37 
37 
     | 
    
         
             
                requirements:
         
     | 
| 
       38 
38 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       39 
39 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       40 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 40 
     | 
    
         
            +
                    version: 1.3.0
         
     | 
| 
       41 
41 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       42 
42 
     | 
    
         
             
              name: rbs
         
     | 
| 
       43 
43 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       44 
44 
     | 
    
         
             
                requirements:
         
     | 
| 
       45 
45 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
     | 
    
         
            -
                    version: 3.9. 
     | 
| 
      
 47 
     | 
    
         
            +
                    version: 3.9.3
         
     | 
| 
       48 
48 
     | 
    
         
             
              type: :development
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       50 
50 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: 3.9. 
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 3.9.3
         
     | 
| 
       55 
55 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
56 
     | 
    
         
             
              name: sorbet
         
     | 
| 
       57 
57 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       58 
58 
     | 
    
         
             
                requirements:
         
     | 
| 
       59 
59 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       60 
60 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
     | 
    
         
            -
                    version: 0.5. 
     | 
| 
      
 61 
     | 
    
         
            +
                    version: 0.5.12083
         
     | 
| 
       62 
62 
     | 
    
         
             
              type: :development
         
     | 
| 
       63 
63 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       64 
64 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       65 
65 
     | 
    
         
             
                requirements:
         
     | 
| 
       66 
66 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       67 
67 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       68 
     | 
    
         
            -
                    version: 0.5. 
     | 
| 
      
 68 
     | 
    
         
            +
                    version: 0.5.12083
         
     | 
| 
       69 
69 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       70 
70 
     | 
    
         
             
              name: tapioca
         
     | 
| 
       71 
71 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -86,14 +86,14 @@ dependencies: 
     | 
|
| 
       86 
86 
     | 
    
         
             
                requirements:
         
     | 
| 
       87 
87 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       88 
88 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       89 
     | 
    
         
            -
                    version: 3.6. 
     | 
| 
      
 89 
     | 
    
         
            +
                    version: 3.6.8
         
     | 
| 
       90 
90 
     | 
    
         
             
              type: :development
         
     | 
| 
       91 
91 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       92 
92 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       93 
93 
     | 
    
         
             
                requirements:
         
     | 
| 
       94 
94 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       95 
95 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
     | 
    
         
            -
                    version: 3.6. 
     | 
| 
      
 96 
     | 
    
         
            +
                    version: 3.6.8
         
     | 
| 
       97 
97 
     | 
    
         
             
            description: |-
         
     | 
| 
       98 
98 
     | 
    
         
             
              Simplifies getting the right configuration options for a process using pre-loaded configurations
         
     | 
| 
       99 
99 
     | 
    
         
             
                from files to manage options for experiments or flights.
         
     |