logstash-output-udp 1.0.0 → 1.1.0

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: 879d95037eb3b864529c5138fc0edbdadbb7abae
4
- data.tar.gz: 06a6dd52cb7841b34595ccfc09ddf4882b97f053
3
+ metadata.gz: 854a751c86b6f347b4cd856a5528fb1a8b0dc755
4
+ data.tar.gz: a1cdd9673d71b288de89a245ba15f848dad05407
5
5
  SHA512:
6
- metadata.gz: 11a53178271ae567c713c29043281beb630c8f86af8312a95c36b564ecfcead18f0342bc79310bb9187f2a2a70626cda229b8472e34eea9e061b63a6c2728f5f
7
- data.tar.gz: 4081ae696906a7bbb12115bda6f076c08b6b392ed1646cffd0132d7116b3703618d1a319267aaa51003c5a5673389c6b7badaba1728119b37958a2d8555799a9
6
+ metadata.gz: 4fd7481b0961a9c22e14636105ef5bda245843bd5a80a5121452cf6e045ee11841670a571707b75671ef4daba83ceaad6222ec4f08f64731a2bad9991032d3c7
7
+ data.tar.gz: 03404ee6386e8ba60fc9840830d8278d5475bde346e98b6200f95d60f273e11f1b7a7d9b3ba0930b2f882df919c6c2a33808ffe1d27a473273ed8739962bd1d2
data/CHANGELOG.md CHANGED
@@ -0,0 +1,2 @@
1
+ # 1.1.0
2
+ - Add basic test for the plugin
data/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Logstash Plugin
2
2
 
3
- This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
3
+ This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
4
 
5
5
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
6
6
 
7
7
  ## Documentation
8
8
 
9
- Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elasticsearch.org/guide/en/logstash/current/).
9
+ Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/).
10
10
 
11
11
  - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
12
- - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
12
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide
13
13
 
14
14
  ## Need Help?
15
15
 
@@ -83,4 +83,4 @@ Programming is not a required skill. Whatever you've seen about open source and
83
83
 
84
84
  It is more important to the community that you are able to contribute.
85
85
 
86
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elasticsearch/logstash/blob/master/CONTRIBUTING.md) file.
86
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-udp'
4
- s.version = '1.0.0'
4
+ s.version = '1.1.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Send events over 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"
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
14
- s.files = `git ls-files`.split($\)+::Dir.glob('vendor/*')
14
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -1 +1,30 @@
1
- require "logstash/devutils/rspec/spec_helper"
1
+ # encoding: utf-8
2
+ require_relative "../spec_helper"
3
+
4
+ describe LogStash::Outputs::UDP do
5
+
6
+ let(:host) { "localhost" }
7
+ let(:port) { rand(1024..65535) }
8
+
9
+ it "should register without errors" do
10
+ plugin = LogStash::Plugin.lookup("output", "udp").new({ "host" => host, "port" => port})
11
+ expect { plugin.register }.to_not raise_error
12
+ end
13
+
14
+ describe "#send" do
15
+
16
+ subject { LogStash::Outputs::UDP.new({"host" => host, "port" => port}) }
17
+
18
+ let(:properties) { { "message" => "This is a message!"} }
19
+ let(:event) { LogStash::Event.new(properties) }
20
+
21
+ before(:each) do
22
+ subject.register
23
+ end
24
+
25
+ it "should receive the generated event" do
26
+ expect(subject.instance_variable_get("@socket")).to receive(:send).with(kind_of(String), 0, host, port)
27
+ subject.receive(event)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,4 @@
1
+ # encoding: utf-8
2
+ require "logstash/devutils/rspec/spec_helper"
3
+ require "logstash/outputs/udp"
4
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-udp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2015-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core
@@ -64,17 +64,16 @@ executables: []
64
64
  extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
- - .gitignore
67
+ - lib/logstash/outputs/udp.rb
68
+ - spec/spec_helper.rb
69
+ - spec/outputs/udp_spec.rb
70
+ - logstash-output-udp.gemspec
71
+ - README.md
68
72
  - CHANGELOG.md
69
73
  - CONTRIBUTORS
70
74
  - Gemfile
71
75
  - LICENSE
72
76
  - NOTICE.TXT
73
- - README.md
74
- - Rakefile
75
- - lib/logstash/outputs/udp.rb
76
- - logstash-output-udp.gemspec
77
- - spec/outputs/udp_spec.rb
78
77
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
79
78
  licenses:
80
79
  - Apache License (2.0)
@@ -97,9 +96,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
96
  version: '0'
98
97
  requirements: []
99
98
  rubyforge_project:
100
- rubygems_version: 2.2.2
99
+ rubygems_version: 2.1.9
101
100
  signing_key:
102
101
  specification_version: 4
103
102
  summary: Send events over UDP
104
103
  test_files:
104
+ - spec/spec_helper.rb
105
105
  - spec/outputs/udp_spec.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- .bundle
4
- vendor
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- @files=[]
2
-
3
- task :default do
4
- system("rake -T")
5
- end
6
-
7
- require "logstash/devutils/rake"