optify-config 1.0.0-x86_64-linux → 1.1.0-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: 04ec996cb9b915a96afb1ff39148a167236aed3e1bc8224c55f86bc1ff7e202e
4
- data.tar.gz: c7ff833d94e68799f7d37c9018c0f7f514b1c3bdc5d07d399b6b0ae9f8af450a
3
+ metadata.gz: c4e4ecaa383751d203c4683900726cb8c3f6c0abb4bd9a0a7739de5b84238b33
4
+ data.tar.gz: 989680a4757983433a1108b0d64faf1313dbc79b0985faef9b2cd73614894eeb
5
5
  SHA512:
6
- metadata.gz: f2f520e0e8a1d2fc837c339c987eb0bd2ae55916d9ea8b6dfe0267adb56404e0c4c8fe4b9fa4dd833482127fc85b9b58c71b20e28462535708ae6d3243c21ba0
7
- data.tar.gz: 2882378675e4948f0fd971b93b4c87968e2386ba87d426b182b8e04fa0a9b83aee277d34251906075b7cfbd58723ad4a9069f8447329836eb4befd382af6f621
6
+ metadata.gz: '04284cab2d00ca45c74954924dcb54f0fdd0ef2e580611669f80235a614c77f425d63500c800299103e647b4b02cc3248393cd4eda5dadb5482422f8092a9d8a'
7
+ data.tar.gz: b1cac757f761ec1f8e5bb68f60de45bb6ae9a9169106ddecbb3c2d89cd2ba7e4d5ba6e927bfe0f3b61f13d98cc9cc19e2c763557e27538c8d148917748958823
Binary file
Binary file
@@ -88,9 +88,7 @@ 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)
93
- end
91
+ feature_names = get_canonical_feature_names(feature_names)
94
92
 
95
93
  cache_key = [key, feature_names, config_class]
96
94
  result = @cache&.fetch(cache_key, NOT_FOUND_IN_CACHE_SENTINEL)
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,7 +1,7 @@
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.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Justin D. Harris