logstash-filter-ruby 3.1.4 → 3.1.5

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: 271561a7f499fd9c88f66ab5e9996632fedad8b754f9736f8822733e5826c458
4
- data.tar.gz: b91749139896908ae0fd1d8dd7532a4edb2103828aaf2dba1e0756ae85a0ed56
3
+ metadata.gz: 7de3a6bf7e61fd3fa6ad6a94b74c32da6119784885394bdf4b4088d2a1866162
4
+ data.tar.gz: 8a8bb1a378dd185c7437aad8bc4eec0a39c298c3bc705f4def35547a7c0393ba
5
5
  SHA512:
6
- metadata.gz: f35bbb4dc35d24e2804fb0e443561e27fb59e4a5955dd3895bbf6341e5ef4343e78e5220b627e65d4cc9d2db63d185e10adad0374c219c1c2d0bfe16b97e2bd6
7
- data.tar.gz: dfcde101fc4f975c81e803bf4af90e77a7719932b01fe94d7953a501b1e34049d44107b2ca9860a66b596f1614387df7d6e1c8d1f0c27293338178ed626ae973
6
+ metadata.gz: 00c4d4eb1df6798760e45e55222a7b2f8a57afe48f8c746d415d3b254ed46979a8b0a0c285d69763cf6e590bb6ade3ac8b2a81baadbd5b6d86d0f5ad7f6aa3cd
7
+ data.tar.gz: 5231c5787f3d5ce28e947a11b54061b0e63aabb192eaa919f25db2d8c2ab4f1efbe9a5e80d2bfb31dc2fd65e2d17315cd86ecff0b91518dfbcce25adfd7be900
@@ -1,3 +1,6 @@
1
+ ## 3.1.5
2
+ - Fixed path based scripting not calling filter\_matched [#45](https://github.com/logstash-plugins/logstash-filter-ruby/issues/45)
3
+
1
4
  ## 3.1.4
2
5
  - fix return of multiple events when using file based scripts #41
3
6
 
@@ -96,6 +96,7 @@ class LogStash::Filters::Ruby < LogStash::Filters::Base
96
96
  def file_script(event)
97
97
  begin
98
98
  results = @script.execute(event)
99
+ filter_matched(event)
99
100
 
100
101
  self.class.check_result_events!(results)
101
102
  rescue => e
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-ruby'
4
- s.version = '3.1.4'
4
+ s.version = '3.1.5'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Executes arbitrary Ruby code"
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"
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
- s.add_runtime_dependency 'logstash-filter-date'
24
+ s.add_development_dependency 'logstash-filter-date'
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
27
27
 
@@ -136,6 +136,7 @@ describe LogStash::Filters::Ruby do
136
136
  end
137
137
 
138
138
  describe "filtering" do
139
+ let(:filter_params) { super.merge('add_field' => {'success' => 'yes' }) }
139
140
  before(:each) do
140
141
  filter.register
141
142
  filter.filter(incoming_event)
@@ -144,6 +145,10 @@ describe LogStash::Filters::Ruby do
144
145
  it "should filter data as expected" do
145
146
  expect(incoming_event.get('foo')).to eq(84)
146
147
  end
148
+
149
+ it "should apply filter_matched" do
150
+ expect(incoming_event.get('success')).to eq('yes')
151
+ end
147
152
  end
148
153
  end
149
154
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-16 00:00:00.000000000 Z
11
+ date: 2018-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +38,7 @@ dependencies:
38
38
  version: '0'
39
39
  name: logstash-filter-date
40
40
  prerelease: false
41
- type: :runtime
41
+ type: :development
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="