tiny_bus 3.7.0 → 3.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tiny_bus.rb +2 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10175a5f3eb8391e273b860aefdccd67ff469fb603a063fecdeb58858af6066b
4
- data.tar.gz: 2b2a8e6babff0734b57f0b91e2d12bd0782133e0291f4a561441969815deed0e
3
+ metadata.gz: 69976083efa62900031ef18daf5d222157fa8c2e1250a4fac06c8068a98631db
4
+ data.tar.gz: 3f428977292bfdbe108d859406b3f2359646a1e28e716779ce5b6c828a2a5e6a
5
5
  SHA512:
6
- metadata.gz: 9b1a67cd7b2d5a5e9a93f245c4f9f5b14c70edfcb99a0c64d0b145f3b4349865db668846b5cc9399fbf32f6ddf9ea399f245232535c999c4f8a65754ca9545e0
7
- data.tar.gz: 0a22452c404f6e61664b2ce84b4b21f8b686537625c8bbb43c38294e2303262bdab72482d92025f88be4e3a23eac1004a39b1c59850303d01aa76c7d656213df
6
+ metadata.gz: df717813c4b3b516c6a2f16fdf539e2a8636a67a89a5c9b273640b721feaa37c16c69d9cd66198e8c36fbf322904384eac39987db3ae43d288e99da43c4b8b9b
7
+ data.tar.gz: d95a5ad0da6d327bd4c4586e4ee7ec9a9859a1c540a34a5f87ba9a9301280ff58822a9f805c54f499eb7d4ea18a18e7e309f30c67acb5c9a6c614caf79555a68
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
+ @stats[topic] += 1
121
122
  @stats[@total_key] += 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
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.0
4
+ version: 3.7.1
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-04 00:00:00.000000000 Z
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tiny_log