dynarex-events 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -3
- data.tar.gz.sig +0 -0
- data/lib/dynarex-events.rb +7 -4
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c13e5408203ec6908bd55c210c77b8b4b83c30
|
4
|
+
data.tar.gz: b3e0ea1b1cc35898353fa097c75850d2fe7fcc1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b066df93454c098c92a81fb5b03f63d46b9a1ea87812a6dd0b8573fc509928acd25ab1a032915002ce08498e1b9c502215c0c49b013be33e5b9d39481212ba39
|
7
|
+
data.tar.gz: 55d2609c80a9005773d205c4df6962b997e04fb53c00ca9fefe5e8739263b0e21663937203162a56bcc64c6368bdbac7e1ec74b59764c2ad3f50ca13720dfd5b
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
_����@��ۚ��B���(�Y���gZ�4���VOW�_"�1^�
|
2
|
+
�M:��Y���&��~����1X�/�sblª�8��=�ҙf5K���d��{�nvK����oK�ҳb��N�3;~�
|
3
|
+
Y1&�����.V��b��`�-(t��v"+;�1�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex-events.rb
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'chronic_duration'
|
6
6
|
require 'dynarex_cron'
|
7
7
|
|
8
|
+
|
8
9
|
class DynarexEvents < DynarexCron
|
9
10
|
|
10
11
|
attr_reader :to_a
|
@@ -14,13 +15,14 @@ class DynarexEvents < DynarexCron
|
|
14
15
|
def initialize(dynarex_file=nil, options={})
|
15
16
|
|
16
17
|
opt = {sps_address: nil, sps_port: '59000', drb_port: nil}.merge options
|
17
|
-
|
18
|
+
|
19
|
+
@logger = Logger.new(opt[:log],'weekly') if opt[:log]
|
18
20
|
@entries, @other_entries, @cron_events = [], [], []
|
19
21
|
|
20
|
-
@
|
22
|
+
@dynarex = dynarex_file
|
21
23
|
load_events()
|
22
24
|
|
23
|
-
@sps_address = opt[:sps_address]
|
25
|
+
@sps_address, @sps_port = opt[:sps_address], opt[:sps_port]
|
24
26
|
|
25
27
|
if opt[:drb_port] then
|
26
28
|
|
@@ -45,7 +47,7 @@ class DynarexEvents < DynarexCron
|
|
45
47
|
|
46
48
|
def load_events()
|
47
49
|
|
48
|
-
dynarex = Dynarex.new
|
50
|
+
dynarex = @dynarex.is_a?(Dynarex) ? @dynarex : Dynarex.new(@dynarex)
|
49
51
|
@entries = (dynarex.to_h || []) + @other_entries
|
50
52
|
|
51
53
|
@cron_events = self.to_a if @entries
|
@@ -61,6 +63,7 @@ class DynarexEvents < DynarexCron
|
|
61
63
|
params = {uri: "ws://%s:%s" % [@sps_address, @sps_port]}
|
62
64
|
|
63
65
|
c = WebSocket::EventMachine::Client
|
66
|
+
@ws = nil
|
64
67
|
|
65
68
|
EventMachine.run do
|
66
69
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|