optify-config 1.17.10 → 1.18.0
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/ext/optify_ruby/Cargo.toml +2 -2
- data/ext/optify_ruby/src/lib.rs +16 -0
- data/rbi/optify.rbi +5 -0
- data/sig/optify.rbs +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd8f5a1196800f635ebc7f4a9c1ac020ba3cc021654fa7dbbd914d0cb6122ff0
|
|
4
|
+
data.tar.gz: 27555219991c4a53971f29c50bf7b01ab5f40efab70c4264c4b155595d4e02e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7dda691f74e094addd304d87c184361565e9df2d604e7a13ea3bf89e7833e4ac9e3350a500cdaf7cc5f6ec4885900e7ebdebe985e73a8bb17295710eb6e49f4
|
|
7
|
+
data.tar.gz: da0e154d813a6ee1858c25fb4ba4b62288acb639822a89567621641d0708e0682505b38fd0dfeb94e9084b195fb102d424f5aa21464a15b928f5c7d9dffdb252
|
data/ext/optify_ruby/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "optify_ruby"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.20.0"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
description = "optify bindings for Ruby"
|
|
@@ -21,6 +21,6 @@ crate-type = ["cdylib"]
|
|
|
21
21
|
|
|
22
22
|
[dependencies]
|
|
23
23
|
magnus = "0.8.0"
|
|
24
|
-
optify = { path = "../../../../rust/optify", version = "0.20.
|
|
24
|
+
optify = { path = "../../../../rust/optify", version = "0.20.5" }
|
|
25
25
|
rb-sys = { version = "*", default-features = false, features = ["ruby-static"] }
|
|
26
26
|
serde_json = "1.0.143"
|
data/ext/optify_ruby/src/lib.rs
CHANGED
|
@@ -265,6 +265,10 @@ impl WrappedOptionsProvider {
|
|
|
265
265
|
Err(e) => Err(magnus::Error::new(ruby.exception_runtime_error(), e)),
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
+
|
|
269
|
+
fn has_conditions(&self, canonical_feature_name: String) -> bool {
|
|
270
|
+
self.0.borrow().has_conditions(&canonical_feature_name)
|
|
271
|
+
}
|
|
268
272
|
}
|
|
269
273
|
|
|
270
274
|
#[derive(Clone)]
|
|
@@ -506,6 +510,10 @@ impl WrappedOptionsWatcher {
|
|
|
506
510
|
}
|
|
507
511
|
}
|
|
508
512
|
|
|
513
|
+
fn has_conditions(&self, canonical_feature_name: String) -> bool {
|
|
514
|
+
self.0.borrow().has_conditions(&canonical_feature_name)
|
|
515
|
+
}
|
|
516
|
+
|
|
509
517
|
fn last_modified(&self) -> std::time::SystemTime {
|
|
510
518
|
self.0.borrow().last_modified()
|
|
511
519
|
}
|
|
@@ -608,6 +616,10 @@ fn init(ruby: &Ruby) -> Result<(), magnus::Error> {
|
|
|
608
616
|
"get_options_hash_with_preferences",
|
|
609
617
|
method!(WrappedOptionsProvider::get_options_hash_with_preferences, 3),
|
|
610
618
|
)?;
|
|
619
|
+
provider_class.define_method(
|
|
620
|
+
"conditions?",
|
|
621
|
+
method!(WrappedOptionsProvider::has_conditions, 1),
|
|
622
|
+
)?;
|
|
611
623
|
|
|
612
624
|
// Private methods for internal use.
|
|
613
625
|
provider_class.define_private_method(
|
|
@@ -739,6 +751,10 @@ fn init(ruby: &Ruby) -> Result<(), magnus::Error> {
|
|
|
739
751
|
"get_options_hash_with_preferences",
|
|
740
752
|
method!(WrappedOptionsWatcher::get_options_hash_with_preferences, 3),
|
|
741
753
|
)?;
|
|
754
|
+
watcher_class.define_method(
|
|
755
|
+
"conditions?",
|
|
756
|
+
method!(WrappedOptionsWatcher::has_conditions, 1),
|
|
757
|
+
)?;
|
|
742
758
|
watcher_class.define_method(
|
|
743
759
|
"last_modified",
|
|
744
760
|
method!(WrappedOptionsWatcher::last_modified, 0),
|
data/rbi/optify.rbi
CHANGED
|
@@ -257,6 +257,11 @@ module Optify
|
|
|
257
257
|
end
|
|
258
258
|
def get_options_json_with_preferences(key, feature_names, preferences); end
|
|
259
259
|
|
|
260
|
+
# @param canonical_feature_name [String] A canonical feature name
|
|
261
|
+
# @return Whether the feature has conditions.
|
|
262
|
+
sig { params(canonical_feature_name: String).returns(T::Boolean) }
|
|
263
|
+
def conditions?(canonical_feature_name); end
|
|
264
|
+
|
|
260
265
|
# (Optional) Eagerly initializes the cache.
|
|
261
266
|
# @return `self`.
|
|
262
267
|
sig { returns(T.self_type) }
|
data/sig/optify.rbs
CHANGED
|
@@ -159,6 +159,10 @@ module Optify::ProviderModule
|
|
|
159
159
|
|
|
160
160
|
def get_options_json_with_preferences: (String key, ::Array[String] feature_names, GetOptionsPreferences preferences) -> String
|
|
161
161
|
|
|
162
|
+
# @param canonical_feature_name [String] A canonical feature name
|
|
163
|
+
# @return Whether the feature has conditions.
|
|
164
|
+
def conditions?: (String canonical_feature_name) -> bool
|
|
165
|
+
|
|
162
166
|
# (Optional) Eagerly initializes the cache.
|
|
163
167
|
# @return `self`.
|
|
164
168
|
def init: () -> self
|
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.
|
|
4
|
+
version: 1.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin D. Harris
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 0.2.
|
|
32
|
+
version: 0.2.1
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.2.
|
|
39
|
+
version: 0.2.1
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: sorbet-runtime
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|