ruby-tokyotyrant 0.5.1 → 0.5.2
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/README.rdoc +3 -2
- data/Rakefile +11 -7
- data/ext/tokyo_tyrant_bdb.c +1 -1
- data/ext/tokyo_tyrant_db.c +3 -3
- data/ext/tokyo_tyrant_module.c +1 -1
- data/ext/tokyo_tyrant_table.c +3 -3
- metadata +18 -5
data/README.rdoc
CHANGED
@@ -4,9 +4,9 @@ This is a c extension for Ruby to access TokyoTyrant databases. It currently su
|
|
4
4
|
|
5
5
|
== Install
|
6
6
|
|
7
|
-
# install tokyocabinet (1.4.
|
7
|
+
# install tokyocabinet (1.4.47) and tokyotyrant (requires 1.1.41)
|
8
8
|
# after installing tc and tt on linux I had to /sbin/ldconfig (as root)
|
9
|
-
sudo gem install ruby-tokyotyrant
|
9
|
+
sudo gem install --no-ri --no-rdoc ruby-tokyotyrant
|
10
10
|
|
11
11
|
== Performance
|
12
12
|
|
@@ -246,6 +246,7 @@ This is not in production but the initial benchmarks are very interesting. Resul
|
|
246
246
|
== Contributors
|
247
247
|
|
248
248
|
* Flinn Mueller (actsasflinn) author/maintainer
|
249
|
+
* ??? (gottlike) ruby 1.9.2 compatibility
|
249
250
|
* Justin Reagor (cheapRoc) specs
|
250
251
|
* Seth Yates (sethyates) run method (lua ext)
|
251
252
|
* John Mettraux (jmettraux) inspiration (rufus-tokyo)
|
data/Rakefile
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
GEMNAME = 'ruby-tokyotyrant'
|
4
|
+
GEMVERSION = '0.5.2'
|
5
|
+
|
3
6
|
require 'pathname'
|
4
7
|
$root = Pathname(__FILE__).dirname
|
5
8
|
|
@@ -7,9 +10,9 @@ require 'rubygems'
|
|
7
10
|
require 'rake'
|
8
11
|
require 'rake/clean'
|
9
12
|
require 'rake/packagetask'
|
10
|
-
require '
|
13
|
+
require 'rubygems/package_task'
|
11
14
|
require 'rake/testtask'
|
12
|
-
require '
|
15
|
+
require 'rdoc/task'
|
13
16
|
|
14
17
|
task :spec do
|
15
18
|
load $root.join('spec', 'spec_base.rb')
|
@@ -19,8 +22,8 @@ task :default => [ :spec ]
|
|
19
22
|
CLEAN.include('pkg', 'tmp')
|
20
23
|
|
21
24
|
gemspec = Gem::Specification.new do |s|
|
22
|
-
s.name =
|
23
|
-
s.version =
|
25
|
+
s.name = GEMNAME
|
26
|
+
s.version = GEMVERSION
|
24
27
|
s.authors = [ 'Flinn' ]
|
25
28
|
s.email = 'flinn@actsasflinn.com'
|
26
29
|
s.homepage = 'http://github.com/actsasflinn/ruby-tokyotyrant/'
|
@@ -42,16 +45,17 @@ gemspec = Gem::Specification.new do |s|
|
|
42
45
|
end
|
43
46
|
|
44
47
|
task :gemspec do
|
45
|
-
File.open(
|
48
|
+
File.open("#{GEMNAME}.gemspec", 'w') do |f|
|
46
49
|
f.write(gemspec.to_ruby)
|
47
50
|
end
|
48
51
|
end
|
49
52
|
|
50
|
-
|
53
|
+
Gem::PackageTask.new(gemspec) do |pkg|
|
54
|
+
pkg.need_zip = true
|
51
55
|
pkg.need_tar = true
|
52
56
|
end
|
53
57
|
|
54
|
-
Rake::PackageTask.new(
|
58
|
+
Rake::PackageTask.new(GEMNAME, GEMVERSION) do |pkg|
|
55
59
|
pkg.need_zip = true
|
56
60
|
pkg.package_files = FileList[
|
57
61
|
'COPYING',
|
data/ext/tokyo_tyrant_bdb.c
CHANGED
@@ -81,7 +81,7 @@ static VALUE cBDB_each(VALUE vself){
|
|
81
81
|
TCLIST *result;
|
82
82
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
83
83
|
|
84
|
-
if(rb_block_given_p()
|
84
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
85
85
|
|
86
86
|
tcrdbiterinit(db);
|
87
87
|
tcrdbmisc(db, "iterinit", RDBMONOULOG, tclistnew());
|
data/ext/tokyo_tyrant_db.c
CHANGED
@@ -138,7 +138,7 @@ static VALUE cDB_vsiz(VALUE vself, VALUE vkey){
|
|
138
138
|
static VALUE cDB_fetch(int argc, VALUE *argv, VALUE vself){
|
139
139
|
VALUE vkey, vrv, vforce;
|
140
140
|
rb_scan_args(argc, argv, "11", &vkey, &vforce);
|
141
|
-
if(rb_block_given_p()
|
141
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
142
142
|
if(vforce == Qnil) vforce = Qfalse;
|
143
143
|
|
144
144
|
if(vforce != Qfalse || (vrv = cDB_get(vself, vkey)) == Qnil){
|
@@ -150,7 +150,7 @@ static VALUE cDB_fetch(int argc, VALUE *argv, VALUE vself){
|
|
150
150
|
|
151
151
|
static VALUE cDB_each(VALUE vself){
|
152
152
|
VALUE vrv;
|
153
|
-
if(rb_block_given_p()
|
153
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
154
154
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
155
155
|
vrv = Qnil;
|
156
156
|
tcrdbiterinit(db);
|
@@ -169,7 +169,7 @@ static VALUE cDB_each(VALUE vself){
|
|
169
169
|
|
170
170
|
static VALUE cDB_each_value(VALUE vself){
|
171
171
|
VALUE vrv;
|
172
|
-
if(rb_block_given_p()
|
172
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
173
173
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
174
174
|
vrv = Qnil;
|
175
175
|
tcrdbiterinit(db);
|
data/ext/tokyo_tyrant_module.c
CHANGED
@@ -432,7 +432,7 @@ static VALUE mTokyoTyrant_ext(VALUE vself, VALUE vext, VALUE vkey, VALUE vval){
|
|
432
432
|
static VALUE mTokyoTyrant_each_key(VALUE vself){
|
433
433
|
VALUE vrv = Qnil;
|
434
434
|
char *kbuf;
|
435
|
-
if(rb_block_given_p()
|
435
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
436
436
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
437
437
|
|
438
438
|
tcrdbiterinit(db);
|
data/ext/tokyo_tyrant_table.c
CHANGED
@@ -171,7 +171,7 @@ static VALUE cTable_genuid(VALUE vself){
|
|
171
171
|
static VALUE cTable_fetch(int argc, VALUE *argv, VALUE vself){
|
172
172
|
VALUE vkey, vrv, vforce;
|
173
173
|
rb_scan_args(argc, argv, "11", &vkey, &vforce);
|
174
|
-
if(rb_block_given_p()
|
174
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
175
175
|
if(vforce == Qnil) vforce = Qfalse;
|
176
176
|
vkey = StringValueEx(vkey);
|
177
177
|
|
@@ -187,7 +187,7 @@ static VALUE cTable_each(VALUE vself){
|
|
187
187
|
VALUE vrv = Qnil;
|
188
188
|
char *kbuf;
|
189
189
|
int ksiz;
|
190
|
-
if(rb_block_given_p()
|
190
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
191
191
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
192
192
|
|
193
193
|
tcrdbiterinit(db);
|
@@ -205,7 +205,7 @@ static VALUE cTable_each_value(VALUE vself){
|
|
205
205
|
VALUE vrv = Qnil;
|
206
206
|
char *kbuf;
|
207
207
|
int ksiz;
|
208
|
-
if(rb_block_given_p()
|
208
|
+
if(!rb_block_given_p()) rb_raise(rb_eArgError, "no block given");
|
209
209
|
TCRDB *db = mTokyoTyrant_getdb(vself);
|
210
210
|
|
211
211
|
tcrdbiterinit(db);
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-tokyotyrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 15
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 2
|
10
|
+
version: 0.5.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Flinn
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-10-10 00:00:00 -04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -58,6 +64,7 @@ files:
|
|
58
64
|
- benchmarks/bulk_table.rb
|
59
65
|
- benchmarks/db.rb
|
60
66
|
- benchmarks/table.rb
|
67
|
+
- ext/extconf.rb
|
61
68
|
has_rdoc: true
|
62
69
|
homepage: http://github.com/actsasflinn/ruby-tokyotyrant/
|
63
70
|
licenses: []
|
@@ -68,21 +75,27 @@ rdoc_options: []
|
|
68
75
|
require_paths:
|
69
76
|
- ext
|
70
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
71
79
|
requirements:
|
72
80
|
- - ">="
|
73
81
|
- !ruby/object:Gem::Version
|
82
|
+
hash: 3
|
83
|
+
segments:
|
84
|
+
- 0
|
74
85
|
version: "0"
|
75
|
-
version:
|
76
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
77
88
|
requirements:
|
78
89
|
- - ">="
|
79
90
|
- !ruby/object:Gem::Version
|
91
|
+
hash: 3
|
92
|
+
segments:
|
93
|
+
- 0
|
80
94
|
version: "0"
|
81
|
-
version:
|
82
95
|
requirements: []
|
83
96
|
|
84
97
|
rubyforge_project:
|
85
|
-
rubygems_version: 1.3.
|
98
|
+
rubygems_version: 1.3.7
|
86
99
|
signing_key:
|
87
100
|
specification_version: 3
|
88
101
|
summary: A C based TokyoTyrant Ruby binding
|