tribe 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/README.md +2 -9
- data/lib/tribe/actable.rb +4 -4
- data/lib/tribe/version.rb +1 -1
- data/tribe.gemspec +2 -2
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Tribe
|
2
2
|
|
3
|
-
Tribe is a Ruby gem that implements event
|
3
|
+
Tribe is a Ruby gem that implements event-driven [actors] (http://en.wikipedia.org/wiki/Actor_model "actors").
|
4
4
|
Actors are lightweight concurrent objects that use asynchronous message passing for communication.
|
5
5
|
Tribe focuses on high performance, low latency, an easy to use API, and flexibility.
|
6
6
|
It is built on top of the [Workers] (https://github.com/chadrem/workers "Workers") gem, which allows it to support many actors (millions should be possible).
|
@@ -29,14 +29,7 @@ Or install it yourself as:
|
|
29
29
|
super
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
33
|
-
case event.command
|
34
|
-
when :my_custom
|
35
|
-
my_custom_handler(event)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def my_custom_handler(event)
|
32
|
+
def on_my_custom(event)
|
40
33
|
puts "Received a custom event (#{event.inspect})"
|
41
34
|
end
|
42
35
|
|
data/lib/tribe/actable.rb
CHANGED
@@ -61,11 +61,11 @@ module Tribe
|
|
61
61
|
return nil
|
62
62
|
end
|
63
63
|
|
64
|
-
#
|
65
|
-
# Subclass and override the below methods.
|
66
|
-
#
|
67
|
-
|
68
64
|
def process_event(event)
|
65
|
+
send("on_#{event.command}", event)
|
66
|
+
end
|
67
|
+
|
68
|
+
def on_test(event)
|
69
69
|
puts "Actor (#{identifier}) processing event (#{event.inspect}) using thread (#{Thread.current.object_id})."
|
70
70
|
end
|
71
71
|
|
data/lib/tribe/version.rb
CHANGED
data/tribe.gemspec
CHANGED
@@ -4,7 +4,7 @@ require File.expand_path('../lib/tribe/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Chad Remesch"]
|
6
6
|
gem.email = ["chad@remesch.com"]
|
7
|
-
gem.description = %q{Tribe is a Ruby gem that implements event
|
7
|
+
gem.description = %q{Tribe is a Ruby gem that implements event-driven actors.}
|
8
8
|
gem.summary = %q{Actors are lightweight concurrent objects that use asynchronous message passing for communication. Tribe focuses on high performance, low latency, an easy to use API, and flexibility.}
|
9
9
|
gem.homepage = "https://github.com/chadrem/tribe"
|
10
10
|
|
@@ -15,5 +15,5 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Tribe::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency('workers',
|
18
|
+
gem.add_dependency('workers', '0.0.6')
|
19
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tribe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: workers
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 0.0.6
|
30
|
-
description: Tribe is a Ruby gem that implements event
|
30
|
+
description: Tribe is a Ruby gem that implements event-driven actors.
|
31
31
|
email:
|
32
32
|
- chad@remesch.com
|
33
33
|
executables: []
|