optify-config 1.10.0-arm64-darwin → 1.12.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/optify_ruby/3.2/optify_ruby.bundle +0 -0
- data/lib/optify_ruby/3.4/optify_ruby.bundle +0 -0
- data/lib/optify_ruby/get_options_preferences.rb +6 -0
- data/lib/optify_ruby/implementation.rb +0 -2
- data/lib/optify_ruby/provider_module.rb +1 -1
- data/lib/optify_ruby/watcher_implementation.rb +0 -2
- data/rbi/optify.rbi +17 -5
- data/sig/optify.rbs +13 -5
- 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: 22c31f972865d381bcc7563951335692470074907882d142c9ee4ebfac5ae43d
|
4
|
+
data.tar.gz: f22e2dd3106ad2ca9abd07960aed5df2c9db1804dc40e2e6832bce22d4cbc684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48e1c6c8a2e1c88f10a38934ff4137823fa8e945bdec32878f18b6e9b513cf72d5e94386c6ca5851a0e00dc578182e94a71a0aa451960ae23eb42dba06693fcc
|
7
|
+
data.tar.gz: b1b56817ac220c88d4a6a4db90790dfc59cc6b9428baa3a828d9e95c34392e8cb3ad19a05de29da2908d9a11fbc77e2fd6a016750d36b8bff16b4724a9d232d2
|
Binary file
|
Binary file
|
@@ -4,6 +4,12 @@
|
|
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
14
|
#: (Hash[untyped, untyped] overrides) -> void
|
9
15
|
def overrides=(overrides)
|
@@ -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
|
|
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
|
|
@@ -74,19 +87,21 @@ module Optify
|
|
74
87
|
|
75
88
|
# A registry of features that provides configurations.
|
76
89
|
class OptionsRegistry
|
90
|
+
include ProviderModule
|
91
|
+
|
77
92
|
abstract!
|
78
93
|
|
79
94
|
class << self
|
80
95
|
# Build using just one directory.
|
81
96
|
# @param directory The directory to build the provider from.
|
82
97
|
# @return The instance.
|
83
|
-
sig { params(directory: String).returns(
|
98
|
+
sig { params(directory: String).returns(T.attached_class) }
|
84
99
|
def build(directory); end
|
85
100
|
|
86
101
|
# Build from multiple directories.
|
87
102
|
# @param directories The directories to build the provider from.
|
88
103
|
# @return The instance.
|
89
|
-
sig { params(directories: T::Array[String]).returns(
|
104
|
+
sig { params(directories: T::Array[String]).returns(T.attached_class) }
|
90
105
|
def build_from_directories(directories); end
|
91
106
|
end
|
92
107
|
|
@@ -209,7 +224,6 @@ module Optify
|
|
209
224
|
|
210
225
|
# Provides configurations based on keys and enabled feature names.
|
211
226
|
class OptionsProvider < OptionsRegistry
|
212
|
-
include ProviderModule
|
213
227
|
end
|
214
228
|
|
215
229
|
# A builder for creating an `OptionsProvider` instance.
|
@@ -228,8 +242,6 @@ module Optify
|
|
228
242
|
|
229
243
|
# Like `OptionsProvider` but also watches for changes to the files and reloads the options.
|
230
244
|
class OptionsWatcher < OptionsRegistry
|
231
|
-
include ProviderModule
|
232
|
-
|
233
245
|
# @return [Time] Returns the time when the provider was finished building.
|
234
246
|
sig { returns(Time) }
|
235
247
|
def last_modified; end
|
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
|
@@ -60,15 +69,17 @@ end
|
|
60
69
|
|
61
70
|
# A registry of features that provides configurations.
|
62
71
|
class Optify::OptionsRegistry
|
72
|
+
include ProviderModule
|
73
|
+
|
63
74
|
# Build using just one directory.
|
64
75
|
# @param directory The directory to build the provider from.
|
65
76
|
# @return The instance.
|
66
|
-
def build: (String directory) ->
|
77
|
+
def build: (String directory) -> instance
|
67
78
|
|
68
79
|
# Build from multiple directories.
|
69
80
|
# @param directories The directories to build the provider from.
|
70
81
|
# @return The instance.
|
71
|
-
def build_from_directories: (::Array[String] directories) ->
|
82
|
+
def build_from_directories: (::Array[String] directories) -> instance
|
72
83
|
|
73
84
|
# @return All of the aliases.
|
74
85
|
def aliases: () -> ::Array[String]
|
@@ -139,7 +150,6 @@ end
|
|
139
150
|
|
140
151
|
# Provides configurations based on keys and enabled feature names.
|
141
152
|
class Optify::OptionsProvider < OptionsRegistry
|
142
|
-
include ProviderModule
|
143
153
|
end
|
144
154
|
|
145
155
|
# A builder for creating an `OptionsProvider` instance.
|
@@ -156,8 +166,6 @@ end
|
|
156
166
|
|
157
167
|
# Like `OptionsProvider` but also watches for changes to the files and reloads the options.
|
158
168
|
class Optify::OptionsWatcher < OptionsRegistry
|
159
|
-
include ProviderModule
|
160
|
-
|
161
169
|
# @return [Time] Returns the time when the provider was finished building.
|
162
170
|
def last_modified: () -> Time
|
163
171
|
end
|
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
|
+
version: 1.12.0
|
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-07-
|
11
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-runtime
|