microbunny 0.1.0 → 0.2.0

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: 484bd50ae6eb05a870552842e9a1be6e66db1530
4
- data.tar.gz: cc82304606c921612a8a6c6fb4db7e3db6e90e95
3
+ metadata.gz: 6365ab51bea72dd57cd6d8f59b106275f5bc964b
4
+ data.tar.gz: fe0be65811ab0ac42875642537819bcf1f555b2d
5
5
  SHA512:
6
- metadata.gz: 5d07b7b4fc067f03467b73de25022589e9b4b4827822f71b6e6460bee6245d22e5724529ce41d30bc0e0047e3c43c05c41afc66b0af46ba99233f9241a49dcfc
7
- data.tar.gz: d3e4ca8098f3a32f1a025011abce3c0bcc7fa0a30b1762dcf0eb4f374559d0eb9514100a480e569260e2f15cec2e8bafc9c339f58fbd72237eef6593e617e697
6
+ metadata.gz: fd659d340c4591fb9566df6333c40f4ab19302e1668692153eee39a6b8402fadd3a37056e549849bedd522ac739e182ca6eaa13f74523777c57fbbf9b9952c02
7
+ data.tar.gz: 678ed3c07e71bfe400c74c33b974c79f2eb8b0c6a736787eb43435af376fe9fdadc4d5375f973fa41a7af8c5af0a8af3b0a24aaf60c82aa437e17a15460da2d3
data/lib/microbunny.rb CHANGED
@@ -1,5 +1,12 @@
1
1
  require 'rubygems'
2
- require 'bunny'
2
+
3
+ if RUBY_ENGINE == 'jruby'
4
+ require 'march_hare'
5
+ RABBIT_MQ_ADAPTER = MarchHare
6
+ else
7
+ require 'bunny'
8
+ RABBIT_MQ_ADAPTER = Bunny
9
+ end
3
10
 
4
11
  require_relative 'microbunny/settings'
5
12
  require_relative 'microbunny/connection'
@@ -21,6 +28,7 @@ module MicroBunny
21
28
 
22
29
  def start
23
30
  self.connection = Connection.new(
31
+ adapter: RABBIT_MQ_ADAPTER,
24
32
  host: self.settings.host,
25
33
  vhost: self.settings.vhost,
26
34
  username: self.settings.username,
@@ -1,7 +1,7 @@
1
1
  module MicroBunny
2
2
  class Connection
3
- def initialize(host:, vhost: nil, username: 'guest', password: 'guest')
4
- @conn = Bunny.new(
3
+ def initialize(adapter:, host:, vhost: nil, username: 'guest', password: 'guest')
4
+ @conn = adapter.new(
5
5
  host,
6
6
  vhost: vhost,
7
7
  username: username,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microbunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Lebrun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -28,8 +28,8 @@ description: |2
28
28
  MicroBunny is an small opinionated RabbitMQ framework built on top of bunny that
29
29
  implements a routing scheme and client API optimized to help you build asynchronous,
30
30
  event-based communication between web services (such as microservices). If you're
31
- interesting in building resilient, loosely coupled and self contained services, then
32
- this framework may be for you.
31
+ interesting in building resilient, loosely coupled and self contained services powered
32
+ by RabbitMQ, then this framework may be for you.
33
33
  email:
34
34
  - plebrun@on-site.com
35
35
  - anthonylebrun@gmail.com