logstash-filter-clone 3.0.6 → 4.0.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
  SHA256:
3
- metadata.gz: e80f8ceb5e269a81734e52206c69149f1faa86c08c668bf017e12ed91da17128
4
- data.tar.gz: 3c75d867ceaa7723bc49aa6c5756bdd42aa5e18d6429d3dc09631ee4b32c9c79
3
+ metadata.gz: 047c1ddf2a3374d9e2bbe1191922564e7f9157eee8cf4ecd3e2fef4c99fe6eef
4
+ data.tar.gz: 9e2d9ca3326e42df4a292fb412dab7539dff7ada30e599688c67d80db9f90312
5
5
  SHA512:
6
- metadata.gz: 6d0b670e87d48b5588af9455f0d64f026040e6cc0dd29dcc8156ed8521e18356c4c4fc7d565e8bd54b826d5d4c5ef0596a6fb9d3d7ee295fd871e138db2e91f5
7
- data.tar.gz: e2a6fa57e05cca4a2838749cd7209a8d4a3f93f43bfd1cffa2c8f681ae358d0d9512330178561ddbc7cf59f4f843d8067046bc38b62b7f8e0ffb3dfeb666e982
6
+ metadata.gz: aa553ba1b4b1e111597a2bcc6c067b3d41727294ed6b6833727a515323f14636a19f9b603115a6176a346bd1924f827166df9e92d007478ffd29f018f299d7d4
7
+ data.tar.gz: 32d31a0c7ab4641575e2f826f37a54242efa02a25fddb24514acef5af82c426c9ddcceacdcf2655235724c31a99c7e483005010296af8c44864953eb381bcf9a
@@ -1,3 +1,6 @@
1
+ ## 4.0.0
2
+ - Make 'clones' a required option
3
+
1
4
  ## 3.0.6
2
5
  - Added a warning when 'clones' is empty since that results in a no-op https://github.com/logstash-plugins/logstash-filter-clone/issues/14
3
6
 
@@ -35,7 +35,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
35
35
  [cols="<,<,<",options="header",]
36
36
  |=======================================================================
37
37
  |Setting |Input type|Required
38
- | <<plugins-{type}s-{plugin}-clones>> |<<array,array>>|No
38
+ | <<plugins-{type}s-{plugin}-clones>> |<<array,array>>|Yes
39
39
  |=======================================================================
40
40
 
41
41
  Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
@@ -46,12 +46,14 @@ filter plugins.
46
46
  [id="plugins-{type}s-{plugin}-clones"]
47
47
  ===== `clones`
48
48
 
49
+ * This is a required setting.
49
50
  * Value type is <<array,array>>
50
- * Default value is `[]`
51
+ * There is no default value for this setting.
51
52
 
52
53
  A new clone will be created with the given type for each type in this list.
53
54
 
55
+ Note: setting an empty array will not create any clones. A warning message is logged.
54
56
 
55
57
 
56
58
  [id="plugins-{type}s-{plugin}-common-options"]
57
- include::{include_path}/{type}.asciidoc[]
59
+ include::{include_path}/{type}.asciidoc[]
@@ -13,7 +13,7 @@ class LogStash::Filters::Clone < LogStash::Filters::Base
13
13
  config_name "clone"
14
14
 
15
15
  # A new clone will be created with the given type for each type in this list.
16
- config :clones, :validate => :array, :default => []
16
+ config :clones, :validate => :array, :required => true
17
17
 
18
18
  public
19
19
  def register
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-clone'
4
- s.version = '3.0.6'
4
+ s.version = '4.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Duplicates events"
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"
@@ -81,16 +81,15 @@ describe LogStash::Filters::Clone do
81
81
  describe "#register" do
82
82
  context "when clones is an empty array" do
83
83
  subject { described_class.new("clones" => []) }
84
- it "should log a warning" do
84
+ it "logs a warning" do
85
85
  expect(subject.logger).to receive(:warn)
86
- subject.register
86
+ expect { subject.register }.to_not raise_error
87
87
  end
88
88
  end
89
- context "when clones is not empty" do
90
- subject { described_class.new("clones" => ["clone1", "clone2"]) }
91
- it "should not log a warning" do
92
- expect(subject.logger).to_not receive(:warn)
93
- subject.register
89
+ context "when clones is not set" do
90
+ subject { described_class.new }
91
+ it "raises an error" do
92
+ expect { subject.register }.to raise_error(ArgumentError)
94
93
  end
95
94
  end
96
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-clone
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2019-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement