README.md in wisper-2.0.1 vs README.md in wisper-3.0.0.rc1
- old
+ new
@@ -2,11 +2,11 @@
*A micro library providing Ruby objects with Publish-Subscribe capabilities*
[![Gem Version](https://badge.fury.io/rb/wisper.svg)](http://badge.fury.io/rb/wisper)
[![Code Climate](https://codeclimate.com/github/krisleech/wisper.svg)](https://codeclimate.com/github/krisleech/wisper)
-[![Build Status](https://travis-ci.org/krisleech/wisper.svg?branch=master)](https://travis-ci.org/krisleech/wisper)
+[![Build Status](https://github.com/krisleech/wisper/actions/workflows/test.yml/badge.svg)](https://github.com/krisleech/wisper/actions)
[![Coverage Status](https://coveralls.io/repos/krisleech/wisper/badge.svg?branch=master)](https://coveralls.io/r/krisleech/wisper?branch=master)
* Decouple core business logic from external concerns in Hexagonal style architectures
* Use as an alternative to ActiveRecord callbacks and Observers in Rails apps
* Connect objects based on context without permanence
@@ -14,16 +14,19 @@
Note: Wisper was originally extracted from a Rails codebase but is not dependant on Rails.
Please also see the [Wiki](https://github.com/krisleech/wisper/wiki) for more additional information and articles.
+**For greenfield applications you might also be interested in
+[WisperNext](https://gitlab.com/kris.leech/wisper_next) and [Ma](https://gitlab.com/kris.leech/ma).**
+
## Installation
Add this line to your application's Gemfile:
```ruby
-gem 'wisper', '2.0.0'
+gem 'wisper', '~3.0'
```
## Usage
Any class with the `Wisper::Publisher` module included can broadcast events
@@ -192,12 +195,19 @@
```ruby
Wisper.subscribe(MyListener.new)
```
-In a Rails app you might want to add your global listeners in an initializer.
+In a Rails app you might want to add your global listeners in an initializer like:
+```ruby
+# config/initializers/listeners.rb
+Rails.application.reloader.to_prepare do
+ Wisper.subscribe(MyListener.new)
+end
+```
+
Global listeners are threadsafe. Subscribers will receive events published on all threads.
### Scoping by publisher class
@@ -317,12 +327,10 @@
Got a specific question, try the
[Wisper tag on StackOverflow](http://stackoverflow.com/questions/tagged/wisper).
## Compatibility
-Tested with MRI 2.x, JRuby and Rubinius.
-
-See the [build status](https://travis-ci.org/krisleech/wisper) for details.
+See the [build status](https://github.com/krisleech/wisper/actions) for details.
## Running Specs
```
bundle exec rspec