observ-celluloid 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/ob_serv/celluloid.rb +19 -3
- data/lib/ob_serv/celluloid/version.rb +1 -1
- metadata +1 -2
- data/lib/ob_serv/celluloid_publisher.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b17f757f40d9efb709752c23d66aa3b1f22898f8
|
4
|
+
data.tar.gz: fefcce018b414f3157849f6b22d70b6f31de1415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36dfb8d427a4ed620ba90ca7e20162db76c7df06f875bc1213bc65cae8b4965693bd229345175154b777762bb1fed8e7a7beaf30bd7db4f75e4470aef71b8c70
|
7
|
+
data.tar.gz: 3442001467d5b3061847491285dc96e72b9dc056768f9784485789ac4b15bef188999ca31e8099bc55b95cae2495fab5a4b117da763bbc8f196b3569f10c737b
|
data/lib/ob_serv/celluloid.rb
CHANGED
@@ -1,9 +1,25 @@
|
|
1
1
|
require 'ob_serv'
|
2
|
-
require '
|
2
|
+
require 'celluloid/current'
|
3
3
|
require "ob_serv/celluloid/version"
|
4
4
|
|
5
5
|
module ObServ
|
6
|
-
|
7
|
-
|
6
|
+
class CelluloidPublisher
|
7
|
+
def self.publish(event, *args)
|
8
|
+
Wrapper.new.async.publish(event, *args)
|
9
|
+
end
|
10
|
+
|
11
|
+
class Wrapper
|
12
|
+
include ::Celluloid
|
13
|
+
def publish(event, *args)
|
14
|
+
ObServ.publish event, *args
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.register
|
19
|
+
method = ObServ::CelluloidPublisher.method(:publish)
|
20
|
+
ObServ.config[:publish] = method
|
21
|
+
end
|
8
22
|
end
|
9
23
|
end
|
24
|
+
|
25
|
+
ObServ::CelluloidPublisher.register
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: observ-celluloid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- watsy0007
|
@@ -99,7 +99,6 @@ files:
|
|
99
99
|
- bin/setup
|
100
100
|
- lib/ob_serv/celluloid.rb
|
101
101
|
- lib/ob_serv/celluloid/version.rb
|
102
|
-
- lib/ob_serv/celluloid_publisher.rb
|
103
102
|
- observ-celluloid.gemspec
|
104
103
|
homepage: https://github.com/watsy0007/observ-celluloid
|
105
104
|
licenses:
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'celluloid/current'
|
2
|
-
|
3
|
-
module ObServ
|
4
|
-
class CelluloidPublisher
|
5
|
-
def self.publish(event, *args)
|
6
|
-
Wrapper.new.async.publish(event, *args)
|
7
|
-
end
|
8
|
-
|
9
|
-
class Wrapper
|
10
|
-
include ::Celluloid
|
11
|
-
def publish(event, *args)
|
12
|
-
ObServ.publish event, *args
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.register
|
17
|
-
method = ObServ::CelluloidPublisher.method(:publish)
|
18
|
-
ObServ.config[:publish] = method
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
ObServ::CelluloidPublisher.register
|