tiny_bus 3.2.0 → 3.3.0

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 +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0b4ee66f65bb60557ba29b72f0ade0e840f0db352ac2f1bca0cab5385b97b19
4
- data.tar.gz: '089bfc105f34f3538844e5756e3623f8db4f835c58501140cc6d6a02521c17dc'
3
+ metadata.gz: b6166f18cf5222d5886b6276f55e5e6eba9f74050f69665a93b1f641a0ae9177
4
+ data.tar.gz: 96b2ebda14a8820f268d19c1f7e517937fae4c424faf8cb31bcf20a6b87110e3
5
5
  SHA512:
6
- metadata.gz: 58a576c5b7bc7445b263e93b23ba1ba65e6536dfdd38dfe150251401dfc9490776ca6b751ef27c9ed71ce2bea0901d5292b009bed217c7c0a50c3c852f88e748
7
- data.tar.gz: 45a52d67eecda3efa9d8e72267413fd0d5adaab5b5f3168278e7938e0edd88f9f29b6e18fb5a98d7058c0a456c3898b83a92549cf7df7a012313bc27b1f8b736
6
+ metadata.gz: b95b706827023d4cbd94030a3f5a382d46543422e6ad47f9bfe2196972c0c106b22082a5654b096de708ccdba8d7d48be949c11b59a1a8ec89162eeec2d6e471
7
+ data.tar.gz: b7be435794e5fc4aca6f4baa0ab3b7d35ceaebdd573fe1e60bb7ff5757370917a96c3b4b0ea476796ba2f3e46326e2b524e06d64705f890f4f533c761253c5f4
data/lib/tiny_bus.rb CHANGED
@@ -75,8 +75,8 @@ class TinyBus
75
75
  @trace_key = "#{annotation_prefix}trace"
76
76
 
77
77
  @annotator = TinyPipe.new([
78
- ->(m){ m[@time_key] = (Time.now.to_f * 1000).to_i; m },
79
- ->(m){ m[@msg_uuid_key] = SecureRandom.uuid; m },
78
+ ->(m){ m[@time_key] ||= (Time.now.to_f * 1000).to_i; m },
79
+ ->(m){ m[@msg_uuid_key] ||= SecureRandom.uuid; m },
80
80
  ->(m){ m[@trace_key] ||= SecureRandom.uuid; m }
81
81
  ])
82
82
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_bus
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt