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.
Files changed (3) hide show
  1. data/grok.gemspec +1 -1
  2. data/test/general/captures_test.rb +12 -0
  3. 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.2"
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
- prerelease: false
4
+ hash: 9
5
+ prerelease:
5
6
  segments:
6
- - 0
7
- - 4
8
- - 2
9
- version: 0.4.2
7
+ - 0
8
+ - 4
9
+ - 3
10
+ version: 0.4.3
10
11
  platform: ruby
11
12
  authors:
12
- - Jordan Sissel
13
- - Pete Fritchman
13
+ - Jordan Sissel
14
+ - Pete Fritchman
14
15
  autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2011-02-20 00:00:00 -08:00
19
+ date: 2011-02-23 00:00:00 -08:00
19
20
  default_executable:
20
21
  dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: ffi
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- segments:
30
- - 0
31
- - 6
32
- - 3
33
- version: 0.6.3
34
- type: :runtime
35
- version_requirements: *id001
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
- - jls@semicomplete.com
39
- - petef@databits.net
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
- - INSTALL
48
- - Rakefile
49
- - examples/grok-web.rb
50
- - examples/pattern-discovery.rb
51
- - examples/test.rb
52
- - grok.gemspec
53
- - lib/grok.rb
54
- - lib/grok/match.rb
55
- - lib/grok/pile.rb
56
- - test/Makefile
57
- - test/alltests.rb
58
- - test/general/basic_test.rb
59
- - test/general/captures_test.rb
60
- - test/patterns/day.rb
61
- - test/patterns/host.rb
62
- - test/patterns/ip.input
63
- - test/patterns/ip.rb
64
- - test/patterns/iso8601.rb
65
- - test/patterns/month.rb
66
- - test/patterns/number.rb
67
- - test/patterns/path.rb
68
- - test/patterns/prog.rb
69
- - test/patterns/quotedstring.rb
70
- - test/patterns/uri.rb
71
- - test/run.sh
72
- - test/speedtest.rb
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
- - lib
83
+ - lib
82
84
  required_ruby_version: !ruby/object:Gem::Requirement
83
85
  none: false
84
86
  requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- version: "0"
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
- - !ruby/object:Gem::Version
95
- segments:
96
- - 0
97
- version: "0"
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.3.7
105
+ rubygems_version: 1.5.1
102
106
  signing_key:
103
107
  specification_version: 3
104
108
  summary: grok bindings for ruby