tiny_bus 1.0.3 → 1.0.4

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 +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 167d35639547e4dd4a52b2882a02926cc7cc1b1e73c0ef2affaca995190f70a3
4
- data.tar.gz: 38326f77eba40699377e2b42f99e15484286c97028cdea5f35018d930f1fa18d
3
+ metadata.gz: 80e736518279f690809f359a1a1c4c96fd32154d3c847b83fe249e409bf5fd56
4
+ data.tar.gz: a1557163fb8fb490e79cbf159411989de8fc0e49bb8b5436d43cd7392c554031
5
5
  SHA512:
6
- metadata.gz: a588b106a52b799ab9c70f271ce2b4dc51fdac19f5b0518c53a95d5f5932b2eeda9ad53a5d61644e1d5aeba6ec0a0802540519ebbd21bc3e0c89f44ba8cd2ebd
7
- data.tar.gz: 61f2606e77ea63a9638fadc926d9c8020db234946271ed829b4b6d4e3d09115c6c260f81fca86830df1681363e1d002731fc63cba058d0311d6ab497c019fd24
6
+ metadata.gz: eb83e912761d438bc17d93a4121e0c897c3d88b212ec50a842d088cedcaa028b84b6e797727be10a817fe63ad93e941f0f82278ffc79bea5587d13e516398e0d
7
+ data.tar.gz: bcf4adbfa6c0f959410b3b25ede768690c5e2c8bf47cd28e0d0b38e3d05941af44496656a9d75ce468da66d7e456a2761141413383bfba71b3c6759a38e61c88
data/lib/tiny_bus.rb CHANGED
@@ -38,7 +38,7 @@ class TinyBus
38
38
  @subs = {}
39
39
  @stats = { '.dead' => 0 }
40
40
  @log = log ? TinyLog.new(log) : TinyLog.new($stdout)
41
- @dead = dead ? File.open(dead, 'a') : TinyLog.new($stderr)
41
+ @dead = dead ? TinyLog.new(dead) : TinyLog.new($stderr)
42
42
  @raise_on_dead = raise_on_dead
43
43
  end
44
44
 
@@ -84,13 +84,13 @@ class TinyBus
84
84
  if subbers
85
85
  @stats[topic] += 1
86
86
  subbers.each{|s| s.msg(annotated) }
87
- @log.send(lvl, annotated)
87
+ @log.sent annotated
88
88
  else
89
89
  if @raise_on_dead
90
90
  raise TinyBus::DeadMsgError.new("Could not deliver message to topic `#{topic}'")
91
91
  else
92
92
  @stats['.dead'] += 1
93
- @dead.send(lvl, annotated)
93
+ @dead.dead annotated
94
94
  end
95
95
  end
96
96
  end
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: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Lunt