logstash-input-ganglia 2.0.2 → 2.0.3

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: 79881236f93f396bea9938a69c0cdcf6b9190a91
4
- data.tar.gz: 56cf28a66e3cea83c479ee386a13e5b23257d12c
3
+ metadata.gz: f7dc431f64bfc09bfaeff29fb4a670560f8154b4
4
+ data.tar.gz: 611a8c4325fdb9229b8031b4ca9233b4227ad1b8
5
5
  SHA512:
6
- metadata.gz: 18fcb64c2a5cc55dd6534b6085e1cb95ae70b82efa88ccb19a3da5d99e231dc50d62c5777ed24f842dd465cc674404cf0d7f04278a42067ee3def95f096b2fc4
7
- data.tar.gz: f0143339076589ece420d83a65cbe8d4cd695691380eb471ccb6b8928de19bf199aea115b59bd5492523435836385d834724b6f28065ffd9780c6b3b61820206
6
+ metadata.gz: 66203e8d76fae74fc95f9610cbb9feffb9c67d673a77a28f7a96745bc246e5e64d6f523c0d85ae198c51ae56bc81a3875acaab9d5d34a2bf3dcd0858603955d1
7
+ data.tar.gz: 28d0ad30bcc7a06fe6c9e6eebb87c87dd95a534552a1d96032a6f7a3e6242d209344529c691f095f18bfcf2f412bcbb441921faee6adad1da7726b7f741d7217
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.0.3
2
+ - Fix test to be able to run withint the LS core default plugins
3
+ integration system.
4
+
1
5
  ## 2.0.0
2
6
  - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
7
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-ganglia'
4
- s.version = '2.0.2'
4
+ s.version = '2.0.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read ganglia packets from the network via udp"
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -45,10 +45,9 @@ describe LogStash::Inputs::Ganglia do
45
45
  let(:client) { GangliaClient.new("0.0.0.0", port) }
46
46
 
47
47
  let(:events) do
48
- input(conf, nevents) do
49
- nevents.times do |value|
50
- client.send(data)
51
- end
48
+ input(conf) do |pipeline, queue|
49
+ nevents.times { client.send(data) }
50
+ nevents.times.collect { queue.pop }
52
51
  end
53
52
  end
54
53
 
data/spec/spec_helper.rb CHANGED
@@ -2,47 +2,3 @@
2
2
  require "logstash/devutils/rspec/spec_helper"
3
3
  require "logstash/inputs/ganglia"
4
4
  require_relative "support/client"
5
-
6
- module GangliaHelpers
7
-
8
- def setup_clients(number_of_clients, port)
9
- number_of_clients.times.inject([]) do |clients|
10
- clients << GangliaClient.new(localhost, port)
11
- end
12
- end
13
-
14
- def input(config, size, &block)
15
- pipeline = LogStash::Pipeline.new(config)
16
- queue = Queue.new
17
-
18
- pipeline.instance_eval do
19
- # create closure to capture queue
20
- @output_func = lambda { |event| queue << event }
21
-
22
- # output_func is now a method, call closure
23
- def output_func(event)
24
- @output_func.call(event)
25
- end
26
- end
27
-
28
- pipeline_thread = Thread.new { pipeline.run }
29
- sleep 0.1 while !pipeline.ready?
30
-
31
- block.call
32
- sleep 0.1 while queue.size != size
33
-
34
- result = size.times.inject([]) do |acc|
35
- acc << queue.pop
36
- end
37
-
38
- pipeline.shutdown
39
- pipeline_thread.join
40
-
41
- result
42
- end # def input
43
-
44
- end
45
-
46
- RSpec.configure do |c|
47
- c.include GangliaHelpers
48
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-ganglia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic