Commit cbc73e2f authored by John E. Vincent's avatar John E. Vincent

updating README

parent eb2b3bc8
# Examples # Examples
These are some notes regarding the examples in this directory These are some notes regarding the examples in this directory
## httpclient.rb/httpclient-server.rb ## General Requirements
This is an example of how the Webhook system would work
### Requirements
You'll need a few additional gems You'll need a few additional gems
...@@ -12,6 +9,28 @@ You'll need a few additional gems ...@@ -12,6 +9,28 @@ You'll need a few additional gems
You'll have to compile/install from source. Sorry. Should pull in the `hiredis` native ext. You'll have to compile/install from source. Sorry. Should pull in the `hiredis` native ext.
* [em-http-request](https://github.com/igrigorik/em-http-request) * [em-http-request](https://github.com/igrigorik/em-http-request)
Available via rubygems Available via rubygems
* [em-websocket](https://github.com/igrigorik/em-websocket)
Available via rubygems
## custom-watcher.rb
This is an idea I'm tossing around for allowing easy custom watchers to be written.
Essentially the idea is that you tap into the Redis subscription with a defined pattern and a destination.
### Example
require './watcher-idea.rb'
f = Noah::Watcher.new do |f|
f.pattern = "noah.Configuration"
f.destination = Proc.new {|x| something_with(x)}
end
f.run!
## logger.rb
An example using logger as a watcher. Pretty straighforward.
## httpclient.rb/httpclient-server.rb
This is an example of how the Webhook system would work
### Running ### Running
...@@ -50,15 +69,6 @@ In the server window, you should see the following: ...@@ -50,15 +69,6 @@ In the server window, you should see the following:
## websocket.rb ## websocket.rb
This is an example of using Websockets, EventMachine and Redis PubSub to provide a "status" console of sorts. This is an example of using Websockets, EventMachine and Redis PubSub to provide a "status" console of sorts.
### Requirements
You'll need to grab a few additional gems
* [em-hiredis](https://github.com/mloughran/em-hiredis)
You'll have to compile/install from source. Sorry. Should pull in the `hiredis` native ext.
* [em-websocket](https://github.com/igrigorik/em-websocket)
Available via rubygems
### Running ### Running
To get the maximum effect, start with a clean Redis database. To get the maximum effect, start with a clean Redis database.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment