cassanity 0.6.0.beta3 → 0.6.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
@@ -57,6 +57,10 @@ module Cassanity
57
57
  @driver.disconnect
58
58
  end
59
59
 
60
+ def connected?
61
+ @driver.connected?
62
+ end
63
+
60
64
  # Methods on client that should be delegated to connection.
61
65
  DelegateToConnectionMethods = [
62
66
  :keyspaces,
@@ -10,7 +10,7 @@ module Cassanity
10
10
  # disconnected to be reconnected.
11
11
  class ReconnectableDriver
12
12
  extend Forwardable
13
- def_delegators :@driver, :use, :execute, :keyspace
13
+ def_delegators :@driver, :use, :execute, :keyspace, :connected?
14
14
 
15
15
  def self.connect(cql_options = {})
16
16
  new(cql_options).tap(&:connect)
@@ -1,3 +1,3 @@
1
1
  module Cassanity
2
- VERSION = "0.6.0.beta3"
2
+ VERSION = "0.6.0.beta4"
3
3
  end
@@ -125,6 +125,15 @@ describe Cassanity::Client do
125
125
  end
126
126
  end
127
127
 
128
+ describe "#connected?" do
129
+ it "returns connected? value for driver" do
130
+ driver.should_receive(:connected?).and_return(true)
131
+
132
+ client = described_class.new
133
+ client.connected?.should be_true
134
+ end
135
+ end
136
+
128
137
  describe "#inspect" do
129
138
  it "return representation" do
130
139
  result = subject.inspect
@@ -39,4 +39,14 @@ describe Cassanity::Cql::ReconnectableDriver do
39
39
  driver.execute("query")
40
40
  end
41
41
  end
42
+
43
+ describe '#connected?' do
44
+ it 'forwards the message to the underlying driver' do
45
+ Cql::Client.stub(:connect => client)
46
+ driver = described_class.connect(:foo => "bar")
47
+
48
+ client.should_receive(:connected?).and_return(true)
49
+ driver.connected?.should be_true
50
+ end
51
+ end
42
52
  end
metadata CHANGED
@@ -1,38 +1,42 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cassanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.beta3
4
+ version: 0.6.0.beta4
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - John Nunemaker
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-12-09 00:00:00.000000000 Z
12
+ date: 2013-12-19 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: cql-rb
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.1'
20
- - - '>='
22
+ - - ! '>='
21
23
  - !ruby/object:Gem::Version
22
24
  version: 1.1.1
23
25
  type: :runtime
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
30
  - - ~>
28
31
  - !ruby/object:Gem::Version
29
32
  version: '1.1'
30
- - - '>='
33
+ - - ! '>='
31
34
  - !ruby/object:Gem::Version
32
35
  version: 1.1.1
33
36
  - !ruby/object:Gem::Dependency
34
37
  name: simple_uuid
35
38
  requirement: !ruby/object:Gem::Requirement
39
+ none: false
36
40
  requirements:
37
41
  - - ~>
38
42
  - !ruby/object:Gem::Version
@@ -40,6 +44,7 @@ dependencies:
40
44
  type: :development
41
45
  prerelease: false
42
46
  version_requirements: !ruby/object:Gem::Requirement
47
+ none: false
43
48
  requirements:
44
49
  - - ~>
45
50
  - !ruby/object:Gem::Version
@@ -200,26 +205,30 @@ files:
200
205
  - spec/unit/cassanity_spec.rb
201
206
  homepage: http://johnnunemaker.com/cassanity/
202
207
  licenses: []
203
- metadata: {}
204
208
  post_install_message:
205
209
  rdoc_options: []
206
210
  require_paths:
207
211
  - lib
208
212
  required_ruby_version: !ruby/object:Gem::Requirement
213
+ none: false
209
214
  requirements:
210
- - - '>='
215
+ - - ! '>='
211
216
  - !ruby/object:Gem::Version
212
217
  version: '0'
218
+ segments:
219
+ - 0
220
+ hash: -2788521586304756219
213
221
  required_rubygems_version: !ruby/object:Gem::Requirement
222
+ none: false
214
223
  requirements:
215
- - - '>'
224
+ - - ! '>'
216
225
  - !ruby/object:Gem::Version
217
226
  version: 1.3.1
218
227
  requirements: []
219
228
  rubyforge_project:
220
- rubygems_version: 2.0.3
229
+ rubygems_version: 1.8.23
221
230
  signing_key:
222
- specification_version: 4
231
+ specification_version: 3
223
232
  summary: Layer of goodness on top of cassandra-cql so you do not have to write CQL
224
233
  strings all over the place.
225
234
  test_files:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: f55c2651855af2b3beae8140f050e24ffce99b92
4
- data.tar.gz: 03ebc3e813d4e4b5875516fbb2dba386d965a1b6
5
- SHA512:
6
- metadata.gz: a53e35e81287014b86092ae6269ba89929610d3234194cf1c9d42d1af9a7d0ea99370a7022eab777c0bfb89f2541fe3e910482afad2a4f8dbe086393b35d9959
7
- data.tar.gz: b4aee0161df84024daff56121d12aa67810a08aa66f535ca79447bbb49dc11789d8d9b4181d93add6aed69d60701d8988139e2e826208e5288bd3d9999d1e599