logstash-filter-anonymize 2.0.4 → 3.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
  SHA1:
3
- metadata.gz: 57698c13e7632018c8f158bdf9fd0f6f905aec9f
4
- data.tar.gz: 614fcf2c303e3228bb5f65239f7740cd05b46a01
3
+ metadata.gz: b8b01cf3a5339369b7721f7a9286a181fca11810
4
+ data.tar.gz: 9ac3ebcba64d9db78b24b9ce18f06e5dbdcbbd8f
5
5
  SHA512:
6
- metadata.gz: 6dc3127a83b35163c5d7cfff60f049093a2a0067c1e7c433775756f09db60b3c774c19860ad0f731f82814a5fd6ab5f7e83f5b3f35f0e4beecf52122f476e748
7
- data.tar.gz: 2bb6c73958bc121f5f3cd3d48b55a0b460c5bbd9d0f352beed3fa6ebc46959150bafa2a32ffa7e8fea8fd41de0b705d338ba5497eac8be9eeef9447eb8c106a8
6
+ metadata.gz: 8b32f9319aa507d0540c3ca7943c6c349588e5c172a20c30fba72345226a3a90ed0e404dd56be2355a4f9ed5baa7a78aefec768f38a43af70d9fd66a99cf3d71
7
+ data.tar.gz: 26a8ce083d16aaab6f398c535d4e8322e720f1b3250f1c9b30ebc397226fa49684ff77377251c81991270214ee542914b43cc44323689cf2c833f43a2ba35e24
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-anonymize-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-anonymize-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-anonymize.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-anonymize)
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
 
@@ -38,10 +38,10 @@ class LogStash::Filters::Anonymize < LogStash::Filters::Base
38
38
 
39
39
  @fields.each do |field|
40
40
  next unless event.include?(field)
41
- if event[field].is_a?(Array)
42
- event[field] = event[field].collect { |v| anonymize(v) }
41
+ if event.get(field).is_a?(Array)
42
+ event.set(field, event.get(field).collect { |v| anonymize(v) })
43
43
  else
44
- event[field] = anonymize(event[field])
44
+ event.set(field, anonymize(event.get(field)))
45
45
  end
46
46
  end
47
47
  end # def filter
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-anonymize'
4
- s.version = '2.0.4'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Anonymize fields using by replacing values with a consistent hash"
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_runtime_dependency 'murmurhash3'
26
26
  s.add_development_dependency 'logstash-devutils'
@@ -19,7 +19,7 @@ describe LogStash::Filters::Anonymize do
19
19
  CONFIG
20
20
 
21
21
  sample("clientip" => "233.255.13.44") do
22
- insist { subject["clientip"] } == "233.255.13.0"
22
+ insist { subject.get("clientip") } == "233.255.13.0"
23
23
  end
24
24
  end
25
25
 
@@ -35,7 +35,7 @@ describe LogStash::Filters::Anonymize do
35
35
  CONFIG
36
36
 
37
37
  sample("clientip" => "123.52.122.33") do
38
- insist { subject["clientip"] } == 1541804874
38
+ insist { subject.get("clientip") } == 1541804874
39
39
  end
40
40
  end
41
41
 
@@ -53,7 +53,7 @@ describe LogStash::Filters::Anonymize do
53
53
  CONFIG
54
54
 
55
55
  sample("clientip" => "123.123.123.123") do
56
- insist { subject["clientip"] } == "fdc60acc4773dc5ac569ffb78fcb93c9630797f4"
56
+ insist { subject.get("clientip") } == "fdc60acc4773dc5ac569ffb78fcb93c9630797f4"
57
57
  end
58
58
  end
59
59
 
@@ -72,7 +72,7 @@ describe LogStash::Filters::Anonymize do
72
72
  #CONFIG
73
73
 
74
74
  #sample("clientip" => "123.123.123.123") do
