logstash-input-tcp 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 +4 -4
- data/CHANGELOG.md +4 -2
- data/logstash-input-tcp.gemspec +1 -1
- data/spec/inputs/tcp_spec.rb +2 -1
- data/spec/spec_helper.rb +2 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa74ce393d529b6e9cad1a4431cbb3a82401ec28
|
4
|
+
data.tar.gz: adfe4e406a4277f43b2c48b7bf311bea92f05d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c47c0bdccc6313937bf2eab5a0063b9686fcd833ae383883391baaf3476dfe23d745c0e0ce817cf3c2637731dd2c5883944502ac1bbfacc6a57685d2833f9c48
|
7
|
+
data.tar.gz: c50a8e467306efca4ad032c07e789840a594c8c50eebae88561a23e665b1b123fc47f0cc8eff98408cd2d735fb25af89f59dbfac27c84e3ac3930ea600b5c884
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
## 2.0.3
|
2
|
+
- removed usage of RSpec.configure, see https://github.com/logstash-plugins/logstash-input-tcp/pull/21
|
3
|
+
## 2.0.2
|
4
|
+
- refactored & cleaned up plugin structure, see https://github.com/logstash-plugins/logstash-input-tcp/pull/18
|
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
|
4
8
|
- Dependency on logstash-core update to 2.0
|
5
|
-
## 2.0.2
|
6
|
-
- refactored & cleaned up plugin structure, see https://github.com/logstash-plugins/logstash-input-tcp/pull/18
|
data/logstash-input-tcp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-input-tcp'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.3'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Read events over a TCP socket."
|
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"
|
data/spec/inputs/tcp_spec.rb
CHANGED
@@ -226,6 +226,7 @@ describe LogStash::Inputs::Tcp do
|
|
226
226
|
|
227
227
|
let(:port) { rand(1024..65535) }
|
228
228
|
subject { LogStash::Plugin.lookup("input", "tcp").new({ "port" => port }) }
|
229
|
+
let!(:helper) { TcpHelpers.new }
|
229
230
|
|
230
231
|
after :each do
|
231
232
|
subject.close rescue nil
|
@@ -244,7 +245,7 @@ describe LogStash::Inputs::Tcp do
|
|
244
245
|
let(:events) do
|
245
246
|
socket = Stud::try(5.times) { TCPSocket.new("127.0.0.1", port) }
|
246
247
|
|
247
|
-
result = pipelineless_input(subject, nevents) do
|
248
|
+
result = helper.pipelineless_input(subject, nevents) do
|
248
249
|
nevents.times do |i|
|
249
250
|
socket.puts("msg #{i}")
|
250
251
|
socket.flush
|
data/spec/spec_helper.rb
CHANGED
@@ -3,7 +3,7 @@ require "logstash/devutils/rspec/spec_helper"
|
|
3
3
|
|
4
4
|
# this has been taken from the udp input, it should be DRYed
|
5
5
|
|
6
|
-
|
6
|
+
class TcpHelpers
|
7
7
|
|
8
8
|
def pipelineless_input(plugin, size, &block)
|
9
9
|
queue = Queue.new
|
@@ -12,16 +12,11 @@ module TcpHelpers
|
|
12
12
|
end
|
13
13
|
block.call
|
14
14
|
sleep 0.1 while queue.size != size
|
15
|
-
result =
|
15
|
+
result = size.times.inject([]) do |acc|
|
16
16
|
acc << queue.pop
|
17
17
|
end
|
18
18
|
plugin.do_stop
|
19
19
|
input_thread.join
|
20
20
|
result
|
21
21
|
end
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
RSpec.configure do |c|
|
26
|
-
c.include TcpHelpers
|
27
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-tcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core
|
@@ -110,8 +110,8 @@ files:
|
|
110
110
|
- spec/spec_helper.rb
|
111
111
|
- spec/inputs/tcp_spec.rb
|
112
112
|
- logstash-input-tcp.gemspec
|
113
|
-
- CHANGELOG.md
|
114
113
|
- README.md
|
114
|
+
- CHANGELOG.md
|
115
115
|
- CONTRIBUTORS
|
116
116
|
- Gemfile
|
117
117
|
- LICENSE
|