jls-grok 0.1.2824 → 0.1.2840
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.
- data/ext/Makefile +2 -2
- data/ext/mkmf.log +63 -3
- data/test/patterns/host.rb +30 -0
- data/test/run.sh +3 -0
- metadata +4 -3
- data/ext/Grok.so +0 -0
data/ext/Makefile
CHANGED
@@ -45,7 +45,7 @@ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
|
45
45
|
|
46
46
|
RUBY_EXTCONF_H =
|
47
47
|
CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags)
|
48
|
-
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I.
|
48
|
+
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../
|
49
49
|
DEFS =
|
50
50
|
CPPFLAGS =
|
51
51
|
CXXFLAGS = $(CFLAGS)
|
@@ -86,7 +86,7 @@ extout =
|
|
86
86
|
extout_prefix =
|
87
87
|
target_prefix =
|
88
88
|
LOCAL_LIBS =
|
89
|
-
LIBS = $(LIBRUBYARG_SHARED)
|
89
|
+
LIBS = $(LIBRUBYARG_SHARED) -lpthread -lrt -ldl -lcrypt -lm -lc
|
90
90
|
SRCS = ruby_grok.c ruby_grokmatch.c ruby_grokdiscover.c
|
91
91
|
OBJS = ruby_grok.o ruby_grokmatch.o ruby_grokdiscover.o
|
92
92
|
TARGET = Grok
|
data/ext/mkmf.log
CHANGED
@@ -21,6 +21,20 @@ checked program was:
|
|
21
21
|
find_header: checking for grok.h in /usr/local/include,../../... -------------------- yes
|
22
22
|
|
23
23
|
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
|
24
|
+
conftest.c:1:18: error: grok.h: No such file or directory
|
25
|
+
checked program was:
|
26
|
+
/* begin */
|
27
|
+
1: #include <grok.h>
|
28
|
+
/* end */
|
29
|
+
|
30
|
+
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC -I/usr/local/include conftest.c -o conftest.i"
|
31
|
+
conftest.c:1:18: error: grok.h: No such file or directory
|
32
|
+
checked program was:
|
33
|
+
/* begin */
|
34
|
+
1: #include <grok.h>
|
35
|
+
/* end */
|
36
|
+
|
37
|
+
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC -I../../ conftest.c -o conftest.i"
|
24
38
|
checked program was:
|
25
39
|
/* begin */
|
26
40
|
1: #include <grok.h>
|
@@ -28,9 +42,53 @@ checked program was:
|
|
28
42
|
|
29
43
|
--------------------
|
30
44
|
|
31
|
-
find_library: checking for grok_init() in -lgrok... --------------------
|
45
|
+
find_library: checking for grok_init() in -lgrok... -------------------- no
|
46
|
+
|
47
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
48
|
+
conftest.c: In function 't':
|
49
|
+
conftest.c:3: error: 'grok_init' undeclared (first use in this function)
|
50
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
51
|
+
conftest.c:3: error: for each function it appears in.)
|
52
|
+
checked program was:
|
53
|
+
/* begin */
|
54
|
+
1: /*top*/
|
55
|
+
2: int main() { return 0; }
|
56
|
+
3: int t() { void ((*volatile p)()); p = (void ((*)()))grok_init; return 0; }
|
57
|
+
/* end */
|
58
|
+
|
59
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
60
|
+
/usr/bin/ld: cannot find -lgrok
|
61
|
+
collect2: ld returned 1 exit status
|
62
|
+
checked program was:
|
63
|
+
/* begin */
|
64
|
+
1: /*top*/
|
65
|
+
2: int main() { return 0; }
|
66
|
+
3: int t() { grok_init(); return 0; }
|
67
|
+
/* end */
|
68
|
+
|
69
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L../ -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
70
|
+
conftest.c: In function 't':
|
71
|
+
conftest.c:3: error: 'grok_init' undeclared (first use in this function)
|
72
|
+
conftest.c:3: error: (Each undeclared identifier is reported only once
|
73
|
+
conftest.c:3: error: for each function it appears in.)
|
74
|
+
checked program was:
|
75
|
+
/* begin */
|
76
|
+
1: /*top*/
|
77
|
+
2: int main() { return 0; }
|
78
|
+
3: int t() { void ((*volatile p)()); p = (void ((*)()))grok_init; return 0; }
|
79
|
+
/* end */
|
80
|
+
|
81
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L../ -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
82
|
+
/usr/bin/ld: cannot find -lgrok
|
83
|
+
collect2: ld returned 1 exit status
|
84
|
+
checked program was:
|
85
|
+
/* begin */
|
86
|
+
1: /*top*/
|
87
|
+
2: int main() { return 0; }
|
88
|
+
3: int t() { grok_init(); return 0; }
|
89
|
+
/* end */
|
32
90
|
|
33
|
-
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
91
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L/usr/local/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
34
92
|
conftest.c: In function 't':
|
35
93
|
conftest.c:3: error: 'grok_init' undeclared (first use in this function)
|
36
94
|
conftest.c:3: error: (Each undeclared identifier is reported only once
|
@@ -42,7 +100,9 @@ checked program was:
|
|
42
100
|
3: int t() { void ((*volatile p)()); p = (void ((*)()))grok_init; return 0; }
|
43
101
|
/* end */
|
44
102
|
|
45
|
-
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
103
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -I../../ -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L/usr/local/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8-static -lgrok -lpthread -lrt -ldl -lcrypt -lm -lc"
|
104
|
+
/usr/bin/ld: cannot find -lgrok
|
105
|
+
collect2: ld returned 1 exit status
|
46
106
|
checked program was:
|
47
107
|
/* begin */
|
48
108
|
1: /*top*/
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'grok'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class HostPattternTest < Test::Unit::TestCase
|
5
|
+
def setup
|
6
|
+
@grok = Grok.new
|
7
|
+
path = "#{File.dirname(__FILE__)}/../../../patterns/base"
|
8
|
+
@grok.add_patterns_from_file(path)
|
9
|
+
@grok.compile("%{HOSTNAME}")
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_hosts
|
13
|
+
hosts = ["www.google.com", "foo-234.14.AAc5-2.foobar.net",
|
14
|
+
"192-455.a.b.c.d."]
|
15
|
+
hosts.each do |host|
|
16
|
+
match = @grok.match(host)
|
17
|
+
assert_not_equal(false, match, "Expected this to match: #{host}")
|
18
|
+
assert_equal(host, match.captures["HOSTNAME"][0])
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_hosts_in_string
|
23
|
+
@grok.compile("%{HOSTNAME =~ /\\./}")
|
24
|
+
host = "www.google.com"
|
25
|
+
line = "1 2 3 4 #{host} test"
|
26
|
+
match = @grok.match(line)
|
27
|
+
assert_not_equal(false, match, "Expected this to match: #{line}")
|
28
|
+
assert_equal(host, match.captures["HOSTNAME"][0])
|
29
|
+
end
|
30
|
+
end
|
data/test/run.sh
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jls-grok
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2840
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Sissel
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-04-
|
12
|
+
date: 2010-04-19 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -34,7 +34,6 @@ files:
|
|
34
34
|
- ext/ruby_grok.o
|
35
35
|
- ext/ruby_grokdiscover.c
|
36
36
|
- ext/ruby_grokdiscover.o
|
37
|
-
- ext/Grok.so
|
38
37
|
- ext/ruby_grokmatch.o
|
39
38
|
- test/general/basic_test.rb
|
40
39
|
- test/general/captures_test.rb
|
@@ -43,12 +42,14 @@ files:
|
|
43
42
|
- test/speedtest.rb
|
44
43
|
- test/patterns/quotedstring.rb
|
45
44
|
- test/patterns/day.rb
|
45
|
+
- test/patterns/host.rb
|
46
46
|
- test/patterns/number.rb
|
47
47
|
- test/patterns/ip.input
|
48
48
|
- test/patterns/ip.rb
|
49
49
|
- test/patterns/path.rb
|
50
50
|
- test/patterns/month.rb
|
51
51
|
- test/patterns/uri.rb
|
52
|
+
- test/run.sh
|
52
53
|
- lib/grok.rb
|
53
54
|
has_rdoc: true
|
54
55
|
homepage: http://code.google.com/p/semicomplete/wiki/Grok
|
data/ext/Grok.so
DELETED
Binary file
|