optify-config 1.11.0-aarch64-linux → 1.13.0-aarch64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 567a7927a1a64dac604d1ac546666992c97ac126bc2d6aa9f7fe01ffc4c3bbae
4
- data.tar.gz: 4e4181cc973e04c3d1f95c44cd52baa17f26b4302429dc94a38f8c0c9c65da0e
3
+ metadata.gz: d5ef45322dbec76106da6ecf79607824c27279db12d68ea91f23a8579e24fc05
4
+ data.tar.gz: 1c01cccf174cd38387645d2aa6a6ca8948a5ba537b5c26725da4a6309fa5c2b7
5
5
  SHA512:
6
- metadata.gz: fc458c1d0f76cf9209676e00e43ebc172cbb810fed5a11a3403a1c7efebf755417491a3d625071491363edf36fd83ecb788b011d6ca65af39095a91a8bd75de0
7
- data.tar.gz: cd41150d49d37a86a55f79acdb5f529ba4fe9e6915a5f376cdd1b5fa2e75a5aa5c41c12ebfdec7e8d2c3feb0aafc5a95a7f669c1f54b471773e0175049f9379b
6
+ metadata.gz: 14ad6b1ca088fadff5b6f09fcda25060e9d27a874f613032b06a85e65275fa5793a6190670f7aeba955f4c357c8bd6daa0c49d866df5897b9498e672b9fbaad3
7
+ data.tar.gz: 1f55f194784ede89efa06e90c6e9127e754494a67e6db8e3e76fe01f1df90020c29ff6d12c002be4ed775190bc3555941e81bc617e93477b58ac95d5caef16d0
Binary file
Binary file
@@ -4,10 +4,16 @@
4
4
  module Optify
5
5
  # Preferences for `get_options`.
6
6
  class GetOptionsPreferences
7
+ # @param constraints [Hash]
8
+ #: (Hash[untyped, untyped]? constraints) -> void
9
+ def constraints=(constraints)
10
+ self.constraints_json = constraints&.to_json
11
+ end
12
+
7
13
  # @param overrides [Hash]
8
- #: (Hash[untyped, untyped] overrides) -> void
14
+ #: (Hash[untyped, untyped]? overrides) -> void
9
15
  def overrides=(overrides)
10
- self.overrides_json = overrides.to_json
16
+ self.overrides_json = overrides&.to_json
11
17
  end
12
18
  end
13
19
  end
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  # typed: strict
3
3
 
4
- require 'json'
5
-
6
4
  require 'sorbet-runtime'
7
5
 
8
6
  require_relative './base_config'
@@ -95,7 +95,7 @@ module Optify
95
95
  init unless @cache
96
96
  feature_names = get_canonical_feature_names(feature_names) unless preferences&.skip_feature_name_conversion
97
97
 
98
- cache_key = [key, feature_names, config_class]
98
+ cache_key = [key, feature_names, preferences&.constraints_json, config_class]
99
99
  result = @cache&.fetch(cache_key, NOT_FOUND_IN_CACHE_SENTINEL)
100
100
  return result unless result.equal?(NOT_FOUND_IN_CACHE_SENTINEL)
101
101
 
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  # typed: strict
3
3
 
4
- require 'json'
5
-
6
4
  require 'sorbet-runtime'
7
5
 
8
6
  require_relative './base_config'
data/rbi/optify.rbi CHANGED
@@ -49,6 +49,16 @@ module Optify
49
49
 
50
50
  # Preferences when getting options.
51
51
  class GetOptionsPreferences
52
+ # Set constraints for the current request to limit the features that can be enabled.
53
+ sig { params(value: T.nilable(T::Hash[T.untyped, T.untyped])).void }
54
+ def constraints=(value); end
55
+
56
+ sig { params(value: T.nilable(String)).void }
57
+ def constraints_json=(value); end
58
+
59
+ sig { returns(T.nilable(String)) }
60
+ def constraints_json; end
61
+
52
62
  # Indicates if overrides are set.
53
63
  sig { returns(T::Boolean) }
54
64
  def overrides?; end
@@ -65,6 +75,9 @@ module Optify
65
75
  sig { params(value: T.nilable(String)).void }
66
76
  def overrides_json=(value); end
67
77
 
78
+ sig { returns(T.nilable(String)) }
79
+ def overrides_json; end
80
+
68
81
  sig { params(value: T::Boolean).void }
69
82
  def skip_feature_name_conversion=(value); end
70
83
 
@@ -82,13 +95,13 @@ module Optify
82
95
  # Build using just one directory.
83
96
  # @param directory The directory to build the provider from.
84
97
  # @return The instance.
85
- sig { params(directory: String).returns(OptionsRegistry) }
98
+ sig { params(directory: String).returns(T.attached_class) }
86
99
  def build(directory); end
87
100
 
88
101
  # Build from multiple directories.
89
102
  # @param directories The directories to build the provider from.
90
103
  # @return The instance.
91
- sig { params(directories: T::Array[String]).returns(OptionsRegistry) }
104
+ sig { params(directories: T::Array[String]).returns(T.attached_class) }
92
105
  def build_from_directories(directories); end
93
106
  end
94
107
 
data/sig/optify.rbs CHANGED
@@ -40,6 +40,13 @@ end
40
40
 
41
41
  # Preferences when getting options.
42
42
  class Optify::GetOptionsPreferences
43
+ # Set constraints for the current request to limit the features that can be enabled.
44
+ def constraints=: (::Hash[untyped, untyped]? value) -> void
45
+
46
+ def constraints_json=: (String? value) -> void
47
+
48
+ def constraints_json: () -> String?
49
+
43
50
  # Indicates if overrides are set.
44
51
  def overrides?: () -> bool
45
52
 
@@ -53,6 +60,8 @@ class Optify::GetOptionsPreferences
53
60
  # @param value The overrides to apply as serialized JSON.
54
61
  def overrides_json=: (String? value) -> void
55
62
 
63
+ def overrides_json: () -> String?
64
+
56
65
  def skip_feature_name_conversion=: (bool value) -> void
57
66
 
58
67
  def skip_feature_name_conversion: () -> bool
@@ -65,12 +74,12 @@ class Optify::OptionsRegistry
65
74
  # Build using just one directory.
66
75
  # @param directory The directory to build the provider from.
67
76
  # @return The instance.
68
- def build: (String directory) -> OptionsRegistry
77
+ def build: (String directory) -> instance
69
78
 
70
79
  # Build from multiple directories.
71
80
  # @param directories The directories to build the provider from.
72
81
  # @return The instance.
73
- def build_from_directories: (::Array[String] directories) -> OptionsRegistry
82
+ def build_from_directories: (::Array[String] directories) -> instance
74
83
 
75
84
  # @return All of the aliases.
76
85
  def aliases: () -> ::Array[String]
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.11.0
4
+ version: 1.13.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Justin D. Harris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-04 00:00:00.000000000 Z
11
+ date: 2025-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime