logstash-filter-ruby 2.0.5 → 3.0.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
  SHA1:
3
- metadata.gz: 8241be275746107a169984da56b9a1b4fecae5a2
4
- data.tar.gz: 7b03256bb4e566d5b1745a561801f80b1e819744
3
+ metadata.gz: 9895d2fc2f540af9d9f91726183a77b4c16004f8
4
+ data.tar.gz: cd1fc5f15c4005b1ec2475f0e2037525a526b192
5
5
  SHA512:
6
- metadata.gz: 7d5b6757b4a1d26e2268585f0e8482867606e364a1f1e13347606b2817b257b508ad8e2ebec23e31d9eb99e53e9a213e1d29e5d95e0780f9d75d3942bb1c7ebf
7
- data.tar.gz: a13df39a318f30df73fe7a33421383b0273999c648c1116f37a591276a26922f4ccf2501612a94ef1046315487f71eb45bc4e847735c73af8ca2e947af5a1536
6
+ metadata.gz: 018417c3870e56815069a18cee75f76fe441fa8fce243539df061250e101bbd1143a6b07da903c05a6491ccada11be8c185f2e9f26815a9e598c569a951fe5d5
7
+ data.tar.gz: 9eb2d7941cc8bc487b5622921aaf54e35b89447d3d56448b5cc3e3659ab1bc7e089e4168214c4996834c94a406cc09d44d59efbbc981aac618a80c6d376a4f30
@@ -1,3 +1,5 @@
1
+ ## 3.0.0
2
+ - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
1
3
  # 2.0.5
2
4
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
5
  # 2.0.4
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
3
+ # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Build
4
- Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-ruby-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-ruby-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-ruby.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-ruby)
5
4
 
6
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
7
6
 
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
56
55
  ```
57
56
  - Install plugin
58
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
59
62
  bin/plugin install --no-verify
63
+
60
64
  ```
61
65
  - Run Logstash with your plugin
62
66
  ```sh
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
74
78
  ```
75
79
  - Install the plugin from the Logstash home
76
80
  ```sh
77
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
81
+ # Logstash 2.3 and higher
82
+ bin/logstash-plugin install --no-verify
83
+
84
+ # Prior to Logstash 2.3
85
+ bin/plugin install --no-verify
86
+
78
87
  ```
79
88
  - Start Logstash and proceed to test the plugin
80
89
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-ruby'
4
- s.version = '2.0.5'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Filter for executing ruby code on the event"
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"
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"
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
10
  s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
24
  s.add_runtime_dependency 'logstash-filter-date'
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -20,7 +20,7 @@ describe LogStash::Filters::Ruby do
20
20
  }
21
21
  ruby {
22
22
  init => "require 'json'"
23
- code => "event['pretty'] = JSON.pretty_generate(event.to_hash)"
23
+ code => "event.set('pretty', JSON.pretty_generate(event.to_hash))"
24
24
  }
25
25
  }
26
26
  CONFIG
@@ -28,9 +28,9 @@ describe LogStash::Filters::Ruby do
28
28
  sample("message" => "hello world", "mydate" => "2014-09-23T00:00:00-0800") do
29
29
  # json is rendered in pretty json since the JSON.pretty_generate created json from the event hash
30
30
  # pretty json contains \n
31
- insist { subject["pretty"].count("\n") } == 5
31
+ insist { subject.get("pretty").count("\n") } == 5
32
32
  # usage of JSON.parse here is to avoid parser-specific order assertions
33
- insist { JSON.parse(subject["pretty"]) } == JSON.parse("{\n \"message\": \"hello world\",\n \"mydate\": \"2014-09-23T00:00:00-0800\",\n \"@version\": \"1\",\n \"@timestamp\": \"2014-09-23T08:00:00.000Z\"\n}")
33
+ insist { JSON.parse(subject.get("pretty")) } == JSON.parse("{\n \"message\": \"hello world\",\n \"mydate\": \"2014-09-23T00:00:00-0800\",\n \"@version\": \"1\",\n \"@timestamp\": \"2014-09-23T08:00:00.000Z\"\n}")
34
34
  end
35
35
  end
36
36
 
@@ -47,7 +47,7 @@ describe LogStash::Filters::Ruby do
47
47
  }
48
48
  ruby {
49
49
  init => "require 'json'"
50
- code => "event['pretty'] = JSON.pretty_generate(event)"
50
+ code => "event.set('pretty', JSON.pretty_generate(event))"
51
51
  }
52
52
  }
53
53
  CONFIG
@@ -55,9 +55,9 @@ describe LogStash::Filters::Ruby do
55
55
  sample("message" => "hello world", "mydate" => "2014-09-23T00:00:00-0800") do
56
56
  # if this eventually breaks because we removed the custom to_json and/or added pretty support to JrJackson then all is good :)
57
57
  # non-pretty json does not contain \n
58
- insist { subject["pretty"].count("\n") } == 0
58
+ insist { subject.get("pretty").count("\n") } == 0
59
59
  # usage of JSON.parse here is to avoid parser-specific order assertions
60
- insist { JSON.parse(subject["pretty"]) } == JSON.parse("{\"message\":\"hello world\",\"mydate\":\"2014-09-23T00:00:00-0800\",\"@version\":\"1\",\"@timestamp\":\"2014-09-23T08:00:00.000Z\"}")
60
+ insist { JSON.parse(subject.get("pretty")) } == JSON.parse("{\"message\":\"hello world\",\"mydate\":\"2014-09-23T00:00:00-0800\",\"@version\":\"1\",\"@timestamp\":\"2014-09-23T08:00:00.000Z\"}")
61
61
  end
62
62
  end
63
63
 
@@ -80,8 +80,8 @@ describe LogStash::Filters::Ruby do
80
80
  CONFIG
81
81
 
82
82
  sample("message" => "hello world", "mydate" => "2014-09-23T00:00:00-0800") do
83
- insist { subject["mydate"] } == "2014-09-23T00:00:00-0800"
84
- insist { subject["tags"] } == ["_rubyexception"]
83
+ insist { subject.get("mydate") } == "2014-09-23T00:00:00-0800"
84
+ insist { subject.get("tags") } == ["_rubyexception"]
85
85
  end
86
86
  end
87
87
 
metadata CHANGED
@@ -1,58 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: '1.0'
19
- name: logstash-core-plugin-api
20
- prerelease: false
19
+ version: '2.0'
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
+ name: logstash-filter-date
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
- name: logstash-filter-date
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
+ name: logstash-devutils
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - ">="
45
46
  - !ruby/object:Gem::Version
46
47
  version: '0'
47
- name: logstash-devutils
48
- prerelease: false
49
48
  type: :development
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- 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
55
+ description: This gem is a Logstash plugin required to be installed on top of the
56
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
57
+ gem is not a stand-alone program
56
58
  email: info@elastic.co
57
59
  executables: []
58
60
  extensions: []
@@ -73,7 +75,7 @@ licenses:
73
75
  metadata:
74
76
  logstash_plugin: 'true'
75
77
  logstash_group: filter
76
- post_install_message:
78
+ post_install_message:
77
79
  rdoc_options: []
78
80
  require_paths:
79
81
  - lib
@@ -88,9 +90,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
90
  - !ruby/object:Gem::Version
89
91
  version: '0'
90
92
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.4.8
93
- signing_key:
93
+ rubyforge_project:
94
+ rubygems_version: 2.5.1
95
+ signing_key:
94
96
  specification_version: 4
95
97
  summary: Filter for executing ruby code on the event
96
98
  test_files: