logstash-output-tcp 4.0.1 → 4.0.2

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: 663fc3458ef8028c0c8e80b10dcabecbaabde8b8
4
- data.tar.gz: 72bb4f62f675df1f3d18cd0a1d8be548c05df504
3
+ metadata.gz: b932be1d74f578b35700ea725ca26e3e178cfb21
4
+ data.tar.gz: b90da1d73508bfc7bcde930801119ebc5fd111ba
5
5
  SHA512:
6
- metadata.gz: 80e98dc35c2555874de454399cf515e9315888c50dceffdc6e8f04721b6617e00beff4356dbb602d191314ccdbb409735c6bcd44cfc31ff932d1952915968ed5
7
- data.tar.gz: 1b271a20df0c25d1b64fc5eb536d4d42e7196ec1ad7097ead0e5cc5970115ddbcc5ddfc34acf2c14265382aa38f0592ab866a90576628539e27deed36003e8e9
6
+ metadata.gz: f41fdb7b54e9261cce89eb430413b30762a2e0b233000aef8afd1f00348b45887c7be1683e66e8d489a338bfb5e1aa6cabca4e6a7ff388ee84fdab01b2275e85
7
+ data.tar.gz: f7e0792e1c1173dee145727452e9955564f75683423c515ff03929dbe26fb837ea4ba1f826fb7be3672e2a8effb4b0029a9e5c8dca725bbda7e1b1bffff1fcb5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 4.0.2
2
+ - Docs fixes
3
+
1
4
  ## 4.0.0
2
5
  - Remove deprecated `workers_not_supported` call
3
6
  - Use concurrency :single
data/docs/index.asciidoc CHANGED
@@ -12,7 +12,7 @@ START - GENERATED VARIABLES, DO NOT EDIT!
12
12
  END - GENERATED VARIABLES, DO NOT EDIT!
13
13
  ///////////////////////////////////////////
14
14
 
15
- [id="plugins-{type}-{plugin}"]
15
+ [id="plugins-{type}s-{plugin}"]
16
16
 
17
17
  === Tcp output plugin
18
18
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-tcp'
4
- s.version = '4.0.1'
4
+ s.version = '4.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Write 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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -0,0 +1,42 @@
1
+ require "logstash/devutils/rspec/spec_helper"
2
+ require "socket"
3
+ require "stud/task"
4
+
5
+ describe "TCP Output" do
6
+
7
+ let(:port) { rand(6233) }
8
+ subject { LogStash::Plugin.lookup("output", "tcp").new({ "host" => "localhost", "port" => port }) }
9
+ let(:event) { LogStash::Event.new({'message' => '183.60.215.50 - - [11/Sep/2014:22:00:00 +0000] "GET /scripts/netcat-webserver HTTP/1.1" 200 182 "-" "Mozilla/5.0 (compatible; EasouSpider; +http://www.easou.com/search/spider.html)"', '@timestamp' => LogStash::Timestamp.at(0) }) }
10
+ let(:req_buffer) { Array.new }
11
+ let(:input) { LogStash::Plugin.lookup("input", "tcp").new({ "host" => "localhost", "port" => port }) }
12
+ let(:queue) { Array.new }
13
+
14
+ def thread_it
15
+ Thread.new do
16
+ begin
17
+ server = TCPServer.open(2000)
18
+ loop do
19
+ c = server.accept
20
+ line = c.gets
21
+ print line
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+
28
+ # it "should #register without errors" do
29
+ # expect { subject.register }.to_not raise_error
30
+ # end
31
+
32
+ # TCP server
33
+ it "should successfully send to a listening TCP server" do
34
+ subject.register
35
+
36
+ t = thread_it
37
+ t.run
38
+
39
+ subject.receive(event)
40
+ sleep 5
41
+ end
42
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-23 00:00:00.000000000 Z
11
+ date: 2017-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -87,6 +87,7 @@ files:
87
87
  - docs/index.asciidoc
88
88
  - lib/logstash/outputs/tcp.rb
89
89
  - logstash-output-tcp.gemspec
90
+ - spec/integration/outputs/tcp_spec.rb
90
91
  - spec/outputs/tcp_spec.rb
91
92
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
92
93
  licenses:
@@ -115,4 +116,5 @@ signing_key:
115
116
  specification_version: 4
116
117
  summary: Write events over a TCP socket.
117
118
  test_files:
119
+ - spec/integration/outputs/tcp_spec.rb
118
120
  - spec/outputs/tcp_spec.rb