ciql 0.2.3 → 0.2.4

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: 2d8ad0ff919e0b19dfe689fb9e056bc5cee2b3c9
4
- data.tar.gz: 390c331d402db1d6eae4fa2e3a9d794488f15884
3
+ metadata.gz: bef8937cc139e4f15b216b8d4c2a9803feab92d8
4
+ data.tar.gz: 4498237edc0cf34018bd3ab4603c45fdf875bf2b
5
5
  SHA512:
6
- metadata.gz: 9bf17ecca6c90533e1d917021d161bf621f40326d9bae0cf82477db0952c4a207925313a6857d4a5251ac8c7969f8f94508d8a76d5522f5e5cdcd87412a4ac83
7
- data.tar.gz: fa9b5e2031762c9e2d2068956841c3e358a6c681ecc8857eb31a51e2bc0b31fe57774bfc2cf701b753ea44c35ec897b035d2facf90f92637cd8406735bf873a4
6
+ metadata.gz: 39f86c6452055ecbc701ce16eb6cfc4419b2b0d938e7161b8658ef23d7c5453d2b57803a1a605c29c0a542c75474ec87d9e2acdb5b5151be8a5ff488409f7866
7
+ data.tar.gz: ef5eba045ce56c4dcbcb8c375e035f5799329d989f3aca1d10ba8e0f4b44869de11fad4b7e96d0d8e3afc0f6b74099a775ec76ebfa32c035971e1ce436081790
@@ -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
- super(hosts_with_port, options)
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
@@ -1,3 +1,3 @@
1
1
  module Ciql
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
@@ -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.3
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-07-02 00:00:00.000000000 Z
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.2
94
+ rubygems_version: 2.0.3
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: CQL Cassandra client for Ruby