rufus-tokyo 1.0.1 → 1.0.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.
@@ -64,6 +64,9 @@ module Rufus::Tokyo
64
64
  attfunc :tcrdbopen, [ :pointer, :string, :int ], :int
65
65
  attfunc :abs_close, :tcrdbclose, [ :pointer ], :int
66
66
 
67
+ attfunc :abs_ecode, :tcrdbecode, [ :pointer ], :int
68
+ attfunc :abs_errmsg, :tcrdberrmsg, [ :pointer, :int ], :string
69
+
67
70
  attfunc :abs_del, :tcrdbdel, [ :pointer ], :void
68
71
 
69
72
  attfunc :abs_rnum, :tcrdbrnum, [ :pointer ], :uint64
@@ -110,7 +113,7 @@ module Rufus::Tokyo
110
113
  attfunc :tab_out, :tcrdbtblout, [ :pointer, :string, :int ], :int
111
114
 
112
115
  attfunc :tab_ecode, :tcrdbecode, [ :pointer ], :int
113
- attfunc :tab_errmsg, :tcrdberrmsg, [ :int ], :string
116
+ attfunc :tab_errmsg, :tcrdberrmsg, [ :pointer, :int ], :string
114
117
 
115
118
  attfunc :tab_del, :tcrdbdel, [ :pointer ], :void
116
119
 
@@ -45,6 +45,7 @@ module Rufus::Tokyo
45
45
  include TyrantCommons
46
46
  include Outlen
47
47
  include Ext
48
+ include NoTransactions
48
49
 
49
50
 
50
51
  attr_reader :host, :port
@@ -82,7 +83,7 @@ module Rufus::Tokyo
82
83
  @host = host
83
84
  @port = port
84
85
 
85
- (lib.tcrdbopen(@db, host, port) == 1) ||
86
+ (lib.tcrdbopen(@db, host, port) != 0) ||
86
87
  raise(TokyoError.new("couldn't connect to tyrant at #{host}:#{port}"))
87
88
 
88
89
  if self.stat['type'] != 'table'
@@ -93,6 +94,8 @@ module Rufus::Tokyo
93
94
  "tyrant at #{host}:#{port} is a not table, " +
94
95
  "use Rufus::Tokyo::Tyrant instead to access it.")
95
96
  end
97
+
98
+ @default_proc = nil
96
99
  end
97
100
 
98
101
  #
@@ -102,22 +105,6 @@ module Rufus::Tokyo
102
105
  TyrantLib
103
106
  end
104
107
 
105
- def transaction #:nodoc#
106
- raise_transaction_nme('transaction')
107
- end
108
- def abort #:nodoc#
109
- raise_transaction_nme('abort')
110
- end
111
- def tranbegin #:nodoc#
112
- raise_transaction_nme('tranbegin')
113
- end
114
- def trancommit #:nodoc#
115
- raise_transaction_nme('trancommit')
116
- end
117
- def tranabort #:nodoc#
118
- raise_transaction_nme('tranabort')
119
- end
120
-
121
108
  #--
122
109
  # Doesn't work properly, tcrdbmisc doesn't return something leveragable :(
123
110
  #
@@ -128,12 +115,6 @@ module Rufus::Tokyo
128
115
 
129
116
  protected
130
117
 
131
- def raise_transaction_nme (method_name)
132
-
133
- raise NoMethodError.new(
134
- "Tyrant tables don't support transactions", method_name)
135
- end
136
-
137
118
  # Returns the raw stat string from the Tyrant server.
138
119
  #
139
120
  def do_stat
metadata CHANGED
@@ -1,28 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rufus-tokyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
+ - Zev Blut
9
+ - Jeremy Hinegardner
10
+ - James Edward Gray II
8
11
  autorequire:
9
12
  bindir: bin
10
13
  cert_chain: []
11
14
 
12
- date: 2009-09-18 00:00:00 +09:00
15
+ date: 2009-11-01 00:00:00 +09:00
13
16
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: ffi
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
- description:
17
+ dependencies: []
18
+
19
+ description: "\n\
20
+ Ruby-ffi based lib to access Tokyo Cabinet and Tyrant.\n\n\
21
+ The ffi-based structures are available via the Rufus::Tokyo namespace.\n\
22
+ There is a Rufus::Edo namespace that interfaces with Hirabayashi-san's native Ruby interface, and whose API is equal to the Rufus::Tokyo one.\n\n\
23
+ Finally rufus-tokyo includes ffi-based interfaces to Tokyo Dystopia (thanks to Jeremy Hinegardner).\n "
26
24
  email: jmettraux@gmail.com
27
25
  executables: []
28
26
 
@@ -52,6 +50,7 @@ files:
52
50
  - lib/rufus/tokyo/dystopia/words.rb
53
51
  - lib/rufus/tokyo/dystopia.rb
54
52
  - lib/rufus/tokyo/hmethods.rb
53
+ - lib/rufus/tokyo/openable.rb
55
54
  - lib/rufus/tokyo/outlen.rb
56
55
  - lib/rufus/tokyo/query.rb
57
56
  - lib/rufus/tokyo/transactions.rb
@@ -68,6 +67,7 @@ files:
68
67
  - CHANGELOG.txt
69
68
  - CREDITS.txt
70
69
  - LICENSE.txt
70
+ - MIGRATED.txt
71
71
  - TODO.txt
72
72
  - README.rdoc
73
73
  has_rdoc: true
@@ -91,12 +91,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: "0"
93
93
  version:
94
- requirements:
95
- - ffi
94
+ requirements: []
95
+
96
96
  rubyforge_project: rufus
97
97
  rubygems_version: 1.3.5
98
98
  signing_key:
99
99
  specification_version: 3
100
- summary: ruby-ffi based lib to access Tokyo Cabinet and Tyrant
100
+ summary: ruby-ffi based lib to access Tokyo Cabinet, Tyrant and Dystopia
101
101
  test_files:
102
102
  - spec/spec.rb