- Make listeners hash thread-safe (via #16) (@mensfeld)
- Make listeners hash thread-safe (via #16) (@mensfeld)
- This version is compatible with recently released dry-rb dependencies (@flash-gordon)
- Bumped version to 1.0.0 (@solnic)
subscribed?
now detects instance method blocks too (via #15) (@guilherme-andrade)
- Use zeitwerk for auto-loading (@flash-gordon)
- Trying to publish an unregistered event raises a meaningful error now (issue #13 fixed via #14) (@landongrindheim)
- Dependency on dry-equalizer was changed to dry-core (@solnic)
- Trying to subscribe to a non-existant event raises an exception (issue #3) (@GustavoCaso + @mensfeld)
- Subscription filters can be more complex: nested hash inclusion, array inclusion, and proc checks were added (flash-gordon)
# nested hash check subscribe(:event, logger: { level: :info }) # pass trigger(:event, logger: { level: :info, output: :stdin }) # filtered out trigger(:event, logger: { level: :debug }) trigger(:event, something: :else) # array inclusion subscribe(:event, logger: { level: %i(info warn error) }) # pass trigger(:event, logger: { level: :info }) trigger(:event, logger: { level: :error }) trigger(:event, logger: { level: :info, output: :stdin }) # filtered out trigger(:event, logger: { level: :debug }) # proc checks # here acts as array inclusion example subscribe(:event, logger: { level: -> level { %i(info warn error).include?(level) })
First public release