quonfig 0.0.12 → 0.0.13
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/CHANGELOG.md +4 -0
- data/lib/quonfig/evaluator.rb +13 -0
- data/lib/quonfig/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 719dca4a64475d915ca5b53cef7b4f95903260e1e11765832d2436386d2e509b
|
|
4
|
+
data.tar.gz: ab91066370020b38b2bd8148ac4e4193a172921ccf4ae25b2d3985d21c40361b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d84d33ce8cab73a3f3c3a27990205db98f649fd1f6b8319a75afce8cd73e746f140a67d5c8e70365d24f6a363d3676f9680c4beaf804b838399fcf37890f297
|
|
7
|
+
data.tar.gz: 9d31eb60838a4ca692b960aab0d719b734e97597135e0a25070f586750d4f65a46e45514d84badbe7ac827821392b98d9eba107784a8c828dede738899f55eb6
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.13 - 2026-05-07
|
|
4
|
+
|
|
5
|
+
- **Feat: `IS_PRESENT` and `IS_NOT_PRESENT` targeting operators (qfg-7jnb.6).** Both take only `propertyName` (no `valueToMatch`). `IS_PRESENT` resolves the dotted path against the merged context and returns true iff the value is non-nil. Type-agnostic — empty string `""`, `0`, and `false` all count as **present**; only `nil` / missing keys (including missing nested paths) are absent. `IS_NOT_PRESENT` is the negation. Implemented explicitly without ActiveSupport's `present?` / `blank?`, which would have given the wrong semantics on `""` and `false`. Matches sdk-node, sdk-go, sdk-python, sdk-ruby, sdk-javascript wire behaviour. Closes the integration-test parity gap that left 7 RSpec/Minitest cases red since the operators landed in `integration-test-data`.
|
|
6
|
+
|
|
3
7
|
## 0.0.12 - 2026-05-03
|
|
4
8
|
|
|
5
9
|
- **Feat: pluggable `logger:` kwarg on `Quonfig::Client.new`.** Host apps can now pass `Rails.logger` (or any stdlib `Logger`-compatible instance) and have all SDK warnings/errors flow through it instead of bare stderr / SemanticLogger. Implemented as a class-level `Quonfig::InternalLogger.user_logger` override that all `LOG` constants respect at log-call time, so existing per-class `LOG` constants pick it up automatically. Duck-typed (responds to `debug`/`info`/`warn`/`error`); missing levels degrade gracefully. SemanticLogger auto-detection is unchanged when no logger is supplied. Also routes the two outlier `dev_context.rb` warns (file read / JSON parse failures) through `InternalLogger` so they pick up the host-supplied logger too. (qfg-mol-1qw.3)
|
data/lib/quonfig/evaluator.rb
CHANGED
|
@@ -51,6 +51,8 @@ module Quonfig
|
|
|
51
51
|
OP_PROP_SEMVER_GREATER_THAN = 'PROP_SEMVER_GREATER_THAN'
|
|
52
52
|
OP_IN_SEG = 'IN_SEG'
|
|
53
53
|
OP_NOT_IN_SEG = 'NOT_IN_SEG'
|
|
54
|
+
OP_IS_PRESENT = 'IS_PRESENT'
|
|
55
|
+
OP_IS_NOT_PRESENT = 'IS_NOT_PRESENT'
|
|
54
56
|
|
|
55
57
|
MAGIC_CURRENT_TIME_PROPS = %w[quonfig.current-time prefab.current-time reforge.current-time].freeze
|
|
56
58
|
|
|
@@ -280,6 +282,17 @@ module Quonfig
|
|
|
280
282
|
end
|
|
281
283
|
false
|
|
282
284
|
|
|
285
|
+
when OP_IS_PRESENT, OP_IS_NOT_PRESENT
|
|
286
|
+
# Presence is type-agnostic: empty string "", 0, and false are all
|
|
287
|
+
# PRESENT. Only nil / missing key (incl. nested) is NOT present.
|
|
288
|
+
# `lookup_context` already returns context_exists=true iff the
|
|
289
|
+
# resolved value is non-nil — exactly the semantic we need. Do not
|
|
290
|
+
# use ActiveSupport's #present? / #blank? here: they treat "" and
|
|
291
|
+
# false as blank, which is the wrong behaviour for this operator.
|
|
292
|
+
return context_exists if operator == OP_IS_PRESENT
|
|
293
|
+
|
|
294
|
+
!context_exists
|
|
295
|
+
|
|
283
296
|
when OP_IN_SEG, OP_NOT_IN_SEG
|
|
284
297
|
if match_value
|
|
285
298
|
segment_key = to_s_nil(hget(match_value, :value))
|
data/lib/quonfig/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quonfig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeff Dwyer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|