This is just a demo for the EventMachine capabilities in a fun and easy to way.
It is composed of a main EventMachine loop and "Jobs" that tie to that loop to execute various functions. This repository contains, so far, the following jobs:
socket_job.rb
- Contains a websocket server that fetches content from a broker.stream_job.rb
- Connects to the Twitter streaming API to fetch previously configured keywords.globo_job.rb
- Checks if the headline on the website globo.com has changed periodically.
Simply git clone the repository, rename the file config_sample.yml
to
config.yml
and fill the configuration properly, getting a twitter consumer
token and secret and a twitter OAuth token and secret.
Also take the time to configure the keywords you want to fetch from Twitter!
Simply run application.rb
and open the index.html
file on your favorite
browser (as long as your favorite browser is Chrome).