optify-config 1.0.0-aarch64-linux → 1.1.1-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: 51552f5bc63a6d848c6732775ff90d3c55e8df38c03678e0b7893b92ae6b85b5
4
- data.tar.gz: 83db3b06f570a86590d7a098df89abe2ca59f8600535966785e918838b606623
3
+ metadata.gz: 9e07d165f6c657961271be1fbf32dce5170bf09a218e62e74619611bb751836f
4
+ data.tar.gz: 31a863affcd275f56c129776842757439fd8448d97fbf3c7d5ab5e4d21b09e95
5
5
  SHA512:
6
- metadata.gz: 528a545731fb48452fda26e2779a7c44673ae7f9933c132d398356edfced2a025237aee1b5fbd51ee50f8c36969e0039a46e559d79bef528dcf7998e068b8ac4
7
- data.tar.gz: ae8e8b8a380d070166a1657903dd3e1f6240554df190c1cc7ec007a929ba116c50c31719e74152a63eaf6e72a2bd926584280be2f11828d84fd4b4f0f87b7944
6
+ metadata.gz: c5cd8d8867088d60d78ec6b9ccd34cef8e9b6b8531af9684b57a0986c1bbb48d2baeff010df06cc504f61954647890aaef7674775100a39abe04ff20097126ee
7
+ data.tar.gz: 8c50ca862ef0ab2af00c4244892673bc52c58a80daec62e50350e35abcbb58dab117ad1228069a0b504b2fbd0c72fd7a6a1b8d0b6e344c1f5afd2feba6392b5a
Binary file
Binary file
@@ -88,8 +88,10 @@ module Optify
88
88
  # * Avoid any possible conversion overhead.
89
89
  # * Memory management: probably better to do it in Ruby for a Ruby app and avoid memory in Rust.
90
90
  init unless @cache
91
- feature_names = feature_names.map do |feature_name|
92
- get_canonical_feature_name(feature_name)
91
+ unless preferences&.skip_feature_name_conversion
92
+ # 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.
93
+ # When there are over 7 names, then it is faster to convert them with one call to Rust.
94
+ feature_names = get_canonical_feature_names(feature_names)
93
95
  end
94
96
 
95
97
  cache_key = [key, feature_names, config_class]
data/rbi/optify.rbi CHANGED
@@ -74,6 +74,14 @@ module Optify
74
74
  sig { params(feature_name: String).returns(String) }
75
75
  def get_canonical_feature_name(feature_name); end
76
76
 
77
+ # Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names.
78
+ # Canonical feature names map to themselves.
79
+ #
80
+ # @param feature_names The names of aliases or features.
81
+ # @return The canonical feature names.
82
+ sig { params(feature_names: T::Array[String]).returns(T::Array[String]) }
83
+ def get_canonical_feature_names(feature_names); end
84
+
77
85
  # @return The metadata for the feature.
78
86
  sig { params(canonical_feature_name: String).returns(T.nilable(OptionsMetadata)) }
79
87
  def get_feature_metadata(canonical_feature_name); end
data/sig/optify.rbs CHANGED
@@ -57,6 +57,13 @@ class Optify::OptionsProvider
57
57
  # @return The canonical feature name.
58
58
  def get_canonical_feature_name: (String feature_name) -> String
59
59
 
60
+ # Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names.
61
+ # Canonical feature names map to themselves.
62
+ #
63
+ # @param feature_names The names of aliases or features.
64
+ # @return The canonical feature names.
65
+ def get_canonical_feature_names: (::Array[String] feature_names) -> ::Array[String]
66
+
60
67
  # @return The metadata for the feature.
61
68
  def get_feature_metadata: (String canonical_feature_name) -> OptionsMetadata?
62
69
 
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.0.0
4
+ version: 1.1.1
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-04-10 00:00:00.000000000 Z
11
+ date: 2025-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sorbet-runtime