logstash-codec-json 2.1.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: 80dde972140ccaac4f985592f6e501c12ccf0ff1
4
- data.tar.gz: c35d05ba0b391046c99cd62b8bbbb53ec714cdb6
3
+ metadata.gz: a5409411bfff11a5738c3d730d90c2c46d094bf7
4
+ data.tar.gz: 2a0eea25a7c0294240d6956257a3d3dab6d463ae
5
5
  SHA512:
6
- metadata.gz: fc4ffcc0c81520317c1ab95f1c25ed032762d0858f63ec69b3110b6c448e6f6b1ed19aa3d637cfdcfa8b462b8d5a1ee061bf5e4cc58e8a6f019a8fa75920e767
7
- data.tar.gz: 7489eb2a616a0e97c52add00f463cda486750f42f3eba193bd31ea83cec7aa13e33e40af301396a3e9f1a5182a52341ff1d75d05adfa1ceaa8597d3b03deffcc
6
+ metadata.gz: 1415abcd7fd069b7281d4e283ca128e6bf3a4ba84e4d620c05aaa00fdeba50c6dd54739a5f13942dd25cd19b05b58ff874f884a217f94b042705d6c3e227ddfc
7
+ data.tar.gz: e26e699b3a5843fe29cec501e83a41f2668bae76a74017f352d1f8d183016f9588ba39bbb9bc7b7406dd2c40b779aabb24ea435f4caac969243f34fd91fee532
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.1.4
2
4
  - Made 'Falling back to plain-text' log message an 'info' level log. This was
3
5
  'error' for versions v2.1.0 through v2.1.3 (and was 'info' before that).
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
@@ -55,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
55
55
  ```
56
56
  - Install plugin
57
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
58
62
  bin/plugin install --no-verify
63
+
59
64
  ```
60
65
  - Run Logstash with your plugin
61
66
  ```sh
@@ -73,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
73
78
  ```
74
79
  - Install the plugin from the Logstash home
75
80
  ```sh
76
- 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
+
77
87
  ```
78
88
  - Start Logstash and proceed to test the plugin
79
89
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-json'
4
- s.version = '2.1.4'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This codec may be used to decode (via inputs) and encode (via outputs) full JSON 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" => "codec" }
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
@@ -16,9 +16,9 @@ describe LogStash::Codecs::JSON do
16
16
  data = {"foo" => "bar", "baz" => {"bah" => ["a","b","c"]}}
17
17
  subject.decode(LogStash::Json.dump(data)) do |event|
18
18
  insist { event.is_a? LogStash::Event }
19
- insist { event["foo"] } == data["foo"]
20
- insist { event["baz"] } == data["baz"]
21
- insist { event["bah"] } == data["bah"]
19
+ insist { event.get("foo") } == data["foo"]
20
+ insist { event.get("baz") } == data["baz"]
21
+ insist { event.get("bah") } == data["bah"]
22
22
  end
23
23
  end
24
24
 
@@ -47,8 +47,8 @@ describe LogStash::Codecs::JSON do
47
47
  subject.decode("something that isn't json") do |event|
48
48
  decoded = true
49
49
  insist { event.is_a?(LogStash::Event) }
50
- insist { event["message"] } == "something that isn't json"
51
- insist { event["tags"] }.include?("_jsonparsefailure")
50
+ insist { event.get("message") } == "something that isn't json"
51
+ insist { event.get("tags") }.include?("_jsonparsefailure")
52
52
  end
53
53
  insist { decoded } == true
54
54
  end
@@ -69,11 +69,11 @@ describe LogStash::Codecs::JSON do
69
69
  end
70
70
 
71
71
  it "should store the value in 'message'" do
72
- expect(event["message"]).to eql(value_json)
72
+ expect(event.get("message")).to eql(value_json)
73
73
  end
74
74
 
75
75
  it "should have the json parse failure tag" do
76
- expect(event["tags"]).to include("_jsonparsefailure")
76
+ expect(event.get("tags")).to include("_jsonparsefailure")
77
77
  end
78
78
  end
79
79
  end
@@ -119,7 +119,7 @@ describe LogStash::Codecs::JSON do
119
119
  subject.decode(blob) do |event|
120
120
  decoded = true
121
121
  insist { event.is_a?(LogStash::Event) }
122
- insist { event["message"].encoding.to_s } == "UTF-8"
122
+ insist { event.get("message").encoding.to_s } == "UTF-8"
123
123
  end
124
124
  insist { decoded } == true
125
125
  end
@@ -137,13 +137,13 @@ describe LogStash::Codecs::JSON do
137
137
 
138
138
  it "uses an array to store the tags" do
139
139
  subject.decode(message) do |event|
140
- expect(event['tags']).to be_a Array
140
+ expect(event.get('tags')).to be_a Array
141
141
  end
142
142
  end
143
143
 
144
144
  it "add a json parser failure tag" do
145
145
  subject.decode(message) do |event|
146
- expect(event['tags']).to include "_jsonparsefailure"
146
+ expect(event.get('tags')).to include "_jsonparsefailure"
147
147
  end
148
148
  end
149
149
  end
metadata CHANGED
@@ -1,44 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.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-04-11 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
14
  name: logstash-core-plugin-api
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
15
  requirement: !ruby/object:Gem::Requirement
21
16
  requirements:
22
- - - ~>
17
+ - - "~>"
23
18
  - !ruby/object:Gem::Version
24
- version: '1.0'
25
- prerelease: false
19
+ version: '2.0'
26
20
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: logstash-devutils
21
+ prerelease: false
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - "~>"
32
25
  - !ruby/object:Gem::Version
33
- version: '0'
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: logstash-devutils
34
29
  requirement: !ruby/object:Gem::Requirement
35
30
  requirements:
36
- - - '>='
31
+ - - ">="
37
32
  - !ruby/object:Gem::Version
38
33
  version: '0'
39
- prerelease: false
40
34
  type: :development
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
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
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,25 +61,26 @@ licenses:
59
61
  metadata:
60
62
  logstash_plugin: 'true'
61
63
  logstash_group: codec
62
- post_install_message:
64
+ post_install_message:
63
65
  rdoc_options: []
64
66
  require_paths:
65
67
  - lib
66
68
  required_ruby_version: !ruby/object:Gem::Requirement
67
69
  requirements:
68
- - - '>='
70
+ - - ">="
69
71
  - !ruby/object:Gem::Version
70
72
  version: '0'
71
73
  required_rubygems_version: !ruby/object:Gem::Requirement
72
74
  requirements:
73
- - - '>='
75
+ - - ">="
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 codec may be used to decode (via inputs) and encode (via outputs) full JSON messages
83
+ summary: This codec may be used to decode (via inputs) and encode (via outputs) full
84
+ JSON messages
82
85
  test_files:
83
86
  - spec/codecs/json_spec.rb