optify-config 1.4.0-arm64-darwin → 1.4.1-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: d5323df292e4343c8e96adefab27f4c86fb02144af156f9c68c9d121365186c5
|
4
|
+
data.tar.gz: ab4346606d0624c868cb9bb980f25567f99a0961651b715620b16915ac3b857d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f660032bbb46c1ec49b9eca62cb7f7b07b213c4050c8794bc7b6d493418c281038c7acc2e0ca2bde8de59fbb7b67961c8d39df8f7e64104b80b972dc38a445a0
|
7
|
+
data.tar.gz: 1230db10484560654152e9bfe0bdc41dd0f2d33e8728b23f5998a607ef625a3c7eff6adecb80268261d6e2aca84cbf869a881e706387b921f44490486c58bfe1
|
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.1
|
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-10 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.
|