Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove TODO #3

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,27 +442,6 @@ I love the way they can be tested.
When I've used service objects, I've found them to be more complex to test and compose.
I can't see a clean way that using service objects to compose interactors could work well without losing some of the aforementioned benefits.

### TODO
We want to add support for explicitly specifying promises in organizers.

The benefit here is on clarifying the contract between organizers and interactors.

This is another variation of the "interactors themselves are great but their coordination and finding where things happen is hard in large applications".

By adding promise notation to organizers, we can signal to the reader that 'here in this part of the chain is the thing you are looking for'.

A writer of an organizer may expect LoadOrder to promise :order, but for the reader, it's not quite as explicit.
The expected syntax will be

```ruby
organize \
LoadOrder.promising(:order),
TakePayment.promising(:payment_transaction)
```

This will be validated at test time against the interactors promises.


## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down