senro_usecaser 0.4.1 → 0.4.2

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: 3a40e2440b8f5f624de415bc556c1fb3aed16cf6f5afdef5a6c1b36d8b71242f
4
- data.tar.gz: ffd39400b4f7ebb5e89cd6e27aff1f41e5cfc4410584170498dd3f0a821b7821
3
+ metadata.gz: 128ebb74062f9e816768ebd4eb0bd7f2c8e3d6d9b5235acf83627da04b9db0a4
4
+ data.tar.gz: b8324bac7bfa047c2cdff59366c935f101250a90d77da1617524638f8fe828ad
5
5
  SHA512:
6
- metadata.gz: 26c5ba7d471feb89eb69353f16ae5a86ba6da67bf0fc057982a8ad48f8022f5a88ccc55ee566fa243e74a13957e7a3e824525985acd3975a82ae935e60853ef8
7
- data.tar.gz: 4e27567ba9ef646b358f781c136e9840fcc57d644ea93d844925cde8d975f62665ec91694cdc6f447d2c020995373b3951e667ced56345ee3c6820cfb08e8f54
6
+ metadata.gz: 16467023e02e3ac45125bd0e5e678aa107543b13dadffe12b1e63cef2be73138be323872d2f80dd31528a183235db69805fb9c90a64bda98c169b4c430f53393
7
+ data.tar.gz: bb894e33a9388a2a12117943f75b1ed992a89e1755dfb7c87def9ee48711fe908e25df49219f7f3d22e21423dde7dd5a832190e4fe12aebfee1c9afd6ab9a138
data/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ 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.4.2] - 2026-02-07
9
+
10
+ ### Added
11
+
12
+ - **DependsOn module for standalone DI support**
13
+ - New `SenroUsecaser::DependsOn` module can be extended into any class
14
+ - Provides `depends_on`, `namespace`, and automatic dependency resolution
15
+ - Default `initialize(container: nil)` is provided automatically
16
+ - Uses `SenroUsecaser.container` when no container is passed
17
+ - Supports custom initialize with `super(container: container)`
18
+
19
+ - **on_failure hook**
20
+ - Called only when UseCase execution results in failure
21
+ - Supports block syntax, module syntax, and Hook class syntax
22
+ - Receives `(input, result)` or `(input, result, context)` for retry support
23
+ - In pipelines, triggers rollback of previously successful steps in reverse order
24
+
25
+ - **Retry functionality**
26
+ - `retry_on :error_code, attempts: 3, wait: 1, backoff: :exponential`
27
+ - Backoff strategies: `:fixed`, `:linear`, `:exponential`
28
+ - `max_wait` and `jitter` options for fine-grained control
29
+ - `discard_on` to skip retry for specific errors
30
+ - `before_retry` and `after_retries_exhausted` callbacks
31
+ - Manual retry via `retry!` in `on_failure` hook
32
+
33
+ ### Changed
34
+
35
+ - Removed redundant `include DependsOn::InstanceMethods` from Base and Hook classes
36
+ - `extend DependsOn` now automatically includes InstanceMethods
37
+
8
38
  ## [0.3.0] - 2026-01-31
9
39
 
10
40
  ### Added
@@ -4,5 +4,5 @@
4
4
 
5
5
  module SenroUsecaser
6
6
  #: String
7
- VERSION = "0.4.1"
7
+ VERSION = "0.4.2"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: senro_usecaser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogo Kawahara