logstash-patterns-core 2.0.2 → 2.0.4

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: 2c8db4babadc512568ecb807f83d2d729d12a3d4
4
- data.tar.gz: 57e6bcdc22cb0845fabe2c0f047290483391a605
3
+ metadata.gz: 55bf54c1d6189841876b985ca38a5cadc944413b
4
+ data.tar.gz: 20a0e51f362e461ebefdfafccc661392a3f9e248
5
5
  SHA512:
6
- metadata.gz: 692401b3b09e9e081af84aaeafa35eed21015761c8b1ee1fd993d18599fa9c0f3808639436bcef47be48c2e8e32ec976415e52299804e4cdd7dc0ae099ee7942
7
- data.tar.gz: 09e7198f5522c0ef816464aadb9ed64fd3802b80a38cde5f820dec78266181934726b234f4809dbb90f92f2bcc5753c0acde8b0a466913d857afe52bb2195be6
6
+ metadata.gz: 0528b130b7bb83fcd5b4872326796e227a610010a5ca1b93be42cdae29076f552d021b893a82f0bdb7ad1a1f2296db8e14a40a81ccbecb4277ae3b520bd47c91
7
+ data.tar.gz: 8c449c43ee1ca8132207534c0f3ffa2d4aeaa64f92cc1bc784a1ae735c991841ad288d3224e5569a491a438629beefad32dc240a1bf40a2add3dda39320d045e
@@ -1,3 +1,7 @@
1
+ # 2.0.4
2
+ - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
+ # 2.0.3
4
+ - New dependency requirements for logstash-core for the 5.0 release
1
5
  ## 2.0.0
2
6
  - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
7
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Logstash Plugin
2
2
 
3
+ [![Build Status](http://build-eu-00.elastic.co/view/LS%20Other/job/logstash_patterns_core_commit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Other/job/logstash_patterns_core_commit/)
4
+
3
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
6
 
5
7
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
@@ -83,4 +85,4 @@ Programming is not a required skill. Whatever you've seen about open source and
83
85
 
84
86
  It is more important to the community that you are able to contribute.
85
87
 
86
- For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
88
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-patterns-core'
4
- s.version = '2.0.2'
4
+ s.version = '2.0.4'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Patterns to be used in logstash"
7
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"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  s.add_development_dependency 'logstash-filter-grok'
@@ -40,7 +40,7 @@ URIPROTO [A-Za-z]+(\+[A-Za-z+]+)?
40
40
  URIHOST %{IPORHOST}(?::%{POSINT:port})?
41
41
  # uripath comes loosely from RFC1738, but mostly from what Firefox
42
42
  # doesn't turn into %XX
43
- URIPATH (?:/[A-Za-z0-9$.+!*'(){},~:;=@#%_\-]*)+
43
+ URIPATH (?:/[A-Za-z0-9$.+!*'(){},~:;=@#%&_\-]*)+
44
44
  #URIPARAM \?(?:[A-Za-z0-9]+(?:=(?:[^&]*))?(?:&(?:[A-Za-z0-9]+(?:=(?:[^&]*))?)?)*)?
45
45
  URIPARAM \?[A-Za-z0-9$.+!*'|(){},~@#%&/=:;_?\-\[\]<>]*
46
46
  URIPATHPARAM %{URIPATH}(?:%{URIPARAM})?
@@ -113,6 +113,62 @@ describe "UNIXPATH" do
113
113
  end
114
114
  end
115
115
 
116
+ describe "URIPATH" do
117
+ let(:pattern) { 'URIPATH' }
118
+
119
+ context "when matching valid URIs" do
120
+ context "and the URI is simple" do
121
+ let(:value) { '/foo' }
122
+
123
+ it "should match the path" do
124
+ expect(grok_match(pattern,value)).to pass
125
+ end
126
+ end
127
+
128
+ context "and the URI has a trailing slash" do
129
+ let(:value) { '/foo/' }
130
+
131
+ it "should match the path" do
132
+ expect(grok_match(pattern,value)).to pass
133
+ end
134
+ end
135
+
136
+ context "and the URI has multiple levels" do
137
+ let(:value) { '/foo/bar' }
138
+
139
+ it "should match the path" do
140
+ expect(grok_match(pattern,value)).to pass
141
+ end
142
+ end
143
+
144
+ context "and the URI has fancy characters" do
145
+ let(:value) { '/aA1$.+!*\'(){},~:;=@#%&|-' }
146
+
147
+ it "should match the path" do
148
+ expect(grok_match(pattern,value)).to pass
149
+ end
150
+ end
151
+ end
152
+
153
+ context "when matching invalid URIs" do
154
+ context "and the URI has no leading slash" do
155
+ let(:value) { 'foo' }
156
+
157
+ it "should not match the path" do
158
+ expect(grok_match(pattern,value)).not_to pass
159
+ end
160
+ end
161
+
162
+ context "and the URI has invalid characters" do
163
+ let(:value) { '/`' }
164
+
165
+ it "should not match the path" do
166
+ expect(grok_match(pattern,value)).not_to pass
167
+ end
168
+ end
169
+ end
170
+ end
171
+
116
172
  describe "IPV4" do
117
173
 
118
174
  let(:pattern) { 'IPV4' }
@@ -19,7 +19,7 @@ module GrokHelpers
19
19
  end
20
20
 
21
21
  def build_grok(label)
22
- grok = LogStash::Filters::Grok.new("match" => ["message", "%{#{label}}"])
22
+ grok = LogStash::Filters::Grok.new("match" => ["message", "\A%{#{label}}\z"])
23
23
  grok.register
24
24
  grok
25
25
  end
metadata CHANGED
@@ -1,39 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-patterns-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-14 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - '>='
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.0.0.beta2
19
- - - <
20
- - !ruby/object:Gem::Version
21
- version: 3.0.0
22
- name: logstash-core
18
+ version: '1.0'
19
+ name: logstash-core-plugin-api
23
20
  prerelease: false
24
21
  type: :runtime
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
28
- - !ruby/object:Gem::Version
29
- version: 2.0.0.beta2
30
- - - <
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: 3.0.0
26
+ version: '1.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
- - - '>='
30
+ - - ">="
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
39
33
  name: logstash-devutils
@@ -41,13 +35,13 @@ dependencies:
41
35
  type: :development
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - '>='
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
40
  version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
- - - '>='
44
+ - - ">="
51
45
  - !ruby/object:Gem::Version
52
46
  version: '0'
53
47
  name: logstash-filter-grok
@@ -55,7 +49,7 @@ dependencies:
55
49
  type: :development
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - '>='
52
+ - - ">="
59
53
  - !ruby/object:Gem::Version
60
54
  version: '0'
61
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
@@ -113,12 +107,12 @@ require_paths:
113
107
  - lib
114
108
  required_ruby_version: !ruby/object:Gem::Requirement
115
109
  requirements:
116
- - - '>='
110
+ - - ">="
117
111
  - !ruby/object:Gem::Version
118
112
  version: '0'
119
113
  required_rubygems_version: !ruby/object:Gem::Requirement
120
114
  requirements:
121
- - - '>='
115
+ - - ">="
122
116
  - !ruby/object:Gem::Version
123
117
  version: '0'
124
118
  requirements: []