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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9929d55429f319011065abe04e4911fb0fdec69f
4
- data.tar.gz: '08daf49ac727b018751b31d9def5a718076739c7'
3
+ metadata.gz: b17f757f40d9efb709752c23d66aa3b1f22898f8
4
+ data.tar.gz: fefcce018b414f3157849f6b22d70b6f31de1415
5
5
  SHA512:
6
- metadata.gz: 5f3b6d362b18bf9adb5c194ce7c66079fba7896dacddf5c97ce101804e43e3b5ea8c569919f0dd21084cae63548d2c6fd02d045fa2c8d12bfa9d0863e56a2f65
7
- data.tar.gz: 4ab3cd0afdca6d900f1530414aa7b25a7ec05f41c6e73f5c84e865c4e7bd0a02d1180acac1cc13a8a916d5ceeb6f94e68afa8cf0bb6c37fea774c940fdb58247
6
+ metadata.gz: 36dfb8d427a4ed620ba90ca7e20162db76c7df06f875bc1213bc65cae8b4965693bd229345175154b777762bb1fed8e7a7beaf30bd7db4f75e4470aef71b8c70
7
+ data.tar.gz: 3442001467d5b3061847491285dc96e72b9dc056768f9784485789ac4b15bef188999ca31e8099bc55b95cae2495fab5a4b117da763bbc8f196b3569f10c737b
@@ -1,9 +1,25 @@
1
1
  require 'ob_serv'
2
- require 'ob_serv/celluloid_publisher'
2
+ require 'celluloid/current'
3
3
  require "ob_serv/celluloid/version"
4
4
 
5
5
  module ObServ
6
- module Celluloid
7
- # Your code goes here...
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
@@ -1,5 +1,5 @@
1
1
  module ObServ
2
2
  module Celluloid
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.2
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