microbunny 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/microbunny.rb +9 -1
- data/lib/microbunny/connection.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6365ab51bea72dd57cd6d8f59b106275f5bc964b
|
|
4
|
+
data.tar.gz: fe0be65811ab0ac42875642537819bcf1f555b2d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd659d340c4591fb9566df6333c40f4ab19302e1668692153eee39a6b8402fadd3a37056e549849bedd522ac739e182ca6eaa13f74523777c57fbbf9b9952c02
|
|
7
|
+
data.tar.gz: 678ed3c07e71bfe400c74c33b974c79f2eb8b0c6a736787eb43435af376fe9fdadc4d5375f973fa41a7af8c5af0a8af3b0a24aaf60c82aa437e17a15460da2d3
|
data/lib/microbunny.rb
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
require 'rubygems'
|
|
2
|
-
|
|
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 =
|
|
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.
|
|
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-
|
|
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
|
|
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
|