banter 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42627fddd3d122f765afe2aef89821602043ba0d
4
- data.tar.gz: c665d387761aa6a52af05a4e55e08ff35f794cf4
3
+ metadata.gz: 626c512c0493b8041f1c1565e6a00c9b50026c19
4
+ data.tar.gz: 173c35409dcec9b576e20a93966f60aa5b5ad8a2
5
5
  SHA512:
6
- metadata.gz: 3b5e5f28f78eecfed934806260c4eda7231e338deb826132a0ba752c7c3238f6dd05693a884df0ac059552d765b80d910b8fc669464fd4a1213751d8321433c2
7
- data.tar.gz: d33a2b58e7da306eebcb9424a3581834a3eca0b03a4711132fc32fcceec57a2b6fbe30c71b5726e4eaa39bd9551458b945bcf4dfee5933b0403cc88dd8b67514
6
+ metadata.gz: 092e7942da3212e76e7f7fd2301cdfd4278732c57551f7a41933e09afd922c40baaaa25cb4be33b323c5947629e542a04c7ffbd2b639c61c28b10c04416842c7
7
+ data.tar.gz: fbabc72de1f83cd04f9144d5e497573b2266c83709e5e0dbf1f335dbe8ce68f4251f387a274f39b8ce2f5cdac576eded342f6642ed53ba5e6e5148329f429f63
@@ -119,6 +119,7 @@ module Banter
119
119
  def delay_execute
120
120
  @stack_depth -= 1
121
121
  if @stack_depth == 0
122
+ Banter::RabbitLogger.log(Logger::INFO, "Publishing all messages from delayed publish: #{@messages.count}")
122
123
  @messages.each do |key, envelope|
123
124
  execute_publish(key, envelope)
124
125
  end
@@ -128,6 +129,7 @@ module Banter
128
129
  end
129
130
 
130
131
  def add_message(key, envelope)
132
+ Banter::RabbitLogger.log(Logger::INFO, "Adding #{key} to delayed publish with #{envelope}")
131
133
  @messages << [key, envelope]
132
134
  end
133
135
  end
@@ -1,3 +1,3 @@
1
1
  module Banter
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -17,6 +17,7 @@ describe Banter::Publisher do
17
17
  allow(Banter::RabbitLogger).to receive(:log_publish)
18
18
  allow_any_instance_of(::Bunny::Session).to receive(:start).and_return(true)
19
19
  allow_any_instance_of(::Bunny::Session).to receive(:create_channel) { channel_mocker }
20
+ allow(Banter::RabbitLogger).to receive(:log)
20
21
  end
21
22
 
22
23
  describe "#delay_messages" do
@@ -33,6 +34,8 @@ describe Banter::Publisher do
33
34
  it "should attempt to publish twice" do
34
35
  result
35
36
  expect(Banter::RabbitLogger).to have_received(:log_publish).exactly(2).times
37
+ expect(Banter::RabbitLogger).to have_received(:log).with(Logger::INFO, /Publishing all messages from delayed publish/)
38
+ expect(Banter::RabbitLogger).to have_received(:log).with(Logger::INFO, /to delayed publish with/).exactly(2).times
36
39
  end
37
40
 
38
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honest Company
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-07-25 00:00:00.000000000 Z
14
+ date: 2014-08-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  requirements: []
290
290
  rubyforge_project:
291
- rubygems_version: 2.3.0
291
+ rubygems_version: 2.2.2
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: Library for pub-sub (Message Bus)