tarantool 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/examples/record.rb +1 -1
- data/lib/tarantool/record.rb +1 -1
- data/lib/tarantool/requests/call.rb +2 -2
- data/lib/tarantool.rb +1 -1
- data/spec/helpers/truncate.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/tarantool/record_spec.rb +1 -1
- data/spec/tarantool/request_spec.rb +2 -2
- data/tarantool.gemspec +2 -2
- metadata +7 -6
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/examples/record.rb
CHANGED
data/lib/tarantool/record.rb
CHANGED
@@ -6,8 +6,8 @@ class Tarantool
|
|
6
6
|
attr_reader :flags, :proc_name, :tuple
|
7
7
|
def parse_args
|
8
8
|
@flags = params[:return_tuple] ? 1 : 0
|
9
|
-
@proc_name =
|
10
|
-
@tuple =
|
9
|
+
@proc_name = args.shift
|
10
|
+
@tuple = args.map(&:to_s)
|
11
11
|
end
|
12
12
|
|
13
13
|
def make_body
|
data/lib/tarantool.rb
CHANGED
data/spec/helpers/truncate.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Helpers
|
2
2
|
module Truncate
|
3
3
|
def teardown
|
4
|
-
while (res = space.call(
|
4
|
+
while (res = space.call('box.select_range', space.space_no, 0, 100, return_tuple: true)) && res.tuples.size > 0
|
5
5
|
res.tuples.each do |k, *_|
|
6
6
|
space.delete key: k
|
7
7
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -248,7 +248,7 @@ describe Tarantool::Record do
|
|
248
248
|
end
|
249
249
|
|
250
250
|
describe "call" do
|
251
|
-
let(:res) { user.class.select.call('box.select_range',
|
251
|
+
let(:res) { user.class.select.call('box.select_range', 0, 0, 2)}
|
252
252
|
before do
|
253
253
|
user_class.create login: 'prepor', name: 'Andrew', email: 'ceo@prepor.ru'
|
254
254
|
user_class.create login: 'petro', name: 'Petr', email: 'petro@gmail.com'
|
@@ -61,14 +61,14 @@ describe Tarantool::Request do
|
|
61
61
|
|
62
62
|
describe "call" do
|
63
63
|
it "should call lua proc" do
|
64
|
-
res = space.call
|
64
|
+
res = space.call 'box.pack', 'i', '100', return_tuple: true
|
65
65
|
res.tuple[0].to_i.must_equal 100
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should return batches via select_range" do
|
69
69
|
space.insert 100, 'привет'
|
70
70
|
space.insert 101, 'hi'
|
71
|
-
res = space.call
|
71
|
+
res = space.call 'box.select_range', '1', '0', '100', return_tuple: true
|
72
72
|
res.tuples.size.must_equal 2
|
73
73
|
end
|
74
74
|
end
|
data/tarantool.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
|
6
6
|
s.name = 'tarantool'
|
7
|
-
s.version = '0.2.
|
8
|
-
s.date = '2012-
|
7
|
+
s.version = '0.2.4'
|
8
|
+
s.date = '2012-05-06'
|
9
9
|
s.rubyforge_project = 'tarantool'
|
10
10
|
|
11
11
|
s.summary = "Tarantool KV-storage client."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tarantool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-06 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iproto
|
16
|
-
requirement: &
|
16
|
+
requirement: &70109143146600 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70109143146600
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activemodel
|
27
|
-
requirement: &
|
27
|
+
requirement: &70109143145940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
version: '4.0'
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
|
-
version_requirements: *
|
38
|
+
version_requirements: *70109143145940
|
39
39
|
description: Tarantool KV-storage client.
|
40
40
|
email: ceo@prepor.ru
|
41
41
|
executables: []
|
@@ -106,3 +106,4 @@ test_files:
|
|
106
106
|
- spec/tarantool/em_spec.rb
|
107
107
|
- spec/tarantool/record_spec.rb
|
108
108
|
- spec/tarantool/request_spec.rb
|
109
|
+
has_rdoc:
|