logstash-filter-uuid 2.0.5 → 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: 1325cf8661ee156ce915cefd18ccf2c8ccaaa44f
4
- data.tar.gz: e0d7b04ec762c48c7153fdfffbbac05f7abb54a5
3
+ metadata.gz: ba191207868bdfc8d92b90b34213dcc58616533d
4
+ data.tar.gz: c6dbdedfe18c249a3608624833fbefc7dc050158
5
5
  SHA512:
6
- metadata.gz: a7cddf3dac4c0aa52525ba1717b524ae5d7cff1c39c9013d03ba2d2da33ba240634e833917bd2b6da0de023ed4204c7d33567e8bad2670bf43006968d45969dd
7
- data.tar.gz: 9c50fea73861f1520598d76a52beeebc0a9fdcecf9f53b98fda0044268d66749e14243b377ecb0f075eb2d73a99e0332a0e0d0a319cd6ac227e1bea5cb0df52f
6
+ metadata.gz: 42b1f100fd520eda11bf79c6fe9cb6f21c914f87ade53a5f56d64e415bca83bac9de334f35cfe5f925d413bbac5a6a689c741c9190400f1b3582071c29d85c20
7
+ data.tar.gz: 3f4d6c726639af8e05ed30cf2f6d5097fb888e35c86cd4185f64272da3ddba23be2ed70ed2cd6992c9c85e6f9c6ba39bb2aa37f448633e6f5a2eea40d418fc7c
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.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-uuid-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-uuid-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-uuid.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-uuid)
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
 
@@ -47,9 +47,9 @@ class LogStash::Filters::Uuid < LogStash::Filters::Base
47
47
  # only UTF8 strings can be passed to a LogStash::Event
48
48
  # we need to reencode it here
49
49
  if overwrite
50
- event[target] = SecureRandom.uuid.force_encoding(Encoding::UTF_8)
51
- else
52
- event[target] ||= SecureRandom.uuid.force_encoding(Encoding::UTF_8)
50
+ event.set(target, SecureRandom.uuid.force_encoding(Encoding::UTF_8))
51
+ elsif event.get(target).nil?
52
+ event.set(target, SecureRandom.uuid.force_encoding(Encoding::UTF_8))
53
53
  end
54
54
 
55
55
  filter_matched(event)
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-uuid'
4
- s.version = '2.0.5'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The uuid filter allows you to add a UUID field to messages."
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,10 +18,9 @@ describe LogStash::Filters::Uuid do
18
18
  end
19
19
 
20
20
  describe "generation" do
21
-
22
21
  it "should generate an uuid field" do
23
22
  subject.filter(event)
24
- expect(event[target]).not_to be_nil
23
+ expect(event.get(target)).not_to be_nil
25
24
  end
26
25
 
27
26
  context "with overwrite" do
@@ -31,10 +30,8 @@ describe LogStash::Filters::Uuid do
31
30
 
32
31
  it "should override the target field" do
33
32
  subject.filter(event)
34
- expect(event[target]).not_to eq("foo")
33
+ expect(event.get(target)).not_to eq("foo")
35
34
  end
36
35
  end
37
-
38
36
  end
39
-
40
37
  end
metadata CHANGED
@@ -1,44 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-uuid
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-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: []
@@ -60,7 +62,7 @@ licenses:
60
62
  metadata:
61
63
  logstash_plugin: 'true'
62
64
  logstash_group: filter
63
- post_install_message:
65
+ post_install_message:
64
66
  rdoc_options: []
65
67
  require_paths:
66
68
  - lib
@@ -75,9 +77,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
77
  - !ruby/object:Gem::Version
76
78
  version: '0'
77
79
  requirements: []
78
- rubyforge_project:
79
- rubygems_version: 2.4.8
80
- signing_key:
80
+ rubyforge_project:
81
+ rubygems_version: 2.5.1
82
+ signing_key:
81
83
  specification_version: 4
82
84
  summary: The uuid filter allows you to add a UUID field to messages.
83
85
  test_files: