kyotocabinet-java 0.2.0-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/Gemfile +8 -3
- data/README.md +95 -0
- data/Rakefile +16 -5
- data/VERSION +1 -1
- data/ext/kyotocabinet-java/.gitignore +3 -0
- data/kyotocabinet-java.gemspec +12 -14
- data/lib/kyotocabinet.rb +308 -17
- data/spec/kyotocabinet_spec.rb +301 -0
- data/spec/spec_helper.rb +13 -0
- data/test/.gitignore +1 -0
- data/test/kctest.rb +1184 -0
- data/test/test.rb +59 -0
- data/travis-ci/install_kc +13 -0
- metadata +11 -52
- data/README.rdoc +0 -19
data/test/test.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
#! /usr/bin/ruby
|
2
|
+
|
3
|
+
require 'kyotocabinet'
|
4
|
+
require 'rbconfig'
|
5
|
+
|
6
|
+
confs = [
|
7
|
+
[ ":", 10000 ],
|
8
|
+
[ "*", 10000 ],
|
9
|
+
[ "%", 10000 ],
|
10
|
+
[ "casket.kch", 10000 ],
|
11
|
+
[ "casket.kct", 10000 ],
|
12
|
+
[ "casket.kcd", 1000 ],
|
13
|
+
[ "casket.kcf", 10000 ],
|
14
|
+
]
|
15
|
+
formats = [
|
16
|
+
"kctest.rb order '%s' '%d'",
|
17
|
+
"kctest.rb order -rnd '%s' '%d'",
|
18
|
+
"kctest.rb order -etc '%s' '%d'",
|
19
|
+
"kctest.rb order -rnd -etc '%s' '%d'",
|
20
|
+
"kctest.rb order -th 4 '%s' '%d'",
|
21
|
+
"kctest.rb order -th 4 -rnd '%s' '%d'",
|
22
|
+
"kctest.rb order -th 4 -etc '%s' '%d'",
|
23
|
+
"kctest.rb order -th 4 -rnd -etc '%s' '%d'",
|
24
|
+
"kctest.rb order -cc -th 4 -rnd -etc '%s' '%d'",
|
25
|
+
"kctest.rb wicked '%s' '%d'",
|
26
|
+
"kctest.rb wicked -it 4 '%s' '%d'",
|
27
|
+
"kctest.rb wicked -th 4 '%s' '%d'",
|
28
|
+
"kctest.rb wicked -th 4 -it 4 '%s' '%d'",
|
29
|
+
"kctest.rb wicked -cc -th 4 -it 4 '%s' '%d'",
|
30
|
+
"kctest.rb misc '%s'",
|
31
|
+
]
|
32
|
+
|
33
|
+
system("rm -rf casket*")
|
34
|
+
rubycmd = Config::CONFIG["bindir"] + "/" + RbConfig::CONFIG['ruby_install_name']
|
35
|
+
all = confs.size * formats.size
|
36
|
+
cnt = 0
|
37
|
+
oknum = 0
|
38
|
+
confs.each do |conf|
|
39
|
+
path = conf[0]
|
40
|
+
rnum = conf[1]
|
41
|
+
formats.each do |format|
|
42
|
+
cnt += 1
|
43
|
+
command = sprintf(format, path, rnum)
|
44
|
+
printf("%03d/%03d: %s: ", cnt, all, command)
|
45
|
+
rv = system("#{rubycmd} -I. #{command} >/dev/null")
|
46
|
+
if rv
|
47
|
+
oknum += 1
|
48
|
+
printf("ok\n")
|
49
|
+
else
|
50
|
+
printf("failed\n")
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
system("rm -rf casket*")
|
55
|
+
if oknum == cnt
|
56
|
+
printf("%d tests were all ok\n", cnt)
|
57
|
+
else
|
58
|
+
printf("%d/%d tests failed\n", cnt - oknum, cnt)
|
59
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
## NOTE: I am aware that this shell script is horrible.
|
4
|
+
|
5
|
+
cd /tmp
|
6
|
+
wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
|
7
|
+
tar xzf kyotocabinet-1.2.76.tar.gz
|
8
|
+
cd kyotocabinet-1.2.76
|
9
|
+
./configure && make && make install
|
10
|
+
grep -q local /etc/ld.so.conf
|
11
|
+
if [ $? -ne 0 ]; then
|
12
|
+
echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig
|
13
|
+
fi
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: kyotocabinet-java
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.3.0
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- FAL Labs
|
@@ -10,24 +10,8 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: shoulda
|
17
|
-
version_requirements: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
none: false
|
23
|
-
requirement: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ! '>='
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
none: false
|
29
|
-
prerelease: false
|
30
|
-
type: :development
|
31
15
|
- !ruby/object:Gem::Dependency
|
32
16
|
name: rdoc
|
33
17
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,38 +28,6 @@ dependencies:
|
|
44
28
|
none: false
|
45
29
|
prerelease: false
|
46
30
|
type: :development
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 1.1.3
|
54
|
-
none: false
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: 1.1.3
|
60
|
-
none: false
|
61
|
-
prerelease: false
|
62
|
-
type: :development
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: jeweler
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: 1.8.4
|
70
|
-
none: false
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ~>
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.8.4
|
76
|
-
none: false
|
77
|
-
prerelease: false
|
78
|
-
type: :development
|
79
31
|
- !ruby/object:Gem::Dependency
|
80
32
|
name: simplecov
|
81
33
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -115,12 +67,13 @@ extensions:
|
|
115
67
|
- ext/kyotocabinet-java/configure
|
116
68
|
extra_rdoc_files:
|
117
69
|
- LICENSE.txt
|
118
|
-
- README.
|
70
|
+
- README.md
|
119
71
|
files:
|
120
72
|
- .document
|
73
|
+
- .travis.yml
|
121
74
|
- Gemfile
|
122
75
|
- LICENSE.txt
|
123
|
-
- README.
|
76
|
+
- README.md
|
124
77
|
- Rakefile
|
125
78
|
- VERSION
|
126
79
|
- ext/kyotocabinet-java/.gitignore
|
@@ -190,6 +143,12 @@ files:
|
|
190
143
|
- ext/kyotocabinet-java/overview.html
|
191
144
|
- kyotocabinet-java.gemspec
|
192
145
|
- lib/kyotocabinet.rb
|
146
|
+
- spec/kyotocabinet_spec.rb
|
147
|
+
- spec/spec_helper.rb
|
148
|
+
- test/.gitignore
|
149
|
+
- test/kctest.rb
|
150
|
+
- test/test.rb
|
151
|
+
- travis-ci/install_kc
|
193
152
|
homepage: http://github.com/csw/kyotocabinet-java
|
194
153
|
licenses:
|
195
154
|
- GPL
|
data/README.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
= kyotocabinet-java
|
2
|
-
|
3
|
-
Description goes here.
|
4
|
-
|
5
|
-
== Contributing to kyotocabinet-java
|
6
|
-
|
7
|
-
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
8
|
-
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
9
|
-
* Fork the project.
|
10
|
-
* Start a feature/bugfix branch.
|
11
|
-
* Commit and push until you are happy with your contribution.
|
12
|
-
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
-
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
-
|
15
|
-
== Copyright
|
16
|
-
|
17
|
-
Copyright (c) 2012 Clayton Wheeler. See LICENSE.txt for
|
18
|
-
further details.
|
19
|
-
|