hallmonitor 3.0.0 → 4.0.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/CHANGELOG.md +5 -0
- data/lib/hallmonitor/outputters/influxdb.rb +5 -1
- data/lib/hallmonitor/version.rb +1 -1
- data/spec/hallmonitor/outputters/influxdb_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bf8d13dcc1fef8473f9ba94777c6ccdc764f19c
|
4
|
+
data.tar.gz: deeab3f14fd9fa69015ed13aaa607edf9239b1d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 814c9f8c30f73f40dd1ad3b474ede958444dfe2b0918fc0de87166dad1259ac3733efe62ca30adbbeb11c658b01ded7b196eadfaad63196e7e4ccd6969d893a1
|
7
|
+
data.tar.gz: affa457a4e18eac08dba4d6c4d0f5fc1580534a277b17b475257b7164ba8400d72e1e7f172481545ca91d2b79278ba7987e41956e8f1bdc0548456354f5b260b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# Version 4.0.0
|
2
|
+
- Changed initializer signature for InfluxDB outputter to use
|
3
|
+
keyword args.
|
4
|
+
- Added `attr_accessor` for InfluxDB Outputter's transformer
|
5
|
+
|
1
6
|
# Version 3.0.0
|
2
7
|
- Refactored the Transformer concept in the InfluxDB outputter so that
|
3
8
|
it is more flexible. This was in response to the InfluxDB client gem
|
@@ -10,6 +10,10 @@ module Hallmonitor
|
|
10
10
|
# Simple EventData struct, used to communicate with an optional Transformer
|
11
11
|
EventData = Struct.new(:name, :tags, :fields)
|
12
12
|
|
13
|
+
# @return [#transform(Event, EventData)] Object used to transform data
|
14
|
+
# before it is sent to InfluxDB
|
15
|
+
attr_accessor :transformer
|
16
|
+
|
13
17
|
# Builds a new Influxdb outputter
|
14
18
|
# @param influxdb_client [InfluxDB::Client] client instance to use
|
15
19
|
# @param tags [Hash] Set of default tags applied to all events output to
|
@@ -22,7 +26,7 @@ module Hallmonitor
|
|
22
26
|
# before it is written out to InfluxDB
|
23
27
|
# @raise if influxdb_client does not respond to :write_point
|
24
28
|
# (InfluxDB::Client contract)
|
25
|
-
def initialize(influxdb_client, tags
|
29
|
+
def initialize(influxdb_client, tags: {}, transformer: nil)
|
26
30
|
unless influxdb_client.respond_to?(:write_point)
|
27
31
|
raise 'Supplied InfluxDB Client was not as expected'
|
28
32
|
end
|
data/lib/hallmonitor/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Hallmonitor
|
|
6
6
|
RSpec.describe Influxdb do
|
7
7
|
let(:influxdb_client) { nil }
|
8
8
|
let(:default_tags) { {} }
|
9
|
-
let(:outputter) { described_class.new(influxdb_client, default_tags) }
|
9
|
+
let(:outputter) { described_class.new(influxdb_client, tags: default_tags) }
|
10
10
|
|
11
11
|
context '#initialize' do
|
12
12
|
context 'with a bad influxdb client' do
|
@@ -73,7 +73,7 @@ module Hallmonitor
|
|
73
73
|
context 'with a transformer' do
|
74
74
|
let(:transformer) { double('transformer') }
|
75
75
|
let(:outputter) do
|
76
|
-
described_class.new(influxdb_client, default_tags, transformer)
|
76
|
+
described_class.new(influxdb_client, tags: default_tags, transformer: transformer)
|
77
77
|
end
|
78
78
|
|
79
79
|
let(:expected_data) do
|