cql-rb 1.0.0.pre5 → 1.0.0.pre6

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.
@@ -4,15 +4,22 @@ require 'bundler/setup'
4
4
  require 'simplecov'; SimpleCov.start
5
5
  require 'cql'
6
6
 
7
- ENV['CASSANDRA_HOST'] ||= 'localhost'
7
+ ENV['CASSANDRA_HOST'] ||= '127.0.0.1'
8
8
 
9
- SimpleCov.start do
10
- add_group 'Source', 'lib'
11
- add_group 'Unit tests', 'spec/cql'
12
- add_group 'Integration tests', 'spec/integration'
13
- add_group 'Test support', 'spec/support'
9
+ require 'bundler/setup'
10
+
11
+ unless ENV['COVERAGE'] == 'no'
12
+ require 'simplecov'
13
+ SimpleCov.start do
14
+ add_group 'Source', 'lib'
15
+ add_group 'Unit tests', 'spec/cql'
16
+ add_group 'Integration tests', 'spec/integration'
17
+ add_group 'Test support', 'spec/support'
18
+ end
14
19
  end
15
20
 
21
+ require 'cql'
22
+
16
23
  require 'support/bytes_helper'
17
24
  require 'support/await_helper'
18
25
  require 'support/fake_server'
@@ -2,6 +2,6 @@
2
2
 
3
3
  RSpec::Matchers.define :eql_bytes do |expected|
4
4
  match do |actual|
5
- actual.unpack('c*') == expected.unpack('c*')
5
+ actual.to_s.unpack('c*') == expected.to_s.unpack('c*')
6
6
  end
7
7
  end
@@ -48,11 +48,19 @@ class FakeServer
48
48
  end
49
49
 
50
50
  def await_connects!(n=1)
51
- sleep(0.01) until @connects >= n
51
+ started_at = Time.now
52
+ until @connects >= n
53
+ sleep(0.01)
54
+ raise 'Waited longer than 5s!' if (Time.now - started_at) > 5
55
+ end
52
56
  end
53
57
 
54
58
  def await_disconnects!(n=1)
55
- sleep(0.01) until @disconnects >= n
59
+ started_at = Time.now
60
+ until @disconnects >= n
61
+ sleep(0.01)
62
+ raise 'Waited longer than 5s!' if (Time.now - started_at) > 5
63
+ end
56
64
  end
57
65
 
58
66
  def received_bytes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cql-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre5
4
+ version: 1.0.0.pre6
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-05-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A pure Ruby CQL3 driver for Cassandra
15
15
  email:
@@ -18,6 +18,7 @@ executables: []
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - lib/cql/byte_buffer.rb
21
22
  - lib/cql/client.rb
22
23
  - lib/cql/future.rb
23
24
  - lib/cql/io/io_reactor.rb
@@ -33,6 +34,7 @@ files:
33
34
  - lib/cql.rb
34
35
  - bin/cqlexec
35
36
  - README.md
37
+ - spec/cql/byte_buffer_spec.rb
36
38
  - spec/cql/client_spec.rb
37
39
  - spec/cql/future_spec.rb
38
40
  - spec/cql/io/io_reactor_spec.rb
@@ -75,6 +77,7 @@ signing_key:
75
77
  specification_version: 3
76
78
  summary: Cassandra CQL3 driver
77
79
  test_files:
80
+ - spec/cql/byte_buffer_spec.rb
78
81
  - spec/cql/client_spec.rb
79
82
  - spec/cql/future_spec.rb
80
83
  - spec/cql/io/io_reactor_spec.rb