celluloid_pubsub_redis_adapter 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/celluloid_pubsub_redis_adapter.gemspec +1 -1
- data/examples/shared_classes.rb +8 -8
- data/lib/celluloid_pubsub_redis_adapter/version.rb +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 748b84c520a1228a143f6523e827a261db84b114
|
4
|
+
data.tar.gz: 3ea2d7bddf3c1a24a2b15407647c18ea9dc58ddf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dd38b6389ad44cdbda00762b211d230a8ac952190724ffb30ee61a2a3e5cab15472ad14216d6307dd3ec82f568ab0825f6f261a65f5e5ae07f1735bb1690ac1
|
7
|
+
data.tar.gz: 07a9974f7ad03ceba75c7f263a008a74834ebc4b56115be8dc994d90857b5b4fbac51c40c508178eb71213c0f101b3035e40185b4b932c504bc516af64951772
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.test_files = s.files.grep(/^(spec)/)
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
|
19
|
-
s.add_runtime_dependency 'celluloid_pubsub', '~> 0.
|
19
|
+
s.add_runtime_dependency 'celluloid_pubsub', '~> 0.9', '>= 0.9'
|
20
20
|
s.add_runtime_dependency 'em-hiredis', '~> 0.3', '>= 0.3.0'
|
21
21
|
|
22
22
|
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4'
|
data/examples/shared_classes.rb
CHANGED
@@ -8,9 +8,8 @@ use_redis = ENV['USE_REDIS'].to_s == 'true' ? 'redis': ''
|
|
8
8
|
log_file_path = File.join(File.expand_path(File.dirname(__FILE__)), 'log', 'celluloid_pubsub.log')
|
9
9
|
|
10
10
|
# actor that subscribes to a channel
|
11
|
-
class
|
11
|
+
class FirstActor
|
12
12
|
include Celluloid
|
13
|
-
include Celluloid::Logger
|
14
13
|
|
15
14
|
def initialize(options = {})
|
16
15
|
@client = CelluloidPubsub::Client.new({ actor: Actor.current, channel: 'test_channel' }.merge(options))
|
@@ -34,9 +33,9 @@ class Subscriber
|
|
34
33
|
end
|
35
34
|
|
36
35
|
# actor that publishes a message in a channel
|
37
|
-
class
|
36
|
+
class SecondActor
|
38
37
|
include Celluloid
|
39
|
-
|
38
|
+
|
40
39
|
|
41
40
|
def initialize(options = {})
|
42
41
|
@client = CelluloidPubsub::Client.new({ actor: Actor.current, channel: 'test_channel2' }.merge(options))
|
@@ -58,10 +57,11 @@ class Publisher
|
|
58
57
|
|
59
58
|
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
60
|
+
# please don't use the BaseActor class to supervise actors. This is subject to change . This class is used only to test backward compatibility.
|
61
|
+
# For more information on how to supervise actors please see Celluloid wiki.
|
62
|
+
CelluloidPubsub::BaseActor.setup_actor_supervision(CelluloidPubsub::WebServer, actor_name: :web_server, args: {enable_debug: debug_enabled, adapter: use_redis,log_file_path: log_file_path })
|
63
|
+
CelluloidPubsub::BaseActor.setup_actor_supervision(FirstActor, actor_name: :first_actor, args: {enable_debug: debug_enabled })
|
64
|
+
CelluloidPubsub::BaseActor.setup_actor_supervision(SecondActor, actor_name: :second_actor, args: {enable_debug: debug_enabled })
|
65
65
|
signal_received = false
|
66
66
|
|
67
67
|
Signal.trap('INT') do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: celluloid_pubsub_redis_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid_pubsub
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.9'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: '0.9'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.9'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: '0.9'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: em-hiredis
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
300
|
version: '0'
|
301
301
|
requirements: []
|
302
302
|
rubyforge_project:
|
303
|
-
rubygems_version: 2.4
|
303
|
+
rubygems_version: 2.6.4
|
304
304
|
signing_key:
|
305
305
|
specification_version: 4
|
306
306
|
summary: Simple ruby implementation of a Redis Reactor used for publish subscribe
|