cmdx 2.1.0 → 2.1.1
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 +10 -0
- data/lib/cmdx/input.rb +1 -1
- data/lib/cmdx/result.rb +4 -3
- data/lib/cmdx/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: 03bacf5f39e3f6588988b533606f53a90cdba94beef7bc2c9303e1e00c53a989
|
|
4
|
+
data.tar.gz: 02f9e8a212ace89b6d9e7b134a9b92b469ce049b553876506e5d6786bede830e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d76b548878d4b78ed131a18804c4810d928fa99dfa66cf31723a475e89034ccac16451ed62e1be7880be491911eaef31b215c9540d2a7e4b864b716ac5a8cf7
|
|
7
|
+
data.tar.gz: 107083dfef5796ed6f628b662d1920bb0e7028e0ea9a56ecaf63d979f261c248d6ab113c3881079522352abe97fdde451d8e741403a77f1b38ea2b082d003179
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [2.x.x] - UNRELEASED
|
|
8
8
|
|
|
9
|
+
## [2.1.1] - 2026-07-26
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `Result#to_h` includes `:errors` (`Errors#to_h`) for structured validation messages in logs, telemetry, and JSON serialization
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `Input` resolution continues coerce → transform → validate when the key is present (including explicit `nil`) instead of stopping after defaults; omitted keys still stop when the value is `nil` after defaults
|
|
16
|
+
|
|
17
|
+
## [2.1.0] - 2026-05-19
|
|
18
|
+
|
|
9
19
|
### Added
|
|
10
20
|
- `Result#error` — convenience returning `cause` (rescued `Exception`) when a failure was raised, otherwise the `reason` `String`; `nil` for non-failed results. Lets telemetry adapters branch on type without repeating the `cause || reason` dance
|
|
11
21
|
- Middlewares and lifecycle callbacks may halt the task with `success!` / `skip!` / `fail!` / `throw!` — `Runtime#execute` now wraps the middleware chain in `catch(Signal::TAG)` so a signal thrown before yielding to `next_link` becomes the task's outcome instead of an `UncaughtThrowError`
|
data/lib/cmdx/input.rb
CHANGED
|
@@ -189,7 +189,7 @@ module CMDx
|
|
|
189
189
|
end
|
|
190
190
|
|
|
191
191
|
value = apply_default(task) if value.nil?
|
|
192
|
-
return if value.nil?
|
|
192
|
+
return if value.nil? && !key_provided
|
|
193
193
|
|
|
194
194
|
@coercions ||= task.class.coercions.extract(@options)
|
|
195
195
|
value = task.class.coercions.coerce(task, accessor_name, value, @coercions)
|
data/lib/cmdx/result.rb
CHANGED
|
@@ -273,9 +273,9 @@ module CMDx
|
|
|
273
273
|
task.settings.tags
|
|
274
274
|
end
|
|
275
275
|
|
|
276
|
-
# @return [Hash{Symbol => Object}] memoized serialization.
|
|
277
|
-
# `:cause`, `:origin`, `:threw_failure`,
|
|
278
|
-
# on failure.
|
|
276
|
+
# @return [Hash{Symbol => Object}] memoized serialization. `:errors` mirrors
|
|
277
|
+
# {Errors#to_h}. Includes `:cause`, `:origin`, `:threw_failure`,
|
|
278
|
+
# `:caused_failure`, `:rolled_back` on failure.
|
|
279
279
|
def to_h
|
|
280
280
|
@to_h ||= {
|
|
281
281
|
xid:,
|
|
@@ -290,6 +290,7 @@ module CMDx
|
|
|
290
290
|
status:,
|
|
291
291
|
reason:,
|
|
292
292
|
metadata:,
|
|
293
|
+
errors: errors.to_h,
|
|
293
294
|
strict: strict?,
|
|
294
295
|
deprecated: deprecated?,
|
|
295
296
|
retried: retried?,
|
data/lib/cmdx/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cmdx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juan Gomez
|
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
312
312
|
- !ruby/object:Gem::Version
|
|
313
313
|
version: '0'
|
|
314
314
|
requirements: []
|
|
315
|
-
rubygems_version: 4.0.
|
|
315
|
+
rubygems_version: 4.0.13
|
|
316
316
|
specification_version: 4
|
|
317
317
|
summary: CMDx is a framework for building maintainable business processes.
|
|
318
318
|
test_files: []
|