tarantool 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,12 +6,15 @@ class Tarantool
6
6
  end
7
7
 
8
8
  def to_i
9
- if data.bytesize == 4
10
- data.unpack('L')[0]
11
- elsif data.bytesize == 8
9
+ case data.bytesize
10
+ when 8
12
11
  data.unpack('Q')[0]
12
+ when 4
13
+ data.unpack('L')[0]
14
+ when 2
15
+ data.unpack('S')[0]
13
16
  else
14
- raise ValueError.new("Unable to cast field to int: length must be 4 or 8 bytes, field length is #{data.size}")
17
+ raise ValueError.new("Unable to cast field to int: length must be 2, 4 or 8 bytes, field length is #{data.size}")
15
18
  end
16
19
  end
17
20
 
data/lib/tarantool.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'iproto'
3
3
 
4
4
  class Tarantool
5
- VERSION = '0.2.2'
5
+ VERSION = '0.2.3'
6
6
 
7
7
  require 'tarantool/space'
8
8
  require 'tarantool/requests'
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.2'
8
- s.date = '2012-01-30'
7
+ s.version = '0.2.3'
8
+ s.date = '2012-02-24'
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.2
4
+ version: 0.2.3
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-01-30 00:00:00.000000000Z
12
+ date: 2012-02-24 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: iproto
16
- requirement: &70164633669320 !ruby/object:Gem::Requirement
16
+ requirement: &70193355842780 !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: *70164633669320
24
+ version_requirements: *70193355842780
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activemodel
27
- requirement: &70164633668620 !ruby/object:Gem::Requirement
27
+ requirement: &70193355842080 !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: *70164633668620
38
+ version_requirements: *70193355842080
39
39
  description: Tarantool KV-storage client.
40
40
  email: ceo@prepor.ru
41
41
  executables: []