waffle 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +32 -1
- data/lib/waffle/base.rb +1 -1
- data/lib/waffle/version.rb +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -2,4 +2,35 @@
|
|
2
2
|
|
3
3
|
An abstract flow publisher and subscriber.
|
4
4
|
|
5
|
-
[![Build Status](https://secure.travis-ci.org/peanut/waffle.png?branch=master)](http://travis-ci.org/peanut/waffle)
|
5
|
+
[![Build Status](https://secure.travis-ci.org/peanut/waffle.png?branch=master)](http://travis-ci.org/peanut/waffle)
|
6
|
+
|
7
|
+
## Integration into Rails
|
8
|
+
|
9
|
+
Insert in your Rails Gemfile:
|
10
|
+
|
11
|
+
gem 'waffle', '~> 0.1.3'
|
12
|
+
|
13
|
+
and create config file:
|
14
|
+
|
15
|
+
# production.waffle.yml
|
16
|
+
strategy: rabbitmq
|
17
|
+
url: amqp://anyhost.com:5678
|
18
|
+
|
19
|
+
or if RabbitMQ on local machine
|
20
|
+
|
21
|
+
# production.waffle.yml
|
22
|
+
strategy: rabbitmq
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
When you want to performan event, just insert this code in place, where it must occur:
|
27
|
+
|
28
|
+
Waffle::Event.occured 'index_page_load'
|
29
|
+
|
30
|
+
You can attach meta data to event like this:
|
31
|
+
|
32
|
+
Waffle::Event.occured 'index_page_load', {'user_id' => 13, 'user_name' => 'Joshua'}
|
33
|
+
|
34
|
+
or like this:
|
35
|
+
|
36
|
+
Waffle::Event.occured 'index_page_load', 'bingo!'
|
data/lib/waffle/base.rb
CHANGED
data/lib/waffle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: waffle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-03-
|
12
|
+
date: 2012-03-21 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bunny
|
16
|
-
requirement: &
|
16
|
+
requirement: &72738890 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *72738890
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: yajl-ruby
|
27
|
-
requirement: &
|
27
|
+
requirement: &72738230 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *72738230
|
36
36
|
description: Client part of Patty statistics server
|
37
37
|
email: alexander.lomakin@gmail.com
|
38
38
|
executables: []
|