tiny_bus 3.7.0 → 3.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tiny_bus.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803568daf9dd822ea55895b457386681ca10188a55fc23e906837b3fbce106fa
|
4
|
+
data.tar.gz: 9377bf6ace10208f47140c30df9ac826d9fa268e668da1bc589d143cb2571366
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec5d4689105f2b985f79906e7ed027dea7409b3d75077c9ce71b8e8ee7d48b30e8f5b10a81ff8f9335a7ce0996e5a0fd71dfaf3c5f8c140c36987e97ef61e692
|
7
|
+
data.tar.gz: 92cedd46357367de1ce95e830f835d483cec6c765576c34e93facf4f711ec353255205ce4ba2d51b545ca5b8f03f9563ac3ad6042e321d2162a0947355f58be7
|
data/lib/tiny_bus.rb
CHANGED
@@ -115,12 +115,12 @@ class TinyBus
|
|
115
115
|
msg = @translator&.pipe(msg) || msg
|
116
116
|
|
117
117
|
topic = msg[@topic_key]
|
118
|
-
|
119
118
|
subbers = @subs[topic]
|
120
119
|
|
120
|
+
@stats[topic] ||= 0
|
121
121
|
@stats[@total_key] += 1
|
122
|
+
@stats[topic] += 1
|
122
123
|
if (subbers&.length || 0) > 0
|
123
|
-
@stats[topic] += 1
|
124
124
|
subbers.each{|s| s.msg(msg) }
|
125
125
|
@log.send(lvl, "S #{msg}")
|
126
126
|
else
|
@@ -146,7 +146,7 @@ class TinyBus
|
|
146
146
|
<<~DEBUG
|
147
147
|
TinyBus stats: #{@stats.keys.length > 0 ? "\n " + @stats.keys.sort.map{|t| "#{t.rjust(12)}: #{@stats[t]}" }.join("\n ") : '<NONE>'}
|
148
148
|
Topics & Subscribers:
|
149
|
-
#{@subs.map{|topic, subbers| "#{topic}
|
149
|
+
#{@subs.map{|topic, subbers| "#{topic}:\n #{subbers.map(&:to_s).join("\n ")}" }.join("\n ") }
|
150
150
|
DEBUG
|
151
151
|
end
|
152
152
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Lunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tiny_log
|