Skip to content

Commit

Permalink
fix broken anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejkorsan committed Feb 4, 2025
1 parent bf2fe16 commit c5b7fd2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Those repositories were written by community members and are not guaranteed to b

## Writing your own repository

If you want to write your own repository, we provide [a suite of tests that you can re-use](https://github.com/RailsEventStore/rails_event_store/blob/master/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb). Just [require](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L3) and [include it](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L26) in your repository spec. Make sure to meditate on which [expected_version option](..core-concepts/expected-version/) you are going to support and how.
If you want to write your own repository, we provide [a suite of tests that you can re-use](https://github.com/RailsEventStore/rails_event_store/blob/master/ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb). Just [require](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L3) and [include it](https://github.com/RailsEventStore/rails_event_store/blob/a6ffb8a535373023296222bbbb5dd6ee131a6792/rails_event_store_active_record/spec/event_repository_spec.rb#L26) in your repository spec. Make sure to meditate on which [expected_version option](./../core-concepts/expected-version/) you are going to support and how.

## Using RubyEventStore::InMemoryRepository for faster tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ The aggregate root repository instrumentation is not enabled automaticly here. T
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| :aggregate | An instance of an aggregate whose events are being stored |
| :stream | A stream name to which events are stored |
| :version | An [expected version](../core-concepts/expected-version#explicit-number-integer-from-1) of the stream to which events are stored |
| :version | An [expected version](./../core-concepts/expected-version#integer) of the stream to which events are stored |
| :stored_events | An array of events that are stored as a result of actions performed on this aggregate |

```ruby
Expand Down
2 changes: 1 addition & 1 deletion railseventstore.org/docs/core-concepts/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Rails.application.routes.draw { mount RailsEventStore::Browser => "/res" if Rail

It is assumed that you have Rails Event Store configured at `Rails.configuration.event_store`, in [recommended](../getting-started/install/) location.

The `RailsEventStore::Browser` is just a wrapper around `RubyEventStore::Browser::App` with default options suitable for most applications. Read below the [Rack](#sinatra-rack), in case you need this browser outside as a standalone application or you have a different event store location.
The `RailsEventStore::Browser` is just a wrapper around `RubyEventStore::Browser::App` with default options suitable for most applications. Read below the [Rack](#rack), in case you need this browser outside as a standalone application or you have a different event store location.

### Rack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Rails.application.routes.draw { mount RailsEventStore::Browser => "/res" if Rail

It is assumed that you have Rails Event Store configured at `Rails.configuration.event_store`, in [recommended](../getting-started/install) location.

The `RailsEventStore::Browser` is just a wrapper around `RubyEventStore::Browser::App` with default options suitable for most applications. Read below the [Rack](#sinatra-rack), in case you need this browser outside as a standalone application or you have a different event store location.
The `RailsEventStore::Browser` is just a wrapper around `RubyEventStore::Browser::App` with default options suitable for most applications. Read below the [Rack](#sinatra--rack), in case you need this browser outside as a standalone application or you have a different event store location.

### Sinatra / Rack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ unsubscribe = event_store.subscribe(InvoiceReadModel.new, to: [InvoiceCreated, I

and then execute returned lambda both subscriptions will be removed.

It you need temporary subscription to be defined [read more here](/docs/v1/subscribe/#temporary-subscriptions).
It you need temporary subscription to be defined [read more here](#temporary-subscriptions).

## Synchronous handlers

Expand Down Expand Up @@ -122,7 +122,7 @@ class SyncHandler
end
```

<h3 id="fresh-handler-state">Fresh handler state</h3>
### Fresh handler state

If you subscribe an instance of a class (`SyncHandler.new`), the same object is going to be called with new events.

Expand Down Expand Up @@ -282,7 +282,7 @@ event_store

You start the temporary subscription by providing a block `within` which the subscriptions will be active. Then you can chain `subscribe` and `subscribe_to_all_events` as many times as you want to register temporary subscribers. When you are ready call `call` to evaluate the provided block with the temporary subscriptions.

<h2 id="async-handlers">Async handlers</h2>
## Async handlers

It's possible to also subscribe asynchronous handlers to events. To implement asynchronous dispatcher for a background jobs library of your choice firstly you need to implement scheduler class that will enqueue asynchrounous handlers as background jobs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ module YourAppName
end
```

Make sure to read about [fresh handler state](/docs/v1/subscribe/#fresh-handler-state) to avoid potential issues from using the same listener for many published events.
Make sure to read about [fresh handler state](./../getting-started/subscribe/#fresh-handler-state) to avoid potential issues from using the same listener for many published events.

## Handling Events Asynchronously

Asynchronous handlers are described in [Async handlers section](/docs/v1/subscribe/#async-handlers)
Asynchronous handlers are described in [Async handlers section](./../getting-started/subscribe/#async-handlers)

0 comments on commit c5b7fd2

Please sign in to comment.