riak-client 2.3.1 → 2.3.2

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: 1b5ed7456c2e32f4778aaae11cfef9d56563f726
4
- data.tar.gz: ce022ab4fee296be7eeb2b88b551a74592bda77d
3
+ metadata.gz: 801f389ebb664f16d07a1f8ece1f0f43c630764f
4
+ data.tar.gz: 607a42223cd90d60b5d45bb99e82e443b612975a
5
5
  SHA512:
6
- metadata.gz: 5e9a483f5cf12ddd801d0f2f6973fb9b9299e2e96c22e011e74783e57976716f61b31d4d4f929f812124d6e0589cb2bddf806fceb218ae0bbec84a174115f832
7
- data.tar.gz: a1eff3a59c308f4026dc41c8e01f5583b865b1fd9cfaa73ad224b63d5107db65a8cfa43408cd32f41847b38377fca4e65e1a0a97b7e2e807c86cbe84efb6a0fa
6
+ metadata.gz: 6295481b6c846aa7836e73589bf3ce75d4afbfe517594c67bcaa93d99e03eb189a833f0b234242a380b4e6ee945ca1520fa117270f8ffb7d56d2ac180e8f05bd
7
+ data.tar.gz: 9d021d51f71193b367dee6b9951107238db9b616eec9b25119b8f59ba072eb00b5452c9b17335f0c8d43714f5efeb2e272ccc4f3ace231f77c79112fd54cba16
data/RELEASE_NOTES.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Riak Ruby Client Release Notes
2
2
 
3
- ## 2.3.1 Release - 2016-01-12
3
+ ## 2.3.2 Release - 2016-01-12
4
4
 
5
- Version 2.3.1 is a bugfix release with a small fix in support of the Riak TS
5
+ Version 2.3.2 is a bugfix release with a small fix in support of the Riak TS
6
6
  time series database.
7
7
 
8
8
  * Queries that return no data will return an empty collection.
9
9
 
10
- New features:
11
-
12
10
  ## 2.3.0 Release - 2015-12-15
13
11
 
14
12
  Version 2.3.0 is a feature release, introducing support for the Riak TS time
@@ -18,7 +18,7 @@ class Riak::Client::BeefcakeProtobuffsBackend
18
18
  p.expect :TsQueryResp, TsQueryResp, empty_body_acceptable: true
19
19
  end
20
20
 
21
- return nil if :empty == result
21
+ return [] if :empty == result
22
22
 
23
23
  codec = TsCellCodec.new
24
24
 
data/lib/riak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Riak
2
- VERSION = "2.3.1"
2
+ VERSION = "2.3.2"
3
3
  end
@@ -38,7 +38,8 @@ WHERE
38
38
  #{now_range_str}
39
39
  SQL
40
40
  end
41
- let(:no_data_query) do
41
+
42
+ let(:no_data_query) do
42
43
  <<-SQL
43
44
  SELECT * FROM #{table_name}
44
45
  WHERE
@@ -47,6 +48,26 @@ WHERE
47
48
  SQL
48
49
  end
49
50
 
51
+ let(:describe_table) do
52
+ "DESCRIBE #{table_name}"
53
+ end
54
+
55
+ let(:create_table) do
56
+ <<-SQL
57
+ CREATE TABLE timeseries-#{random_key} (
58
+ geohash varchar not null,
59
+ user varchar not null,
60
+ time timestamp not null,
61
+ weather varchar not null,
62
+ temperature double,
63
+ PRIMARY KEY(
64
+ (geohash, user, quantum(time, 15, m)),
65
+ geohash, user, time
66
+ )
67
+ )
68
+ SQL
69
+ end
70
+
50
71
  let(:stored_datum_expectation) do
51
72
  submission = Riak::TimeSeries::Submission.new test_client, table_name
52
73
  submission.measurements = [datum]
@@ -59,6 +80,27 @@ SQL
59
80
  expect{ submission.write! }.to_not raise_error
60
81
  end
61
82
 
83
+ describe 'create table via query' do
84
+ subject{ Riak::TimeSeries::Query.new test_client, create_table }
85
+
86
+ it 'creates a new table without error' do
87
+ expect{ subject.issue! }.to_not raise_error
88
+ expect(subject.results).to be
89
+ expect(subject.results).to be_empty
90
+ end
91
+ end
92
+
93
+ describe 'describe table via query' do
94
+ subject{ Riak::TimeSeries::Query.new test_client, describe_table }
95
+
96
+ it 'describes a table without error' do
97
+ expect{ subject.issue! }.to_not raise_error
98
+ expect(subject.results).to be
99
+ expect(subject.results).to_not be_empty
100
+ expect(subject.results.columns).to_not be_empty
101
+ end
102
+ end
103
+
62
104
  describe 'query interface' do
63
105
  subject{ Riak::TimeSeries::Query.new test_client, query }
64
106
  let(:subject_without_data) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riak-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryce Kerley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-12 00:00:00.000000000 Z
11
+ date: 2016-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec