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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08f06052701f84c9f881dc2b9ccf9503bc667c65
4
- data.tar.gz: 8b041da6a96e8bfa7558589167b599bd0530e2f8
3
+ metadata.gz: 748b84c520a1228a143f6523e827a261db84b114
4
+ data.tar.gz: 3ea2d7bddf3c1a24a2b15407647c18ea9dc58ddf
5
5
  SHA512:
6
- metadata.gz: 5edcb6bca594686342ab623176585a8c1c8ec910b1b864b2bd1e9dfd69bebb6b2a47dc05ea6205caec9060bb574e204a454be11b17554cbf627d5c74e1f21a00
7
- data.tar.gz: c91d5506c35df9b5de64d0527871c439f508d509a77d98689d69bd6a8f052b787ab91e8dd96f85872ca4a6b999c43a89889332d7fce2e4f58123221d97a05a47
6
+ metadata.gz: 0dd38b6389ad44cdbda00762b211d230a8ac952190724ffb30ee61a2a3e5cab15472ad14216d6307dd3ec82f568ab0825f6f261a65f5e5ae07f1735bb1690ac1
7
+ data.tar.gz: 07a9974f7ad03ceba75c7f263a008a74834ebc4b56115be8dc994d90857b5b4fbac51c40c508178eb71213c0f101b3035e40185b4b932c504bc516af64951772
data/README.md CHANGED
@@ -60,7 +60,6 @@ Creating a client is simple as doing this. If you provide the channel when you i
60
60
  ```ruby
61
61
  class MyAwesomeClient
62
62
  include Celluloid
63
- include Celluloid::Logger
64
63
 
65
64
  def initialize(options = {})
66
65
  @client = CelluloidPubsub::Client.new({
@@ -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.7', '>= 0.7.1'
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'
@@ -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 Subscriber
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 Publisher
36
+ class SecondActor
38
37
  include Celluloid
39
- include Celluloid::Logger
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
- CelluloidPubsub::WebServer.supervise_as(:web_server, enable_debug: debug_enabled, adapter: use_redis,log_file_path: log_file_path )
63
- Subscriber.supervise_as(:subscriber, enable_debug: debug_enabled)
64
- Publisher.supervise_as(:publisher, enable_debug: debug_enabled)
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
@@ -15,9 +15,9 @@ module CelluloidPubsubRedisAdapter
15
15
  # major release version
16
16
  MAJOR = 0
17
17
  # minor release version
18
- MINOR = 1
18
+ MINOR = 2
19
19
  # tiny release version
20
- TINY = 2
20
+ TINY = 0
21
21
  # prelease version ( set this only if it is a prelease)
22
22
  PRE = nil
23
23
 
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.1.2
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-03-10 00:00:00.000000000 Z
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.7'
19
+ version: '0.9'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.7.1
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.7'
29
+ version: '0.9'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.7.1
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.8
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