jls-grok 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/grok.gemspec +1 -1
- data/test/general/captures_test.rb +12 -0
- metadata +67 -63
data/grok.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
#svnrev = %x{svn info}.split("\n").grep(/Revision:/).first.split(" ").last.to_i
|
40
40
|
spec.name = "jls-grok"
|
41
|
-
spec.version = "0.4.
|
41
|
+
spec.version = "0.4.3"
|
42
42
|
|
43
43
|
spec.summary = "grok bindings for ruby"
|
44
44
|
spec.description = "Grok ruby bindings - pattern match/extraction tool"
|
@@ -90,4 +90,16 @@ class GrokPatternCapturingTests < Test::Unit::TestCase
|
|
90
90
|
@grok.compile("%{foo}")
|
91
91
|
end
|
92
92
|
end
|
93
|
+
|
94
|
+
def test_valid_capture_subnames
|
95
|
+
name = "foo"
|
96
|
+
@grok.add_pattern(name, "\\w+")
|
97
|
+
subname = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_abc:def"
|
98
|
+
@grok.compile("%{#{name}:#{subname}}")
|
99
|
+
match = @grok.match("hello")
|
100
|
+
assert_not_equal(false, match)
|
101
|
+
assert_equal(1, match.captures.length)
|
102
|
+
assert_equal(1, match.captures["#{name}:#{subname}"].length)
|
103
|
+
assert_equal("hello", match.captures["#{name}:#{subname}"][0])
|
104
|
+
end
|
93
105
|
end
|
metadata
CHANGED
@@ -1,42 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jls-grok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 9
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.4.
|
7
|
+
- 0
|
8
|
+
- 4
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
|
13
|
-
|
13
|
+
- Jordan Sissel
|
14
|
+
- Pete Fritchman
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-02-
|
19
|
+
date: 2011-02-23 00:00:00 -08:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: ffi
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 1
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
- 6
|
34
|
+
- 3
|
35
|
+
version: 0.6.3
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
36
38
|
description: Grok ruby bindings - pattern match/extraction tool
|
37
39
|
email:
|
38
|
-
|
39
|
-
|
40
|
+
- jls@semicomplete.com
|
41
|
+
- petef@databits.net
|
40
42
|
executables: []
|
41
43
|
|
42
44
|
extensions: []
|
@@ -44,32 +46,32 @@ extensions: []
|
|
44
46
|
extra_rdoc_files: []
|
45
47
|
|
46
48
|
files:
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
49
|
+
- INSTALL
|
50
|
+
- Rakefile
|
51
|
+
- examples/grok-web.rb
|
52
|
+
- examples/pattern-discovery.rb
|
53
|
+
- examples/test.rb
|
54
|
+
- grok.gemspec
|
55
|
+
- lib/grok.rb
|
56
|
+
- lib/grok/match.rb
|
57
|
+
- lib/grok/pile.rb
|
58
|
+
- test/Makefile
|
59
|
+
- test/alltests.rb
|
60
|
+
- test/general/basic_test.rb
|
61
|
+
- test/general/captures_test.rb
|
62
|
+
- test/patterns/day.rb
|
63
|
+
- test/patterns/host.rb
|
64
|
+
- test/patterns/ip.input
|
65
|
+
- test/patterns/ip.rb
|
66
|
+
- test/patterns/iso8601.rb
|
67
|
+
- test/patterns/month.rb
|
68
|
+
- test/patterns/number.rb
|
69
|
+
- test/patterns/path.rb
|
70
|
+
- test/patterns/prog.rb
|
71
|
+
- test/patterns/quotedstring.rb
|
72
|
+
- test/patterns/uri.rb
|
73
|
+
- test/run.sh
|
74
|
+
- test/speedtest.rb
|
73
75
|
has_rdoc: true
|
74
76
|
homepage: http://code.google.com/p/semicomplete/wiki/Grok
|
75
77
|
licenses: []
|
@@ -78,27 +80,29 @@ post_install_message:
|
|
78
80
|
rdoc_options: []
|
79
81
|
|
80
82
|
require_paths:
|
81
|
-
|
83
|
+
- lib
|
82
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
85
|
none: false
|
84
86
|
requirements:
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
90
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
94
|
none: false
|
92
95
|
requirements:
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
98
102
|
requirements: []
|
99
103
|
|
100
104
|
rubyforge_project:
|
101
|
-
rubygems_version: 1.
|
105
|
+
rubygems_version: 1.5.1
|
102
106
|
signing_key:
|
103
107
|
specification_version: 3
|
104
108
|
summary: grok bindings for ruby
|