ciql 0.2.3 → 0.2.4
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.
- checksums.yaml +4 -4
- data/lib/ciql/client/thrift.rb +2 -1
- data/lib/ciql/version.rb +1 -1
- data/spec/ciql/client/thrift_spec.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bef8937cc139e4f15b216b8d4c2a9803feab92d8
|
4
|
+
data.tar.gz: 4498237edc0cf34018bd3ab4603c45fdf875bf2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f86c6452055ecbc701ce16eb6cfc4419b2b0d938e7161b8658ef23d7c5453d2b57803a1a605c29c0a542c75474ec87d9e2acdb5b5151be8a5ff488409f7866
|
7
|
+
data.tar.gz: ef5eba045ce56c4dcbcb8c375e035f5799329d989f3aca1d10ba8e0f4b44869de11fad4b7e96d0d8e3afc0f6b74099a775ec76ebfa32c035971e1ce436081790
|
data/lib/ciql/client/thrift.rb
CHANGED
@@ -15,7 +15,8 @@ module Ciql::Client
|
|
15
15
|
port = options.delete(:port) { 9160 }
|
16
16
|
hosts = options.delete(:host) { '127.0.0.1' }.split(',')
|
17
17
|
hosts_with_port = hosts.map { |host| [host, port].join(':') }
|
18
|
-
|
18
|
+
retries = options.delete(:retries) { 2 }
|
19
|
+
super(hosts_with_port, options, retries: retries)
|
19
20
|
end
|
20
21
|
|
21
22
|
def execute(statement, *arguments)
|
data/lib/ciql/version.rb
CHANGED
@@ -14,6 +14,15 @@ module Ciql::Client
|
|
14
14
|
subject.should be_kind_of CassandraCQL::Database
|
15
15
|
end
|
16
16
|
|
17
|
+
it 'defaults to two retries on connection exceptions' do
|
18
|
+
subject.instance_variable_get(:@thrift_client_options)[:retries].should eq 2
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'accepts :retries as an option' do
|
22
|
+
instance = described_class.new(log: logger, retries: 5)
|
23
|
+
instance.instance_variable_get(:@thrift_client_options)[:retries].should eq 5
|
24
|
+
end
|
25
|
+
|
17
26
|
describe '#execute' do
|
18
27
|
it 'logs the query' do
|
19
28
|
subject # instantiate
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ciql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Bradford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cassandra-cql
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.0.
|
94
|
+
rubygems_version: 2.0.3
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: CQL Cassandra client for Ruby
|