rroonga 1.0.0 → 1.0.1
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/NEWS.ja.rdoc +11 -0
- data/NEWS.rdoc +11 -0
- data/README.ja.rdoc +1 -0
- data/README.rdoc +1 -0
- data/ext/groonga/mkmf.log +99 -0
- data/ext/groonga/rb-grn-array.c +1 -1
- data/ext/groonga/rb-grn-hash.c +1 -1
- data/ext/groonga/rb-grn-patricia-trie.c +1 -1
- data/ext/groonga/rb-grn.h +1 -1
- data/test/test-patricia-trie.rb +10 -0
- metadata +25 -102
- data/test-unit-notify/Rakefile +0 -47
- data/test-unit-notify/lib/test/unit/notify.rb +0 -104
- data/test-unit/COPYING +0 -56
- data/test-unit/GPL +0 -340
- data/test-unit/PSFL +0 -271
- data/test-unit/Rakefile +0 -53
- data/test-unit/TODO +0 -5
- data/test-unit/bin/testrb +0 -5
- data/test-unit/html/bar.svg +0 -153
- data/test-unit/html/developer.svg +0 -469
- data/test-unit/html/favicon.ico +0 -0
- data/test-unit/html/favicon.svg +0 -82
- data/test-unit/html/heading-mark.svg +0 -393
- data/test-unit/html/index.html +0 -247
- data/test-unit/html/index.html.ja +0 -270
- data/test-unit/html/install.svg +0 -636
- data/test-unit/html/logo.svg +0 -483
- data/test-unit/html/test-unit.css +0 -339
- data/test-unit/html/tutorial.svg +0 -559
- data/test-unit/lib/test/unit.rb +0 -328
- data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
- data/test-unit/lib/test/unit/assertions.rb +0 -1334
- data/test-unit/lib/test/unit/attribute.rb +0 -125
- data/test-unit/lib/test/unit/autorunner.rb +0 -363
- data/test-unit/lib/test/unit/collector.rb +0 -36
- data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
- data/test-unit/lib/test/unit/collector/dir.rb +0 -108
- data/test-unit/lib/test/unit/collector/load.rb +0 -144
- data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
- data/test-unit/lib/test/unit/color-scheme.rb +0 -106
- data/test-unit/lib/test/unit/color.rb +0 -96
- data/test-unit/lib/test/unit/diff.rb +0 -740
- data/test-unit/lib/test/unit/error.rb +0 -130
- data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
- data/test-unit/lib/test/unit/failure.rb +0 -136
- data/test-unit/lib/test/unit/fixture.rb +0 -176
- data/test-unit/lib/test/unit/notification.rb +0 -129
- data/test-unit/lib/test/unit/omission.rb +0 -191
- data/test-unit/lib/test/unit/pending.rb +0 -150
- data/test-unit/lib/test/unit/priority.rb +0 -180
- data/test-unit/lib/test/unit/runner/console.rb +0 -52
- data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
- data/test-unit/lib/test/unit/runner/tap.rb +0 -8
- data/test-unit/lib/test/unit/testcase.rb +0 -483
- data/test-unit/lib/test/unit/testresult.rb +0 -121
- data/test-unit/lib/test/unit/testsuite.rb +0 -110
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -430
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
- data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -82
- data/test-unit/lib/test/unit/ui/testrunner.rb +0 -53
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
- data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -42
- data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
- data/test-unit/lib/test/unit/util/observable.rb +0 -90
- data/test-unit/lib/test/unit/util/output.rb +0 -31
- data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
- data/test-unit/lib/test/unit/version.rb +0 -7
- data/test-unit/sample/adder.rb +0 -13
- data/test-unit/sample/subtracter.rb +0 -12
- data/test-unit/sample/test_adder.rb +0 -20
- data/test-unit/sample/test_subtracter.rb +0 -20
- data/test-unit/sample/test_user.rb +0 -23
- data/test-unit/test/collector/test-descendant.rb +0 -133
- data/test-unit/test/collector/test-load.rb +0 -442
- data/test-unit/test/collector/test_dir.rb +0 -406
- data/test-unit/test/collector/test_objectspace.rb +0 -100
- data/test-unit/test/run-test.rb +0 -15
- data/test-unit/test/test-attribute.rb +0 -86
- data/test-unit/test/test-color-scheme.rb +0 -69
- data/test-unit/test/test-color.rb +0 -47
- data/test-unit/test/test-diff.rb +0 -518
- data/test-unit/test/test-emacs-runner.rb +0 -60
- data/test-unit/test/test-fixture.rb +0 -287
- data/test-unit/test/test-notification.rb +0 -33
- data/test-unit/test/test-omission.rb +0 -81
- data/test-unit/test/test-pending.rb +0 -70
- data/test-unit/test/test-priority.rb +0 -119
- data/test-unit/test/test-testcase.rb +0 -544
- data/test-unit/test/test_assertions.rb +0 -1197
- data/test-unit/test/test_error.rb +0 -26
- data/test-unit/test/test_failure.rb +0 -33
- data/test-unit/test/test_testresult.rb +0 -113
- data/test-unit/test/test_testsuite.rb +0 -129
- data/test-unit/test/testunit-test-util.rb +0 -14
- data/test-unit/test/ui/test_tap.rb +0 -33
- data/test-unit/test/ui/test_testrunmediator.rb +0 -20
- data/test-unit/test/util/test-method-owner-finder.rb +0 -38
- data/test-unit/test/util/test-output.rb +0 -11
- data/test-unit/test/util/test_backtracefilter.rb +0 -41
- data/test-unit/test/util/test_observable.rb +0 -102
- data/test-unit/test/util/test_procwrapper.rb +0 -36
data/NEWS.ja.rdoc
CHANGED
data/NEWS.rdoc
CHANGED
data/README.ja.rdoc
CHANGED
data/README.rdoc
CHANGED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
checking for GCC... -------------------- yes
|
|
2
|
+
|
|
3
|
+
"gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -c conftest.c"
|
|
4
|
+
checked program was:
|
|
5
|
+
/* begin */
|
|
6
|
+
1: /*top*/
|
|
7
|
+
2: #ifndef __GNUC__
|
|
8
|
+
3: # error
|
|
9
|
+
4: >>>>>> __GNUC__ undefined <<<<<<
|
|
10
|
+
5: #endif
|
|
11
|
+
/* end */
|
|
12
|
+
|
|
13
|
+
--------------------
|
|
14
|
+
|
|
15
|
+
checking for Win32 OS... -------------------- no
|
|
16
|
+
|
|
17
|
+
--------------------
|
|
18
|
+
|
|
19
|
+
have_macro: checking for HAVE_RUBY_ST_H in ruby.h... -------------------- no
|
|
20
|
+
|
|
21
|
+
"gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -Wall -c conftest.c"
|
|
22
|
+
conftest.c:4:3: error: #error
|
|
23
|
+
conftest.c:5: error: expected identifier or ‘(’ before ‘>>’ token
|
|
24
|
+
checked program was:
|
|
25
|
+
/* begin */
|
|
26
|
+
1: #include <ruby.h>
|
|
27
|
+
2: /*top*/
|
|
28
|
+
3: #ifndef HAVE_RUBY_ST_H
|
|
29
|
+
4: # error
|
|
30
|
+
5: >>>>>> HAVE_RUBY_ST_H undefined <<<<<<
|
|
31
|
+
6: #endif
|
|
32
|
+
/* end */
|
|
33
|
+
|
|
34
|
+
--------------------
|
|
35
|
+
|
|
36
|
+
have_header: checking for ruby/st.h... -------------------- no
|
|
37
|
+
|
|
38
|
+
"gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -Wall conftest.c -o conftest.i"
|
|
39
|
+
conftest.c:1:21: error: ruby/st.h: そのようなファイルやディレクトリはありません
|
|
40
|
+
checked program was:
|
|
41
|
+
/* begin */
|
|
42
|
+
1: #include <ruby/st.h>
|
|
43
|
+
/* end */
|
|
44
|
+
|
|
45
|
+
--------------------
|
|
46
|
+
|
|
47
|
+
have_func: checking for rb_errinfo() in ruby.h... -------------------- no
|
|
48
|
+
|
|
49
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -Wall conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/tmp/local/lib -lgroonga -lruby1.8-static -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc"
|
|
50
|
+
conftest.c: In function ‘t’:
|
|
51
|
+
conftest.c:5: error: ‘rb_errinfo’ undeclared (first use in this function)
|
|
52
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
|
53
|
+
conftest.c:5: error: for each function it appears in.)
|
|
54
|
+
checked program was:
|
|
55
|
+
/* begin */
|
|
56
|
+
1: #include <ruby.h>
|
|
57
|
+
2:
|
|
58
|
+
3: /*top*/
|
|
59
|
+
4: int main() { return 0; }
|
|
60
|
+
5: int t() { void ((*volatile p)()); p = (void ((*)()))rb_errinfo; return 0; }
|
|
61
|
+
/* end */
|
|
62
|
+
|
|
63
|
+
"gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -Wall conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/tmp/local/lib -lgroonga -lruby1.8-static -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc"
|
|
64
|
+
conftest.c: In function ‘t’:
|
|
65
|
+
conftest.c:5: warning: implicit declaration of function ‘rb_errinfo’
|
|
66
|
+
/tmp/cc9zPpDk.o: In function `t':
|
|
67
|
+
/home/kou/work/ruby/rroonga.18/ext/groonga/conftest.c:5: undefined reference to `rb_errinfo'
|
|
68
|
+
collect2: ld returned 1 exit status
|
|
69
|
+
checked program was:
|
|
70
|
+
/* begin */
|
|
71
|
+
1: #include <ruby.h>
|
|
72
|
+
2:
|
|
73
|
+
3: /*top*/
|
|
74
|
+
4: int main() { return 0; }
|
|
75
|
+
5: int t() { rb_errinfo(); return 0; }
|
|
76
|
+
/* end */
|
|
77
|
+
|
|
78
|
+
--------------------
|
|
79
|
+
|
|
80
|
+
have_type: checking for enum ruby_value_type in ruby.h... -------------------- no
|
|
81
|
+
|
|
82
|
+
"gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -I/tmp/local/include/groonga -Wall -c conftest.c"
|
|
83
|
+
conftest.c:5: error: invalid application of ‘sizeof’ to incomplete type ‘conftest_type’
|
|
84
|
+
conftest.c:5: error: size of array ‘conftestval’ is negative
|
|
85
|
+
checked program was:
|
|
86
|
+
/* begin */
|
|
87
|
+
1: #include <ruby.h>
|
|
88
|
+
2:
|
|
89
|
+
3: /*top*/
|
|
90
|
+
4: typedef enum ruby_value_type conftest_type;
|
|
91
|
+
5: int conftestval[sizeof(conftest_type)?1:-1];
|
|
92
|
+
/* end */
|
|
93
|
+
|
|
94
|
+
--------------------
|
|
95
|
+
|
|
96
|
+
checking for debug flag... -------------------- no
|
|
97
|
+
|
|
98
|
+
--------------------
|
|
99
|
+
|
data/ext/groonga/rb-grn-array.c
CHANGED
|
@@ -97,7 +97,7 @@ rb_grn_array_s_create (int argc, VALUE *argv, VALUE klass)
|
|
|
97
97
|
grn_obj *value_type = NULL, *table;
|
|
98
98
|
const char *name = NULL, *path = NULL;
|
|
99
99
|
unsigned name_size = 0;
|
|
100
|
-
grn_obj_flags flags =
|
|
100
|
+
grn_obj_flags flags = GRN_OBJ_TABLE_NO_KEY;
|
|
101
101
|
VALUE rb_table;
|
|
102
102
|
VALUE options, rb_context, rb_name, rb_path, rb_persistent;
|
|
103
103
|
VALUE rb_value_type, rb_sub_records;
|
data/ext/groonga/rb-grn-hash.c
CHANGED
|
@@ -152,7 +152,7 @@ rb_grn_hash_s_create (int argc, VALUE *argv, VALUE klass)
|
|
|
152
152
|
grn_obj *key_type = NULL, *value_type = NULL, *table;
|
|
153
153
|
const char *name = NULL, *path = NULL;
|
|
154
154
|
unsigned name_size = 0;
|
|
155
|
-
grn_obj_flags flags =
|
|
155
|
+
grn_obj_flags flags = GRN_OBJ_TABLE_HASH_KEY;
|
|
156
156
|
VALUE rb_table;
|
|
157
157
|
VALUE options, rb_context, rb_name, rb_path, rb_persistent;
|
|
158
158
|
VALUE rb_key_normalize, rb_key_type, rb_value_type, rb_default_tokenizer;
|
|
@@ -161,7 +161,7 @@ rb_grn_patricia_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
|
161
161
|
grn_obj *key_type = NULL, *value_type = NULL, *table;
|
|
162
162
|
const char *name = NULL, *path = NULL;
|
|
163
163
|
unsigned name_size = 0;
|
|
164
|
-
grn_obj_flags flags =
|
|
164
|
+
grn_obj_flags flags = GRN_OBJ_TABLE_PAT_KEY;
|
|
165
165
|
VALUE rb_table;
|
|
166
166
|
VALUE options, rb_context, rb_name, rb_path, rb_persistent;
|
|
167
167
|
VALUE rb_key_normalize, rb_key_with_sis, rb_key_type;
|
data/ext/groonga/rb-grn.h
CHANGED
data/test/test-patricia-trie.rb
CHANGED
|
@@ -363,4 +363,14 @@ class PatriciaTrieTest < Test::Unit::TestCase
|
|
|
363
363
|
end
|
|
364
364
|
assert_equal(expected, actual)
|
|
365
365
|
end
|
|
366
|
+
|
|
367
|
+
def test_add_uint_key
|
|
368
|
+
numbers = Groonga::PatriciaTrie.create(:name => "Numbers",
|
|
369
|
+
:key_type => "UInt32")
|
|
370
|
+
numbers.add(1)
|
|
371
|
+
numbers.add(2)
|
|
372
|
+
numbers.add(5)
|
|
373
|
+
numbers.add(7)
|
|
374
|
+
assert_equal([1, 2, 5, 7], numbers.collect {|number| number.key})
|
|
375
|
+
end
|
|
366
376
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rroonga
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 1.0.
|
|
9
|
+
- 1
|
|
10
|
+
version: 1.0.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Kouhei Sutou
|
|
@@ -19,10 +19,25 @@ autorequire:
|
|
|
19
19
|
bindir: bin
|
|
20
20
|
cert_chain: []
|
|
21
21
|
|
|
22
|
-
date: 2010-
|
|
22
|
+
date: 2010-09-12 00:00:00 +09:00
|
|
23
23
|
default_executable:
|
|
24
|
-
dependencies:
|
|
25
|
-
|
|
24
|
+
dependencies:
|
|
25
|
+
- !ruby/object:Gem::Dependency
|
|
26
|
+
name: rubyforge
|
|
27
|
+
prerelease: false
|
|
28
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
29
|
+
none: false
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
hash: 7
|
|
34
|
+
segments:
|
|
35
|
+
- 2
|
|
36
|
+
- 0
|
|
37
|
+
- 4
|
|
38
|
+
version: 2.0.4
|
|
39
|
+
type: :development
|
|
40
|
+
version_requirements: *id001
|
|
26
41
|
description: |-
|
|
27
42
|
rroonga is a extension library to use groonga's DB-API
|
|
28
43
|
layer. rroonga provides Rubyish readable and writable
|
|
@@ -36,11 +51,11 @@ executables: []
|
|
|
36
51
|
extensions:
|
|
37
52
|
- extconf.rb
|
|
38
53
|
extra_rdoc_files:
|
|
39
|
-
- README.rdoc
|
|
40
|
-
- NEWS.rdoc
|
|
41
|
-
- README.ja.rdoc
|
|
42
54
|
- text/expression.rdoc
|
|
43
55
|
- text/TUTORIAL.ja.rdoc
|
|
56
|
+
- NEWS.rdoc
|
|
57
|
+
- README.rdoc
|
|
58
|
+
- README.ja.rdoc
|
|
44
59
|
- NEWS.ja.rdoc
|
|
45
60
|
files:
|
|
46
61
|
- AUTHORS
|
|
@@ -58,6 +73,7 @@ files:
|
|
|
58
73
|
- example/search/public/css/groonga.css
|
|
59
74
|
- ext/.gitignore
|
|
60
75
|
- ext/groonga/extconf.rb
|
|
76
|
+
- ext/groonga/mkmf.log
|
|
61
77
|
- ext/groonga/rb-grn-accessor.c
|
|
62
78
|
- ext/groonga/rb-grn-array-cursor.c
|
|
63
79
|
- ext/groonga/rb-grn-array.c
|
|
@@ -126,99 +142,6 @@ files:
|
|
|
126
142
|
- misc/grnop2ruby.rb
|
|
127
143
|
- pkg-config.rb
|
|
128
144
|
- rroonga-build.rb
|
|
129
|
-
- test-unit-notify/Rakefile
|
|
130
|
-
- test-unit-notify/lib/test/unit/notify.rb
|
|
131
|
-
- test-unit/COPYING
|
|
132
|
-
- test-unit/GPL
|
|
133
|
-
- test-unit/PSFL
|
|
134
|
-
- test-unit/Rakefile
|
|
135
|
-
- test-unit/TODO
|
|
136
|
-
- test-unit/bin/testrb
|
|
137
|
-
- test-unit/html/bar.svg
|
|
138
|
-
- test-unit/html/developer.svg
|
|
139
|
-
- test-unit/html/favicon.ico
|
|
140
|
-
- test-unit/html/favicon.svg
|
|
141
|
-
- test-unit/html/heading-mark.svg
|
|
142
|
-
- test-unit/html/index.html
|
|
143
|
-
- test-unit/html/index.html.ja
|
|
144
|
-
- test-unit/html/install.svg
|
|
145
|
-
- test-unit/html/logo.svg
|
|
146
|
-
- test-unit/html/test-unit.css
|
|
147
|
-
- test-unit/html/tutorial.svg
|
|
148
|
-
- test-unit/lib/test/unit.rb
|
|
149
|
-
- test-unit/lib/test/unit/assertionfailederror.rb
|
|
150
|
-
- test-unit/lib/test/unit/assertions.rb
|
|
151
|
-
- test-unit/lib/test/unit/attribute.rb
|
|
152
|
-
- test-unit/lib/test/unit/autorunner.rb
|
|
153
|
-
- test-unit/lib/test/unit/collector.rb
|
|
154
|
-
- test-unit/lib/test/unit/collector/descendant.rb
|
|
155
|
-
- test-unit/lib/test/unit/collector/dir.rb
|
|
156
|
-
- test-unit/lib/test/unit/collector/load.rb
|
|
157
|
-
- test-unit/lib/test/unit/collector/objectspace.rb
|
|
158
|
-
- test-unit/lib/test/unit/color-scheme.rb
|
|
159
|
-
- test-unit/lib/test/unit/color.rb
|
|
160
|
-
- test-unit/lib/test/unit/diff.rb
|
|
161
|
-
- test-unit/lib/test/unit/error.rb
|
|
162
|
-
- test-unit/lib/test/unit/exceptionhandler.rb
|
|
163
|
-
- test-unit/lib/test/unit/failure.rb
|
|
164
|
-
- test-unit/lib/test/unit/fixture.rb
|
|
165
|
-
- test-unit/lib/test/unit/notification.rb
|
|
166
|
-
- test-unit/lib/test/unit/omission.rb
|
|
167
|
-
- test-unit/lib/test/unit/pending.rb
|
|
168
|
-
- test-unit/lib/test/unit/priority.rb
|
|
169
|
-
- test-unit/lib/test/unit/runner/console.rb
|
|
170
|
-
- test-unit/lib/test/unit/runner/emacs.rb
|
|
171
|
-
- test-unit/lib/test/unit/runner/tap.rb
|
|
172
|
-
- test-unit/lib/test/unit/testcase.rb
|
|
173
|
-
- test-unit/lib/test/unit/testresult.rb
|
|
174
|
-
- test-unit/lib/test/unit/testsuite.rb
|
|
175
|
-
- test-unit/lib/test/unit/ui/console/outputlevel.rb
|
|
176
|
-
- test-unit/lib/test/unit/ui/console/testrunner.rb
|
|
177
|
-
- test-unit/lib/test/unit/ui/emacs/testrunner.rb
|
|
178
|
-
- test-unit/lib/test/unit/ui/tap/testrunner.rb
|
|
179
|
-
- test-unit/lib/test/unit/ui/testrunner.rb
|
|
180
|
-
- test-unit/lib/test/unit/ui/testrunnermediator.rb
|
|
181
|
-
- test-unit/lib/test/unit/ui/testrunnerutilities.rb
|
|
182
|
-
- test-unit/lib/test/unit/util/backtracefilter.rb
|
|
183
|
-
- test-unit/lib/test/unit/util/method-owner-finder.rb
|
|
184
|
-
- test-unit/lib/test/unit/util/observable.rb
|
|
185
|
-
- test-unit/lib/test/unit/util/output.rb
|
|
186
|
-
- test-unit/lib/test/unit/util/procwrapper.rb
|
|
187
|
-
- test-unit/lib/test/unit/version.rb
|
|
188
|
-
- test-unit/sample/adder.rb
|
|
189
|
-
- test-unit/sample/subtracter.rb
|
|
190
|
-
- test-unit/sample/test_adder.rb
|
|
191
|
-
- test-unit/sample/test_subtracter.rb
|
|
192
|
-
- test-unit/sample/test_user.rb
|
|
193
|
-
- test-unit/test/collector/test-descendant.rb
|
|
194
|
-
- test-unit/test/collector/test-load.rb
|
|
195
|
-
- test-unit/test/collector/test_dir.rb
|
|
196
|
-
- test-unit/test/collector/test_objectspace.rb
|
|
197
|
-
- test-unit/test/run-test.rb
|
|
198
|
-
- test-unit/test/test-attribute.rb
|
|
199
|
-
- test-unit/test/test-color-scheme.rb
|
|
200
|
-
- test-unit/test/test-color.rb
|
|
201
|
-
- test-unit/test/test-diff.rb
|
|
202
|
-
- test-unit/test/test-emacs-runner.rb
|
|
203
|
-
- test-unit/test/test-fixture.rb
|
|
204
|
-
- test-unit/test/test-notification.rb
|
|
205
|
-
- test-unit/test/test-omission.rb
|
|
206
|
-
- test-unit/test/test-pending.rb
|
|
207
|
-
- test-unit/test/test-priority.rb
|
|
208
|
-
- test-unit/test/test-testcase.rb
|
|
209
|
-
- test-unit/test/test_assertions.rb
|
|
210
|
-
- test-unit/test/test_error.rb
|
|
211
|
-
- test-unit/test/test_failure.rb
|
|
212
|
-
- test-unit/test/test_testresult.rb
|
|
213
|
-
- test-unit/test/test_testsuite.rb
|
|
214
|
-
- test-unit/test/testunit-test-util.rb
|
|
215
|
-
- test-unit/test/ui/test_tap.rb
|
|
216
|
-
- test-unit/test/ui/test_testrunmediator.rb
|
|
217
|
-
- test-unit/test/util/test-method-owner-finder.rb
|
|
218
|
-
- test-unit/test/util/test-output.rb
|
|
219
|
-
- test-unit/test/util/test_backtracefilter.rb
|
|
220
|
-
- test-unit/test/util/test_observable.rb
|
|
221
|
-
- test-unit/test/util/test_procwrapper.rb
|
|
222
145
|
- test/.gitignore
|
|
223
146
|
- test/groonga-test-utils.rb
|
|
224
147
|
- test/run-test.rb
|
data/test-unit-notify/Rakefile
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# -*- ruby -*-
|
|
2
|
-
|
|
3
|
-
require 'pathname'
|
|
4
|
-
|
|
5
|
-
base_dir = Pathname(__FILE__).dirname.expand_path
|
|
6
|
-
test_unit_dir = (base_dir.parent + "test-unit").expand_path
|
|
7
|
-
test_unit_lib_dir = test_unit_dir + "lib"
|
|
8
|
-
lib_dir = base_dir + "lib"
|
|
9
|
-
|
|
10
|
-
$LOAD_PATH.unshift(test_unit_lib_dir.to_s)
|
|
11
|
-
$LOAD_PATH.unshift(lib_dir.to_s)
|
|
12
|
-
|
|
13
|
-
require 'test/unit/notify'
|
|
14
|
-
|
|
15
|
-
require 'rubygems'
|
|
16
|
-
require 'hoe'
|
|
17
|
-
|
|
18
|
-
Test::Unit.run = true
|
|
19
|
-
|
|
20
|
-
version = Test::Unit::Notify::VERSION
|
|
21
|
-
ENV["VERSION"] = version
|
|
22
|
-
Hoe.spec('test-unit-notify') do
|
|
23
|
-
self.version = version
|
|
24
|
-
self.rubyforge_name = "test-unit"
|
|
25
|
-
|
|
26
|
-
developer('Kouhei Sutou', 'kou@clear-code.com')
|
|
27
|
-
|
|
28
|
-
extra_deps << ["test-unit"]
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
task :docs do
|
|
32
|
-
doc_dir = base_dir + "doc"
|
|
33
|
-
doc_screenshot_dir = doc_dir + "screenshot"
|
|
34
|
-
mkdir_p(doc_screenshot_dir.to_s)
|
|
35
|
-
(base_dir + "screenshot").children.each do |file|
|
|
36
|
-
next if file.directory?
|
|
37
|
-
cp(file.to_s, doc_screenshot_dir.to_s)
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
task :tag do
|
|
42
|
-
message = "Released Test::Unit::Notify #{version}!"
|
|
43
|
-
base = "svn+ssh://#{ENV['USER']}@rubyforge.org/var/svn/test-unit/extensions/test-unit-notify/"
|
|
44
|
-
sh 'svn', 'copy', '-m', message, "#{base}trunk", "#{base}tags/#{version}"
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# vim: syntax=Ruby
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
#--
|
|
2
|
-
#
|
|
3
|
-
# Author:: Kouhei Sutou
|
|
4
|
-
# Copyright::
|
|
5
|
-
# * Copyright (c) 2010 Kouhei Sutou <kou@clear-code.com>
|
|
6
|
-
# License:: Ruby license.
|
|
7
|
-
|
|
8
|
-
require 'pathname'
|
|
9
|
-
require 'erb'
|
|
10
|
-
require 'test/unit'
|
|
11
|
-
|
|
12
|
-
module Test
|
|
13
|
-
module Unit
|
|
14
|
-
AutoRunner.setup_option do |auto_runner, options|
|
|
15
|
-
options.on("--[no-]notify",
|
|
16
|
-
"Notify test result at the last.") do |use_notify|
|
|
17
|
-
auto_runner.listeners.reject! do |listener|
|
|
18
|
-
listener.is_a?(Notify::Notifier)
|
|
19
|
-
end
|
|
20
|
-
auto_runner.listeners << Notify::Notifier.new if use_notify
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
module Notify
|
|
25
|
-
VERSION = "0.0.2"
|
|
26
|
-
|
|
27
|
-
class Notifier
|
|
28
|
-
include ERB::Util
|
|
29
|
-
|
|
30
|
-
base_dir = Pathname(__FILE__).dirname.parent.parent.parent.expand_path
|
|
31
|
-
ICON_DIR = base_dir + "data" + "icons"
|
|
32
|
-
def initialize
|
|
33
|
-
@theme = "kinotan"
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def attach_to_mediator(mediator)
|
|
37
|
-
mediator.add_listener(UI::TestRunnerMediator::STARTED,
|
|
38
|
-
&method(:started))
|
|
39
|
-
mediator.add_listener(UI::TestRunnerMediator::FINISHED,
|
|
40
|
-
&method(:finished))
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def started(result)
|
|
44
|
-
@result = result
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
def finished(elapsed_time)
|
|
48
|
-
case RUBY_PLATFORM
|
|
49
|
-
when /mswin|mingw|cygwin/
|
|
50
|
-
# how?
|
|
51
|
-
when /darwin/
|
|
52
|
-
# growl?
|
|
53
|
-
else
|
|
54
|
-
notify_by_notify_send(elapsed_time)
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def notify_by_notify_send(elapsed_time)
|
|
59
|
-
icon = guess_suitable_icon
|
|
60
|
-
args = ["notify-send",
|
|
61
|
-
"--expire-time", "5000",
|
|
62
|
-
"--urgency", urgency]
|
|
63
|
-
args.concat(["--icon", icon.to_s]) if icon
|
|
64
|
-
title = "%s [%g%%] (%gs)" % [@result.status,
|
|
65
|
-
@result.pass_percentage,
|
|
66
|
-
elapsed_time]
|
|
67
|
-
args << title
|
|
68
|
-
args << h(@result.summary)
|
|
69
|
-
system(*args)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def guess_suitable_icon
|
|
73
|
-
icon_dir = ICON_DIR + @theme
|
|
74
|
-
status = @result.status
|
|
75
|
-
icon_base_names = [status]
|
|
76
|
-
if @result.passed?
|
|
77
|
-
icon_base_names << "pass"
|
|
78
|
-
else
|
|
79
|
-
case status
|
|
80
|
-
when "failure"
|
|
81
|
-
icon_base_names << "error"
|
|
82
|
-
when "error"
|
|
83
|
-
icon_base_names << "failure"
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
icon_base_names << "default"
|
|
87
|
-
icon_base_names.each do |base_name|
|
|
88
|
-
icon = icon_dir + "#{base_name}.png"
|
|
89
|
-
return icon if icon.exist?
|
|
90
|
-
end
|
|
91
|
-
nil
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def urgency
|
|
95
|
-
if @result.passed?
|
|
96
|
-
"normal"
|
|
97
|
-
else
|
|
98
|
-
"critical"
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|