push
travis-ci
184 of 191 relevant lines covered (96.34%)
430.97 hits per line
1 |
require 'lagomorph/metadata_adapter'
|
2 all except jruby-9.0.5.0 ✔ |
2 |
|
|
3 |
module Lagomorph |
2 all except jruby-9.0.5.0 ✔ |
4 |
QueueAdapter = Struct.new(:queue) do |
2 all except jruby-9.0.5.0 ✔ |
5 |
def subscribe(options = {}, &block) |
2 all except jruby-9.0.5.0 ✔ |
6 |
if Lagomorph.using_bunny? |
48 all except jruby-9.0.5.0 ✔ |
7 |
queue.subscribe(options) do |delivery_info, properties, payload|
|
48 all except jruby-9.0.5.0 ✔ |
8 |
metadata = MetadataAdapter.new(delivery_info, properties)
|
3,232 all except jruby-9.0.5.0 ✔ |
9 |
block.call(metadata, payload) |
3,232 all except jruby-9.0.5.0 ✔ |
10 |
end
|
|
11 |
else
|
|
12 |
queue.subscribe(options, &block) |
× |
13 |
end
|
|
14 |
end
|
|
15 |
|
|
16 |
def name |
2 all except jruby-9.0.5.0 ✔ |
17 |
queue.name |
1,616 all except jruby-9.0.5.0 ✔ |
18 |
end
|
|
19 |
end
|
|
20 |
end
|