logstash-input-udp 2.0.1 → 2.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffc5e1f54afba7b7af046de112d9cdd081b2d8c8
4
- data.tar.gz: 839bf1df40502b1f3fd88c0fef67834556a0bf55
3
+ metadata.gz: c69cbebeabe02c8f4a0e7fe20cfb1fea9345d387
4
+ data.tar.gz: 551ec08accad8b8c11a75269a63412907cc4536c
5
5
  SHA512:
6
- metadata.gz: fd988a87f3edd6c2fa305ee67f56acbfc70557e52fb25a725ccdac09a1c5895da2ec5083d6f0bdf6dcb695fc7065bcff3ce268beaf85e4c562ab24d7b3736823
7
- data.tar.gz: 02afb631b7faea97d073f5a023557ec4e321d5269a6afcc1a1f56dc039229aee86b0304710420086586e0ee1d5c2e27080462675fdaf3078377f1a1495afafd4
6
+ metadata.gz: a87eb925a9131beac0020706e87af83decaf0cb6e8898ede617f42d5d96842537cab2b29a3ae0940886130ca70482a662b0daddaf94f8cc5199fef2f0744d8fa
7
+ data.tar.gz: 87de0fe87dc38cefced7c7c00b90a8929d54c0512c131fd6f660d56fb7b0865ca65a33bb1644e674e897ef1a749cef07c02339dcca79659abad56edaa17d9364
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.0.2
2
+ - Adapt the test style to be able to run within the context of the LS
3
+ core default plugins test (integration)
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-udp'
4
- s.version = '2.0.1'
4
+ s.version = '2.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read messages as events over 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"
@@ -8,8 +8,9 @@ describe LogStash::Inputs::Udp do
8
8
  srand(RSpec.configuration.seed)
9
9
  end
10
10
 
11
- let(:port) { rand(1024..65535) }
12
- subject { LogStash::Plugin.lookup("input", "udp").new({ "port" => port }) }
11
+ let!(:helper) { UdpHelpers.new }
12
+ let(:port) { rand(1024..65535) }
13
+ subject { LogStash::Plugin.lookup("input", "udp").new({ "port" => port }) }
13
14
 
14
15
  after :each do
15
16
  subject.close rescue nil
@@ -27,7 +28,7 @@ describe LogStash::Inputs::Udp do
27
28
  let(:nevents) { 10 }
28
29
 
29
30
  let(:events) do
30
- input(subject, nevents) do
31
+ helper.input(subject, nevents) do
31
32
  nevents.times do |i|
32
33
  client.send("msg #{i}")
33
34
  end
data/spec/spec_helper.rb CHANGED
@@ -8,7 +8,7 @@ class LogStash::Inputs::Udp
8
8
  attr_reader :udp
9
9
  end
10
10
 
11
- module UdpHelpers
11
+ class UdpHelpers
12
12
 
13
13
  def input(plugin, size, &block)
14
14
  queue = Queue.new
@@ -20,7 +20,7 @@ module UdpHelpers
20
20
  sleep 0.1 until (plugin.udp && !plugin.udp.closed?)
21
21
  block.call
22
22
  sleep 0.1 while queue.size != size
23
- result = nevents.times.inject([]) do |acc|
23
+ result = size.times.inject([]) do |acc|
24
24
  acc << queue.pop
25
25
  end
26
26
  plugin.do_stop
@@ -28,7 +28,3 @@ module UdpHelpers
28
28
  end
29
29
 
30
30
  end
31
-
32
- RSpec.configure do |c|
33
- c.include UdpHelpers
34
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-udp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic