logstash-filter-elasticsearchslowlog 0.1.0 → 0.2.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
  SHA256:
3
- metadata.gz: fb0e1037440cf9d6b2db6dc90728e4e627bac26f466ef83943c14a8851cc30a3
4
- data.tar.gz: cc41cdd170f761773c804c0b2125a9bfe7cf24ab2a78f8bc45f8ea93454a85d7
3
+ metadata.gz: a5fe49ff31d29eef9189b0250fac8293acec2990c98c7b1d7f692b97dae82263
4
+ data.tar.gz: c6748ce4fed514f1b77d020bee5eaaee852ae62098679a44b66e05725252c561
5
5
  SHA512:
6
- metadata.gz: 446ee3e16ee320630352c2205db4ebf43fdf1cd2f231b14a8d2a5a38ae8934ffdf2e0f22df9da06a5b6a3a84960cfc8ef0cb0ba50746a88f989aef42e2c59d78
7
- data.tar.gz: f6dd7c9bce4342e5009e4e5b20d23698278376598df474292ca1999c4f32c5360db01b484c9122b4b4f17eb5ec96c101e586a1b68fc17fe7926bf8a50600e9bd
6
+ metadata.gz: 185bb71d2bb3d325b788c39460f3dbc2918abdedf72f88c7b895cf0c76f79c22673518b4a784f1565dcfa91a4b2b8b8f84f288a84768f00476f8ed60f89a4307
7
+ data.tar.gz: 3fb307a3dc87b55370d2b7cce8fffda29004dda7f0aa7813da17c2173132266db262dafdc5ceb5ce28ea175fdbd04d6de95d555b50c8fe35928907c6412fe5e3
@@ -30,7 +30,7 @@ class LogStash::Filters::Elasticsearchslowlog < LogStash::Filters::Base
30
30
  message = event.get(@source)
31
31
  if message
32
32
  if matches = message.match(SLOWLOG_REGEX)
33
- captures = matches.names.zip(matches.captures).to_h
33
+ captures = Hash[matches.names.zip(matches.captures)]
34
34
  captures.each do |key, value|
35
35
  next if key == 'key_values'
36
36
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'logstash-filter-elasticsearchslowlog'
5
- s.version = '0.1.0'
5
+ s.version = '0.2.0'
6
6
  s.licenses = ['Apache-2.0']
7
7
  s.summary = 'elasticsearch slowlog parser'
8
8
  s.description = 'elasticsearch slowlog parser'
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
 
22
22
  # Gem dependencies
23
23
  s.add_runtime_dependency "deepsort", "~> 0.4"
24
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 1"
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -32,8 +32,8 @@ describe LogStash::Filters::Elasticsearchslowlog do
32
32
  end
33
33
  end
34
34
 
35
- messages = IO.read(File.join(__dir__, 'fixture_valid.txt')).split("\n")
36
- source_normalized = IO.read(File.join(__dir__, 'fixture_source_normalized.txt')).split("\n")
35
+ messages = IO.read(File.join(File.dirname(__FILE__), 'fixture_valid.txt')).split("\n")
36
+ source_normalized = IO.read(File.join(File.dirname(__FILE__), 'fixture_source_normalized.txt')).split("\n")
37
37
  messages.each_with_index do |message, i|
38
38
  describe "fixtures_valid #{i}" do
39
39
  sample('message' => message) do
@@ -57,7 +57,7 @@ describe LogStash::Filters::Elasticsearchslowlog do
57
57
  end
58
58
  end
59
59
 
60
- invalid_messages = IO.read(File.join(__dir__, 'fixture_invalid.txt')).split("\n")
60
+ invalid_messages = IO.read(File.join(File.dirname(__FILE__), 'fixture_invalid.txt')).split("\n")
61
61
  invalid_messages.each_with_index do |message, i|
62
62
  describe "fixtures_invalid #{i}" do
63
63
  sample('message' => message) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-elasticsearchslowlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anantha Kumaran
@@ -29,7 +29,7 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '2.0'
32
+ version: '1'
33
33
  name: logstash-core-plugin-api
34
34
  prerelease: false
35
35
  type: :runtime
@@ -37,7 +37,7 @@ dependencies:
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
@@ -89,7 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubygems_version: 3.0.3
92
+ rubyforge_project:
93
+ rubygems_version: 2.7.8
93
94
  signing_key:
94
95
  specification_version: 4
95
96
  summary: elasticsearch slowlog parser