CHANGELOG.md in bcdd-result-0.11.0 vs CHANGELOG.md in bcdd-result-0.12.0

- old
+ new

@@ -1,51 +1,79 @@ - [\[Unreleased\]](#unreleased) -- [\[0.11.0\] - 2024-01-02](#0110---2024-01-02) +- [\[0.12.0\] - 2024-01-07](#0120---2024-01-07) - [Added](#added) - [Changed](#changed) -- [\[0.10.0\] - 2023-12-31](#0100---2023-12-31) +- [\[0.11.0\] - 2024-01-02](#0110---2024-01-02) - [Added](#added-1) -- [\[0.9.1\] - 2023-12-12](#091---2023-12-12) - [Changed](#changed-1) - - [Fixed](#fixed) -- [\[0.9.0\] - 2023-12-12](#090---2023-12-12) +- [\[0.10.0\] - 2023-12-31](#0100---2023-12-31) - [Added](#added-2) +- [\[0.9.1\] - 2023-12-12](#091---2023-12-12) - [Changed](#changed-2) -- [\[0.8.0\] - 2023-12-11](#080---2023-12-11) + - [Fixed](#fixed) +- [\[0.9.0\] - 2023-12-12](#090---2023-12-12) - [Added](#added-3) - [Changed](#changed-3) - - [Removed](#removed) -- [\[0.7.0\] - 2023-10-27](#070---2023-10-27) +- [\[0.8.0\] - 2023-12-11](#080---2023-12-11) - [Added](#added-4) - [Changed](#changed-4) -- [\[0.6.0\] - 2023-10-11](#060---2023-10-11) + - [Removed](#removed) +- [\[0.7.0\] - 2023-10-27](#070---2023-10-27) - [Added](#added-5) - [Changed](#changed-5) -- [\[0.5.0\] - 2023-10-09](#050---2023-10-09) +- [\[0.6.0\] - 2023-10-11](#060---2023-10-11) - [Added](#added-6) -- [\[0.4.0\] - 2023-09-28](#040---2023-09-28) - - [Added](#added-7) - [Changed](#changed-6) +- [\[0.5.0\] - 2023-10-09](#050---2023-10-09) + - [Added](#added-7) +- [\[0.4.0\] - 2023-09-28](#040---2023-09-28) + - [Added](#added-8) + - [Changed](#changed-7) - [Removed](#removed-1) - [\[0.3.0\] - 2023-09-26](#030---2023-09-26) - - [Added](#added-8) -- [\[0.2.0\] - 2023-09-26](#020---2023-09-26) - [Added](#added-9) +- [\[0.2.0\] - 2023-09-26](#020---2023-09-26) + - [Added](#added-10) - [Removed](#removed-2) - [\[0.1.0\] - 2023-09-25](#010---2023-09-25) - - [Added](#added-10) + - [Added](#added-11) ## [Unreleased] +## [0.12.0] - 2024-01-07 + +### Added + +- Add `BCDD::Result#and_then!` and `BCDD::Result::Context#and_then!` to execute a callable object (any object that responds to `#call`) to produce a result. The main difference between the `#and_then` and `#and_then!` is that the latter does not check the result source. + - **Attention:** to ensure the correct behavior, do not mix `#and_then` and `#and_then!` in the same result chain. + - This feature is turned off by default. You can enable it through the `BCDD::Result.config.feature.enable!(:and_then!)`. + - The method called by default (`:call`) can be changed through `BCDD::Result.config.and_then!.default_method_name_to_call=`. + +### Changed + +- **(BREAKING)** Renames the subject concept/term to `source`. When a mixin is included/extended, it defines the `Success()` and `Failure()` methods. Since the results are generated in a context (instance or singleton where the mixin was used), they will have a defined source (instance or singleton itself). + > Definition of source + > + > From dictionary: + > * a place, person, or thing from which something comes or can be obtained. + ## [0.11.0] - 2024-01-02 ### Added - Add the `Given()` addon to produce a `Success(:given, value)` result. As the `Continue()` addon, it is ignored by the expectations. Use it to add a value to the result chain and invoke the next step (through `and_then`). ### Changed - **(BREAKING)** Rename halted concept to terminal. Failures are terminal by default, but you can make a success terminal by enabling the `:continue` addon. + > Definition of terminal + > + > From dictionary: + > * of, forming, or situated at the end or extremity of something. + > * the end of a railroad or other transport route, or a station at such a point. + > + > From Wikipedia: + > * A "terminus" or "terminal" is a station at the end of a railway line. - **(BREAKING)** Rename `BCDD::Result::Context::Success#and_expose` halted keyword argument to `terminal`. - **(BREAKING)** Rename `BCDD::Result#halted?` to `BCDD::Result#terminal?`.