brm_client 0.2.2 → 0.3.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.3.0
data/brm_client.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{brm_client}
8
- s.version = "0.2.2"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Stephane Bellity"]
12
- s.date = %q{2010-08-30}
12
+ s.date = %q{2010-09-13}
13
13
  s.description = %q{BRM Event logging client library}
14
14
  s.email = %q{sbellity@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -32,6 +32,7 @@ Gem::Specification.new do |s|
32
32
  "lib/brm_client/gateway/file.rb",
33
33
  "lib/brm_client/gateway/http.rb",
34
34
  "lib/brm_client/gateway/mongo.rb",
35
+ "lib/brm_client/gateway/stomp.rb",
35
36
  "lib/brm_client/logger.rb",
36
37
  "spec/brm_client_spec.rb",
37
38
  "spec/spec.opts",
@@ -0,0 +1,24 @@
1
+ require "stomp"
2
+
3
+ module BrmClient
4
+ module Gateway
5
+ class Stomp
6
+ attr_reader :client, :queue
7
+
8
+ def initialize opts
9
+ hosts = opts[:hosts] || [ opts[:host] ]
10
+ @client = Stomp::Client.new({ :hosts => hosts })
11
+ @queue = @connection.queue "reactor.#{opts[:application]}"
12
+ end
13
+
14
+ def disconnect
15
+ end
16
+
17
+ def send_event e
18
+ @client.send(@queue, e.to_json)
19
+ end
20
+
21
+ end
22
+
23
+ end
24
+ end
@@ -1,5 +1,6 @@
1
1
  require "brm_client/gateway/amqp"
2
+ require "brm_client/gateway/stomp"
2
3
  require "brm_client/gateway/mongo"
3
4
  require "brm_client/gateway/file"
4
5
  require "brm_client/gateway/http"
5
- require "brm_client/gateway/debug"
6
+ require "brm_client/gateway/debug"
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stephane Bellity
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-30 00:00:00 +02:00
17
+ date: 2010-09-13 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -108,6 +108,7 @@ files:
108
108
  - lib/brm_client/gateway/file.rb
109
109
  - lib/brm_client/gateway/http.rb
110
110
  - lib/brm_client/gateway/mongo.rb
111
+ - lib/brm_client/gateway/stomp.rb
111
112
  - lib/brm_client/logger.rb
112
113
  - spec/brm_client_spec.rb
113
114
  - spec/spec.opts