optify-config 0.4.4-x86_64-linux → 0.4.6-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 172cfe4a0f2400de69f0556dd03c1d053df7df35842a0fd4c3dee59e86f1e731
4
- data.tar.gz: 7931d4066d612db982573d8ad1afad1dd1f5d285605809058a3a6a0f56208e6c
3
+ metadata.gz: 307398c5de05a2c31fa1c2b95fdf53f45fcff85c9f5d8e207ccb42afc0ae81df
4
+ data.tar.gz: 490fea48aee310176dd3ea33a10fc6fee90d176c66ac5f4f7bd9c34c45f3404f
5
5
  SHA512:
6
- metadata.gz: df23fbd41d63b87987cb7edcfdf16083edbed8a72ba52f5543f728e92cdbdc348d90bf45b30ed96e6d9ae4c57c0762ac966138a08430887980bb7887194dcbb4
7
- data.tar.gz: d3601c55fcaee42d75dd024d560485e6c026e0e0bfbbe8b2d8d43247fb7eb7f70dd5993998e1219edd90ac21f92e2e4737d38bac9397348a05d69148335cb078
6
+ metadata.gz: 282e6eb18b879b3a9be8165947b7e1f061b6da41bcbc433634729241088561a4b96222d97aae02b8462cb61a0f042d7a8892812c5900aa9bbefcf49da1d94723
7
+ data.tar.gz: 80e00866e2ac16a5aea1fb252d08fea5961d550aa1101b3a21bbc01535d5ff2baefb4cffe90483386266970daea518c2d42303cba920ace3082c5def49ec80be
Binary file
Binary file
Binary file
@@ -16,7 +16,7 @@ module Optify
16
16
  extend T::Helpers
17
17
  abstract!
18
18
 
19
- # Create a new instance of the class from a hash.
19
+ # Create a new immutable instance of the class from a hash.
20
20
  #
21
21
  # This is a class method that so that it can set members with private setters.
22
22
  # @param hash [Hash] The hash to create the instance from.
@@ -30,7 +30,8 @@ module Optify
30
30
  value = _convert_value(value, sig_return_type)
31
31
  result.instance_variable_set("@#{key}", value)
32
32
  end
33
- result
33
+
34
+ T.unsafe(result).freeze if T.unsafe(result).respond_to?(:freeze)
34
35
  end
35
36
 
36
37
  sig { params(value: T.untyped, type: T.untyped).returns(T.untyped) }
@@ -44,11 +45,11 @@ module Optify
44
45
  # Handle array of 1 type.
45
46
  type.type
46
47
  end
47
- return value.map { |v| _convert_value(v, type) }
48
+ return value.map { |v| _convert_value(v, type) }.freeze
48
49
  when Hash
49
50
  # Handle nilable hash.
50
51
  type = type.unwrap_nilable if type.respond_to?(:unwrap_nilable)
51
- return _convert_hash(value, type)
52
+ return _convert_hash(value, type).freeze
52
53
  end
53
54
 
54
55
  value
@@ -18,17 +18,6 @@ module Optify
18
18
  class OptionsProvider
19
19
  extend T::Sig
20
20
 
21
- # Fetches options in JSON format based on the provided key and feature names.
22
- #
23
- # @param key [String] the key to fetch options for.
24
- # @param feature_names [Array<String>] The enabled feature names to use to build the options.
25
- # @return [String] the options in JSON.
26
- sig { params(key: String, feature_names: T::Array[String]).returns(String) }
27
- def get_options_json(key, feature_names)
28
- # Implemented in Rust.
29
- raise NotImplementedError
30
- end
31
-
32
21
  # Fetches options based on the provided key and feature names.
33
22
  #
34
23
  # @param key [String] the key to fetch options for.
@@ -88,31 +77,8 @@ module Optify
88
77
  return result unless result.equal?(NOT_FOUND_IN_CACHE_SENTINEL)
89
78
 
90
79
  result = get_options(key, feature_names, config_class)
91
- T.unsafe(result).freeze if T.unsafe(result).respond_to?(:freeze)
92
80
 
93
81
  @cache[cache_key] = result
94
82
  end
95
83
  end
96
-
97
- # A builder for creating an `OptionsProvider` instance.
98
- class OptionsProviderBuilder
99
- extend T::Sig
100
-
101
- # Adds a directory to the builder.
102
- #
103
- # @param path [String] The path of the directory to add.
104
- # @return [OptionsProviderBuilder] `self`.
105
- sig { params(path: String).returns(OptionsProviderBuilder) }
106
- def add_directory(path)
107
- # Implemented in Rust.
108
- raise NotImplementedError
109
- end
110
-
111
- # @return [OptionsProvider] A newly built `OptionsProvider`.
112
- sig { returns(OptionsProvider) }
113
- def build
114
- # Implemented in Rust.
115
- raise NotImplementedError
116
- end
117
- end
118
84
  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: 0.4.4
4
+ version: 0.4.6
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Justin D. Harris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-10 00:00:00.000000000 Z
11
+ date: 2025-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime