senro_usecaser 0.2.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91d516c2b304a836d4b476c177083ddff38bf8344ddbba14293aa60bee3e07f5
4
- data.tar.gz: 0167aac25683c97feeb378123294073025c86d405307facb5e0392f5bf8eec35
3
+ metadata.gz: 3a40e2440b8f5f624de415bc556c1fb3aed16cf6f5afdef5a6c1b36d8b71242f
4
+ data.tar.gz: ffd39400b4f7ebb5e89cd6e27aff1f41e5cfc4410584170498dd3f0a821b7821
5
5
  SHA512:
6
- metadata.gz: 9592f2b84a831c56b80010cd207588e171407f07a143f19bb25f6cb4bb103bfa23b449c98517c887b4a0d5ff571b5e666afa82877df887978881121c01943996
7
- data.tar.gz: f4cdbec706095b338c537eec61179ec9a2d9e251bd570d5ddceef2d0b2503deede7be514501e395c47e191a6e1c5c97f49144c0eb0fc728b3741d98b47ecc0e3
6
+ metadata.gz: 26c5ba7d471feb89eb69353f16ae5a86ba6da67bf0fc057982a8ad48f8022f5a88ccc55ee566fa243e74a13957e7a3e824525985acd3975a82ae935e60853ef8
7
+ data.tar.gz: 4e27567ba9ef646b358f781c136e9840fcc57d644ea93d844925cde8d975f62665ec91694cdc6f447d2c020995373b3951e667ced56345ee3c6820cfb08e8f54
data/.rubocop.yml CHANGED
@@ -58,6 +58,10 @@ Metrics/PerceivedComplexity:
58
58
  Exclude:
59
59
  - "lib/senro_usecaser/base.rb"
60
60
 
61
+ Metrics/AbcSize:
62
+ Exclude:
63
+ - "lib/senro_usecaser/base.rb"
64
+
61
65
  # AroundBlock is a false positive for our DSL
62
66
  RSpec/AroundBlock:
63
67
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-01-31
9
+
10
+ ### Added
11
+
12
+ - **Runtime type validation for input**
13
+ - `input` now accepts Module(s) for interface-based validation
14
+ - Single module: `input HasUserId` - validates that input's class includes the module
15
+ - Multiple modules: `input HasUserId, HasEmail` - validates that input's class includes all modules
16
+ - Class validation remains supported for backwards compatibility
17
+ - **Runtime type validation for output**
18
+ - When `output` is declared with a Class, the success result's value is validated
19
+ - Raises `TypeError` if the output value is not an instance of the declared class
20
+ - Hash schema (`output({ key: Type })`) skips validation for backwards compatibility
21
+ - **New class methods**
22
+ - `input_types` - Returns an array of declared input types (Module/Class)
23
+ - `input_class` - Backwards compatible method, returns Class if specified or first type
24
+
25
+ ### Changed
26
+
27
+ - Type validation errors raise exceptions with `.call` and return `Result.failure` with `.call!`
28
+ - Input validation: `ArgumentError`
29
+ - Output validation: `TypeError`
30
+
8
31
  ## [0.2.0] - 2026-01-31
9
32
 
10
33
  ### Added