dry-rb / dry-transaction

Business transaction DSL
http://dry-rb.org/gems/dry-transaction
MIT License
468 stars 55 forks source link

Replace local operation with injected #107

Closed GustavoCaso closed 6 years ago

GustavoCaso commented 6 years ago

Fixes #75

@timriley I introduce the concept of Operation.source to know where the operation comes, that way we can modify the way we resolve_operation

Since we want to have different behavior if the operation was injected or extracted from the container

I will add specs but I wanted to share with you before continuing more with this approach

GustavoCaso commented 6 years ago

@timriley I replace the logic to decide if the operation source is from the container or is injected, I think looks much cleaner and makes sense that the Step is the one knowing it. What I haven't quite figure out is how to deal with the difference in the order of the conditions depending on the type of source so far I went with polymorphism. If you have any suggestion please let's discuss it 😄

timriley commented 6 years ago

Resolved in #109