eventoverse 0.2.3 → 0.2.4

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.
@@ -0,0 +1,33 @@
1
+ require 'monitor'
2
+ require 'multi_json'
3
+ require 'net/http'
4
+
5
+ module Eventoverse
6
+ class HttpReporter < BaseReporter
7
+
8
+ #
9
+ # API
10
+ #
11
+
12
+ def backend_publish_message(payload)
13
+ response = Net::HTTP.post_form(@uri, payload)
14
+ end # publish_message
15
+
16
+ private
17
+
18
+ def initialize
19
+ @monitor = Monitor.new
20
+ end
21
+
22
+ def connection
23
+ return @connection unless @connection.nil?
24
+ @monitor.synchronize do
25
+ return @connection unless @connection.nil?
26
+ @uri = URI.parse(Config.get_in(Eventoverse.config, [:http, :uri]))
27
+ @uri
28
+ end
29
+ end # connection
30
+
31
+ end
32
+
33
+ end
@@ -1,3 +1,3 @@
1
1
  module Eventoverse
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Oleksandr Petrov
@@ -103,6 +103,7 @@ files:
103
103
  - lib/eventoverse/amqp_reporter_mri.rb
104
104
  - lib/eventoverse/base_reporter.rb
105
105
  - lib/eventoverse/config.rb
106
+ - lib/eventoverse/http_reporter.rb
106
107
  - lib/eventoverse/udp_reporter.rb
107
108
  - lib/eventoverse/version.rb
108
109
  - script/dispatch_amqp_mri.rb