logstash-input-udp 3.4.1 → 3.5.0

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
  SHA256:
3
- metadata.gz: 2ba03e1c77b42ddb3277f9c32257c802e816f9b3f66beb01c6324f07ef10a304
4
- data.tar.gz: f06690123677ae1de68260cf64f74cbeee29feaf9499f99b253266a158bb6fdf
3
+ metadata.gz: 95704767af49439b51bff2740c3610e4024d129e176731aaaf1fbb21e9c1591c
4
+ data.tar.gz: b200bb9494788fcf67b1317f6245783b5c78affdfb775c0fe87f87f2fe666bf4
5
5
  SHA512:
6
- metadata.gz: 82c728db25566d1203afc8c40afe4a5f67e7c7852fc1e24c1eec85c041b7dc8523516a2a9fe58af7e07c7c0487b877616cff50bc00b1592bfe7086329aad1418
7
- data.tar.gz: 69cc686c2464cd43e16c2ce9d5447fde7309485cbac54c4be78e1727423ac5eab317c9f603aa4c828747e1e5f4c24c3c5d0d2f14d3a80f340adfb8a8a735a34e
6
+ metadata.gz: 87cc33004359edab4a71b0bed40c245e649e8bee97d085cd72944acc6132acd8f08f6852d06063854069c866a4208e02de06b5bcc74304e7dcf0ee851da8dd8f
7
+ data.tar.gz: e5dd436740b09ac4c4888154319cb7ced54e7f0eee99da211267c0438b45d54a9a892e14ce14e132a235fe9466d25014ebe2e7b4f5b79142281a24bc2aed7836
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.5.0
2
+ - Added ECS v8 support as an alias to the ECS v1 implementation
3
+
1
4
  ## 3.4.1
2
5
  - [DOC] Fixed typo in code sample [#54](https://github.com/logstash-plugins/logstash-input-udp/pull/54)
3
6
 
@@ -13,7 +13,7 @@ require "logstash/plugin_mixins/ecs_compatibility_support"
13
13
  #
14
14
  class LogStash::Inputs::Udp < LogStash::Inputs::Base
15
15
  # adds ecs_compatibility config which could be :disabled or :v1
16
- include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled,:v1)
16
+ include LogStash::PluginMixins::ECSCompatibilitySupport(:disabled, :v1, :v8 => :v1)
17
17
 
18
18
  config_name "udp"
19
19
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-udp'
4
- s.version = '3.4.1'
4
+ s.version = '3.5.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads 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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
 
25
25
  s.add_runtime_dependency 'logstash-codec-plain'
26
26
  s.add_runtime_dependency 'stud', '~> 0.0.22'
27
- s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.1'
27
+ s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.2'
28
28
  s.add_development_dependency 'logstash-codec-line'
29
29
  s.add_development_dependency 'logstash-devutils'
30
30
  end
@@ -72,30 +72,33 @@ describe LogStash::Inputs::Udp do
72
72
  end
73
73
  end
74
74
 
75
- shared_examples "use hostname field with ECS" do |ecs_compatibility, field_name|
76
- let(:config) { { "port" => port, "workers" => 1, "ecs_compatibility" => ecs_compatibility} }
77
- let(:localhost) { "127.0.0.1" }
78
- let(:client) { LogStash::Inputs::Test::UDPClient.new(port, localhost) }
75
+ shared_examples "respects ECS compatibility setting host metadata" do |ecs_compatibility, field_name|
76
+ context "when ecs_compatibility is `#{ecs_compatibility}`" do
77
+ let(:config) { { "port" => port, "workers" => 1, "ecs_compatibility" => ecs_compatibility} }
78
+ let(:localhost) { "127.0.0.1" }
79
+ let(:client) { LogStash::Inputs::Test::UDPClient.new(port, localhost) }
79
80
 
80
- let(:events) do
81
- helper.input(subject, 1) do
82
- client.send("line1")
81
+ let(:events) do
82
+ helper.input(subject, 1) do
83
+ client.send("line1")
84
+ end
83
85
  end
84
- end
85
86
 
86
- before(:each) do
87
- subject.register
88
- end
87
+ before(:each) do
88
+ subject.register
89
+ end
89
90
 
90
- it "should receive event with source_ip_fieldname as '#{field_name}' when ecs #{ecs_compatibility}" do
91
- expect(events.size).to be(1)
92
- message = events.last
93
- expect(message.get(field_name)).to eq(client.host)
91
+ it "produces event with source_ip_fieldname as '#{field_name}'" do
92
+ expect(events.size).to be(1)
93
+ message = events.last
94
+ expect(message.get(field_name)).to eq(client.host)
95
+ end
94
96
  end
95
97
  end
96
98
 
97
- it_behaves_like "use hostname field with ECS", :disabled, "host"
98
- it_behaves_like "use hostname field with ECS", :v1, "[host][ip]"
99
+ it_behaves_like "respects ECS compatibility setting host metadata", :disabled, "host"
100
+ it_behaves_like "respects ECS compatibility setting host metadata", :v1, "[host][ip]"
101
+ it_behaves_like "respects ECS compatibility setting host metadata", :v8, "[host][ip]"
99
102
 
100
103
 
101
104
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-udp
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-26 00:00:00.000000000 Z
11
+ date: 2021-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ dependencies:
63
63
  requirements:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
- version: '1.1'
66
+ version: '1.2'
67
67
  name: logstash-mixin-ecs_compatibility_support
68
68
  prerelease: false
69
69
  type: :runtime
@@ -71,7 +71,7 @@ dependencies:
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.1'
74
+ version: '1.2'
75
75
  - !ruby/object:Gem::Dependency
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubyforge_project:
145
- rubygems_version: 2.6.13
144
+ rubygems_version: 3.1.6
146
145
  signing_key:
147
146
  specification_version: 4
148
147
  summary: Reads events over UDP