aerospike 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +2 -2
- data/lib/aerospike/cluster/connection.rb +10 -6
- data/lib/aerospike/value/value.rb +6 -0
- data/lib/aerospike/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12f8781a2331d9c34b1fc9261727737ebcd1cbba
|
4
|
+
data.tar.gz: bb73b4c41ad28ddb71e0595a3d5b66c6cb3ca634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d7941776ada54e3c14fa305577e657a526b25393c3df206d783759b3e44075563ae8bec0f49b1ecd27b4278a06be685c6e94bccec54ade7b3cdb89ae8023c5
|
7
|
+
data.tar.gz: 762682e172f8d2ef156130ab6ac56fcf0799e4655ddca309aa7cf3bfcefd687632624cf94f0fa1eb73d794339f6ea868b6c7af7e3a92195ff99fe5f68c198c44
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## March 24 2015 (1.0.3)
|
2
|
+
|
3
|
+
Minor fixes and improvements.
|
4
|
+
|
5
|
+
* **New Features**:
|
6
|
+
|
7
|
+
* Symbols are now accepted as key values. Keep in mind that symbols are converted to string automatically, and type information is lost.
|
8
|
+
|
9
|
+
* **Fixes**:
|
10
|
+
|
11
|
+
* Wait for a good connection on `socket.connect_nonblock` to prevent infinite loops on read/write operations.
|
12
|
+
|
13
|
+
|
1
14
|
## March 14 2015 (1.0.2)
|
2
15
|
|
3
16
|
Minor improvements.
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
An Aerospike library for Ruby.
|
4
4
|
|
5
|
-
This library is compatible with Ruby 1.9.3+ and supports Linux, Mac OS X and various other BSDs. Rubinius is supported, but not JRuby - yet.
|
5
|
+
This library is compatible with Ruby 1.9.3+ and supports Linux, Mac OS X and various other BSDs. Rubinius is supported, but not JRuby - yet.
|
6
6
|
|
7
7
|
|
8
8
|
- [Usage](#Usage)
|
@@ -79,7 +79,7 @@ Supported operating systems:
|
|
79
79
|
1. Install Ruby 1.9.3+
|
80
80
|
2. Install RubyGems
|
81
81
|
3. Install Bundler: ```gem install bundler```
|
82
|
-
4. Install dependencies: ```
|
82
|
+
4. Install dependencies: ```bundler install```
|
83
83
|
5. Build and Install the gem locally: ```rake build && rake install```
|
84
84
|
6. Run the benchmark: ```./tools/benchmark/benchmark.rb -u```
|
85
85
|
|
@@ -34,14 +34,18 @@ module Aerospike
|
|
34
34
|
|
35
35
|
def connect(host, port, timeout)
|
36
36
|
socket = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
|
37
|
-
sockaddr = Socket.sockaddr_in(port, host)
|
37
|
+
@sockaddr = Socket.sockaddr_in(port, host)
|
38
38
|
begin
|
39
|
-
socket.connect_nonblock(sockaddr)
|
40
|
-
|
39
|
+
socket.connect_nonblock(@sockaddr)
|
40
|
+
socket
|
41
|
+
rescue IO::WaitWritable, Errno::EINPROGRESS
|
41
42
|
# Block until the socket is ready, then try again
|
42
|
-
IO.select(
|
43
|
-
|
44
|
-
|
43
|
+
IO.select(nil, [socket], nil, timeout.to_f)
|
44
|
+
begin
|
45
|
+
socket.connect_nonblock(@sockaddr)
|
46
|
+
rescue Errno::EISCONN
|
47
|
+
end
|
48
|
+
socket
|
45
49
|
end
|
46
50
|
end
|
47
51
|
|
@@ -53,6 +53,8 @@ module Aerospike
|
|
53
53
|
end
|
54
54
|
when String
|
55
55
|
res = StringValue.new(value)
|
56
|
+
when Symbol
|
57
|
+
res = StringValue.new(value.to_s)
|
56
58
|
when Value
|
57
59
|
res = value
|
58
60
|
when Hash
|
@@ -185,6 +187,10 @@ module Aerospike
|
|
185
187
|
@value
|
186
188
|
end
|
187
189
|
|
190
|
+
def to_sym
|
191
|
+
@value.to_sym
|
192
|
+
end
|
193
|
+
|
188
194
|
end # StringValue
|
189
195
|
|
190
196
|
#######################################
|
data/lib/aerospike/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aerospike
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Khosrow Afroozeh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|