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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ae93c1a78be83e339ff86bf9eaa58efa3376602c363ddd1d4c6e326fe102865
4
- data.tar.gz: 38debe8196e6a9ae1f5281b810d0193a4d8a821a45bb18afeaf103732f1d92d7
3
+ metadata.gz: 719dca4a64475d915ca5b53cef7b4f95903260e1e11765832d2436386d2e509b
4
+ data.tar.gz: ab91066370020b38b2bd8148ac4e4193a172921ccf4ae25b2d3985d21c40361b
5
5
  SHA512:
6
- metadata.gz: de28a9ffb64be4d7a5c3c4982a13713cfd44ba0abcef4bbbcf3a385de9ddd881fe814e319d6770ec572f7b9655e8cc6f466d887040fa300e4d9513dce54e045e
7
- data.tar.gz: 0c1ac8d2e32d95534f0f903d0fa6df1a2a627a4d7f5f68a27e14448230e67804b3c859e0e1d551cde7c7ce6e2a7c453ebfb67aee7f30e1834753130328344663
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)
@@ -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))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Quonfig
4
- VERSION = '0.0.12'
4
+ VERSION = '0.0.13'
5
5
  end
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.12
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-03 00:00:00.000000000 Z
11
+ date: 2026-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport