tarantool16 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a32fa448b9f723a683ca2eed5fcdcffb978684ae
4
- data.tar.gz: cf785fd5ad492f3a7f0b2c845e84648958df2ea7
3
+ metadata.gz: 6a75caf062fcb068dee8490ba33bd62ea7059f38
4
+ data.tar.gz: d926b35082fdc68ebee9b41b97c0df18b8bba52c
5
5
  SHA512:
6
- metadata.gz: e7d3f686ea033c9cad8e6fe6bfc66d031b52ba25732413c467fde64bf3bca3e465f2fb347ad4ab8c9ec2662f23db5cfcf4e8fc407c6e73a6c281e0a37f675672
7
- data.tar.gz: 73758e4cc1a1d447d90b8b81320ba2eae5ca71fc06394d92892ecdfdec29c3ac0e27e3f3497c297ec648025d26bef3d07279070731cc68727b89dbe3748dbd90
6
+ metadata.gz: f891c0ddf1ac0d61f33b4469a8840d878b4e182df7ef2d0485d0c67f8c5cf52f92a8a3f4f10d2aa293a09b8d7046b19668b2a1db79b4bf573f5a213406f6d7fd
7
+ data.tar.gz: dcae53598bc994d80c54303fcc1240690e97d59012624fa6272b0bce18605a625d10f8ea6c7dfccba72dbf4121e5ed38b77fd8c562589830cb8262e503c5f945
@@ -96,34 +96,23 @@ module Tarantool16
96
96
  UNDEF = Object.new.freeze
97
97
  def initialize
98
98
  @r = UNDEF
99
- @cb = nil
100
99
  end
101
100
  def then(cb)
102
101
  unless @r.equal? UNDEF
103
102
  return cb.call(@r)
104
103
  end
105
- if @cb
106
- raise "Blocking future accepts only 1 callback"
107
- end
108
- @cb = cb
104
+ raise "DumbDB::ShemaFuture future is not real future :-("
109
105
  end
110
106
 
111
107
  def then_blk
112
108
  unless @r.equal? UNDEF
113
109
  return yield @r
114
110
  end
115
- if @cb
116
- raise "Blocking future accepts only 1 callback"
117
- end
118
- @cb = lambda{|r| yield r}
111
+ raise "DumbDB::ShemaFuture future is not real future :-("
119
112
  end
120
113
 
121
114
  def set(r)
122
115
  @r = r
123
- if cb = @cb
124
- @cb = nil
125
- cb.call(r)
126
- end
127
116
  end
128
117
  end
129
118
 
@@ -18,9 +18,10 @@ module Tarantool16
18
18
  @field_names = {}
19
19
  @fields = []
20
20
  @has_tail = false
21
- flds.each_with_index do |fld, i|
21
+ flds.each_with_index do |fld, i; name|
22
22
  if @has_tail
23
- raise "no fields allowed after tail: #{flds}"
23
+ $stderr.puts "no fields allowed after tail: #{flds}"
24
+ break
24
25
  end
25
26
  case fld
26
27
  when String, Symbol
@@ -33,7 +34,12 @@ module Tarantool16
33
34
  type = fld['type'] || fld[:type]
34
35
  tail = fld['tail'] || fld[:tail]
35
36
  end
37
+ unless name.is_a?(String) || name.is_a?(Symbol)
38
+ $stderr.puts "no field name found for field_#{i} in #{flds}"
39
+ name = "field_#{i}"
40
+ end
36
41
  name_s = name.to_sym
42
+ name = name.to_s
37
43
  field = Field.new(name_s, i, type)
38
44
  @field_names[name] = field
39
45
  @field_names[name_s] = field
@@ -41,6 +47,7 @@ module Tarantool16
41
47
  @fields << field
42
48
  @has_tail = true if tail
43
49
  end
50
+ # refresh indices ?
44
51
  if @index_defs
45
52
  self.indices= @index_defs
46
53
  end
@@ -1,3 +1,3 @@
1
1
  module Tarantool16
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarantool16
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sokolov Yura aka funny_falcon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-06 00:00:00.000000000 Z
11
+ date: 2017-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project:
104
- rubygems_version: 2.5.1
104
+ rubygems_version: 2.5.2
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: adapter for Tarantool 1.6