logstash-filter-checksum 2.0.4 → 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: ae3330c0ba4ff2aef19d55e1d51102f2bf8cd9b8
4
- data.tar.gz: 75865fdeac1b4e7970ba603573ff0f5cba500603
3
+ metadata.gz: 368d9c4796ac82d6285febfa6e71bd577994a41f
4
+ data.tar.gz: 8b0e20b33d8ff58c67a6e9006cb9b1066d3ca712
5
5
  SHA512:
6
- metadata.gz: 824a60ba57bf2d71a06f4b4269241d4fcd762f8855353c72111b823105e6698c96836968b9d4201268dbdce8eb35199d2d25df980beadfd107cb8a3706623575
7
- data.tar.gz: cc925cdd94be9f51685776121a9faab40508419cc17c7c68c33042942d1dd7cbb81b101a89e9cc2717f6a3cf95cbdfd0c45e92b7aed3660fee88a3fb8830cb99
6
+ metadata.gz: ffcea66989358386f28248c1738c8e6feb96c06792efec682e1220ecc06947a8b0122b21a97c2636c841dee4ec2c416ce4ad68acf890905b1981a472137e4ea3
7
+ data.tar.gz: a5a90613549b2cecd6fbf3889a28db9e039f12e6d04fb67c85d4c166edbca9d8435797d4e4d4def15d7bf3e2623138f46ad1b9a9b85fb80232ac0b90cf12e8d6
data/CHANGELOG.md CHANGED
@@ -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.4
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.3
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-checksum-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-checksum-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-checksum.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-checksum)
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
 
@@ -36,7 +36,7 @@ class LogStash::Filters::Checksum < LogStash::Filters::Base
36
36
 
37
37
  @keys.sort.each do |k|
38
38
  @logger.debug("Adding key to string", :current_key => k)
39
- to_checksum << "#{event[k]}"
39
+ to_checksum << "#{event.get(k)}"
40
40
  end
41
41
  @logger.debug("Final string built", :to_checksum => to_checksum)
42
42
 
@@ -45,6 +45,6 @@ class LogStash::Filters::Checksum < LogStash::Filters::Base
45
45
  digested_string = OpenSSL::Digest.hexdigest(@algorithm, to_checksum).force_encoding(Encoding::UTF_8)
46
46
 
47
47
  @logger.debug("Digested string", :digested_string => digested_string)
48
- event['logstash_checksum'] = digested_string
48
+ event.set('logstash_checksum', digested_string)
49
49
  end
50
50
  end # class LogStash::Filters::Checksum
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-checksum'
4
- s.version = '2.0.4'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This filter let's you create a checksum based on various parts of the logstash 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
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -18,8 +18,8 @@ describe LogStash::Filters::Checksum do
18
18
  CONFIG
19
19
 
20
20
  sample "test" => "foo bar" do
21
- insist { !subject["logstash_checksum"].nil? }
22
- insist { subject["logstash_checksum"] } == OpenSSL::Digest.hexdigest(alg, "foo bar")
21
+ insist { !subject.get("logstash_checksum").nil? }
22
+ insist { subject.get("logstash_checksum") } == OpenSSL::Digest.hexdigest(alg, "foo bar")
23
23
  end
24
24
  end
25
25
 
@@ -34,8 +34,8 @@ describe LogStash::Filters::Checksum do
34
34
  CONFIG
35
35
 
36
36
  sample "test1" => "foo", "test2" => "bar" do
37
- insist { !subject["logstash_checksum"].nil? }
38
- insist { subject["logstash_checksum"] } == OpenSSL::Digest.hexdigest(alg, "foobar")
37
+ insist { !subject.get("logstash_checksum").nil? }
38
+ insist { subject.get("logstash_checksum") } == OpenSSL::Digest.hexdigest(alg, "foobar")
39
39
  end
40
40
  end
41
41
  end
metadata CHANGED
@@ -1,44 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-checksum
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
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-devutils
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-devutils
34
- prerelease: false
35
34
  type: :development
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
- 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
41
+ description: This gem is a Logstash plugin required to be installed on top of the
42
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
43
+ gem is not a stand-alone program
42
44
  email: info@elastic.co
43
45
  executables: []
44
46
  extensions: []
@@ -59,7 +61,7 @@ licenses:
59
61
  metadata:
60
62
  logstash_plugin: 'true'
61
63
  logstash_group: filter
62
- post_install_message:
64
+ post_install_message:
63
65
  rdoc_options: []
64
66
  require_paths:
65
67
  - lib
@@ -74,10 +76,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
76
  - !ruby/object:Gem::Version
75
77
  version: '0'
76
78
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.4.8
79
- signing_key:
79
+ rubyforge_project:
80
+ rubygems_version: 2.5.1
81
+ signing_key:
80
82
  specification_version: 4
81
- summary: This filter let's you create a checksum based on various parts of the logstash event.
83
+ summary: This filter let's you create a checksum based on various parts of the logstash
84
+ event.
82
85
  test_files:
83
86
  - spec/filters/checksum_spec.rb