75
- #insist { subject["clientip"] } == "5744bbcc4f64acb6a805b7fee3013a8958cc8782d3fb0fb318cec915"
75
+ #insist { subject.get("clientip") } == "5744bbcc4f64acb6a805b7fee3013a8958cc8782d3fb0fb318cec915"
76
76
  #end
77
77
  #end
78
78
 
@@ -90,7 +90,7 @@ describe LogStash::Filters::Anonymize do
90
90
  CONFIG
91
91
 
92
92
  sample("clientip" => "123.123.123.123") do
93
- insist { subject["clientip"] } == "345bec3eff242d53b568916c2610b3e393d885d6b96d643f38494fd74bf4a9ca"
93
+ insist { subject.get("clientip") } == "345bec3eff242d53b568916c2610b3e393d885d6b96d643f38494fd74bf4a9ca"
94
94
  end
95
95
  end
96
96
 
@@ -108,7 +108,7 @@ describe LogStash::Filters::Anonymize do
108
108
  CONFIG
109
109
 
110
110
  sample("clientip" => "123.123.123.123") do
111
- insist { subject["clientip"] } == "22d4c0e8c4fbcdc4887d2038fca7650f0e2e0e2457ff41c06eb2a980dded6749561c814fe182aff93e2538d18593947a"
111
+ insist { subject.get("clientip") } == "22d4c0e8c4fbcdc4887d2038fca7650f0e2e0e2457ff41c06eb2a980dded6749561c814fe182aff93e2538d18593947a"
112
112
  end
113
113
  end
114
114
 
@@ -126,7 +126,7 @@ describe LogStash::Filters::Anonymize do
126
126
  CONFIG
127
127
 
128
128
  sample("clientip" => "123.123.123.123") do
129
- insist { subject["clientip"] } == "11c19b326936c08d6c50a3c847d883e5a1362e6a64dd55201a25f2c1ac1b673f7d8bf15b8f112a4978276d573275e3b14166e17246f670c2a539401c5bfdace8"
129
+ insist { subject.get("clientip") } == "11c19b326936c08d6c50a3c847d883e5a1362e6a64dd55201a25f2c1ac1b673f7d8bf15b8f112a4978276d573275e3b14166e17246f670c2a539401c5bfdace8"
130
130
  end
131
131
  end
132
132
 
@@ -145,7 +145,7 @@ describe LogStash::Filters::Anonymize do
145
145
  #CONFIG
146
146
  #
147
147
  #sample("clientip" => "123.123.123.123") do
148
- #insist { subject["clientip"] } == "0845cb571ab3646e51a07bcabf05e33d"
148
+ #insist { subject.get("clientip") } == "0845cb571ab3646e51a07bcabf05e33d"
149
149
  #end
150
150
  #end
151
151
 
@@ -163,7 +163,7 @@ describe LogStash::Filters::Anonymize do
163
163
  CONFIG
164
164
 
165
165
  sample("clientip" => "123.123.123.123") do
166
- insist { subject["clientip"] } == "9336c879e305c9604a3843fc3e75948f"
166
+ insist { subject.get("clientip") } == "9336c879e305c9604a3843fc3e75948f"
167
167
  end
168
168
  end
169
169
 
@@ -181,7 +181,7 @@ describe LogStash::Filters::Anonymize do
181
181
  CONFIG
182
182
 
183
183
  sample("clientip" => [ "123.123.123.123", "223.223.223.223" ]) do
184
- insist { subject["clientip"]} == [ "9336c879e305c9604a3843fc3e75948f", "7a6c66b8d3f42a7d650e3354af508df3" ]
184
+ insist { subject.get("clientip")} == [ "9336c879e305c9604a3843fc3e75948f", "7a6c66b8d3f42a7d650e3354af508df3" ]
185
185
  end
186
186
  end
187
187
 
metadata CHANGED
@@ -1,58 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-anonymize
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: murmurhash3
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
- name: murmurhash3
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: Anonymize fields using by replacing values with a consistent hash
96
98
  test_files: