Sha256: e2e2ef893f2693af0d93d54be354928a6a47b5176564ccfa30f3ed2c9bd3c57b

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

# Waffle

An abstract flow publisher and subscriber.

[![Build Status](https://secure.travis-ci.org/peanut/waffle.png?branch=master)](http://travis-ci.org/peanut/waffle)

## Integration into Rails

Insert in your Rails Gemfile:

    gem 'waffle', '~> 0.1.3'

and create config file:

    # production.waffle.yml
    strategy: rabbitmq
    url: amqp://anyhost.com:5678

or if RabbitMQ on local machine

    # production.waffle.yml
    strategy: rabbitmq

## Usage

When you want to performan event, just insert this code in place, where it must occur:

    Waffle::Event.occured 'index_page_load'

You can attach meta data to event like this:

    Waffle::Event.occured 'index_page_load', {'user_id' => 13, 'user_name' => 'Joshua'}

or like this:

    Waffle::Event.occured 'index_page_load', 'bingo!'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waffle-0.1.3 README.md