cequel 1.3.0 → 1.3.1

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: bcbe817545ecdf0979da9b91e5e790965efdf8c4
4
- data.tar.gz: acaede9ff87f4f1c379ab0f47dcba0f110905b45
3
+ metadata.gz: 8ee94e15c942005f32077593e9518db59d425ec8
4
+ data.tar.gz: a8509b1748bc988890d99520bce4d2a89b1c0c86
5
5
  SHA512:
6
- metadata.gz: 17b5623a4df15734d13f9c8d6bcef023d3b5a814582827260448a989c25832d4f95f8eda338a7bb322a5aeecc5e9ec04b6714b510719ec43d0e4531eaa84cca9
7
- data.tar.gz: f75aac91c4ea18db149196aeaf3024a014bf5decc6a258b232c8c4c98fe2f41334d75d04b707d0ac459f990d104c606f68cd8717d2b3ab1954cd92cd098ca7d4
6
+ metadata.gz: 9c689b0b7db31b588fdc41d750b7e718cf472b72862cf76f372f3ceb1ddafe38b19e786c960fb4cdfaaba3d8249cdf68ff676ef3b521070230e0bef18fce30ae
7
+ data.tar.gz: 3df5b7b2591cf860f064c56cfcfa4e68b27e95317725301e0699d6972693f4f9b7195b316766c8b896c8abd9726657bb924f54b208a915e221d6d296475c7744
data/Appraisals CHANGED
@@ -19,3 +19,11 @@ end
19
19
  appraise "thrift" do
20
20
  gem "cassandra-cql", "~> 1.2"
21
21
  end
22
+
23
+ appraise "cql-rb-1" do
24
+ gem "cql-rb", "~> 1.2"
25
+ end
26
+
27
+ appraise "cql-rb-2" do
28
+ gem "cql-rb", "~> 2.0"
29
+ end
@@ -1,3 +1,8 @@
1
+ ## 1.3.1
2
+
3
+ * Allow querying by both primary key and secondary index in `RecordSet`
4
+ * Expand cql-rb dependency to allow 2.0
5
+
1
6
  ## 1.3.0
2
7
 
3
8
  * Add timestamps functionality (`created_at` and `updated_at`)
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cequel (1.3.0)
4
+ cequel (1.3.1)
5
5
  activemodel (>= 3.1, < 5.0)
6
- cql-rb (~> 1.2)
6
+ cql-rb (>= 1.2, < 3.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -27,7 +27,8 @@ GEM
27
27
  debugger-linecache (~> 1.2)
28
28
  coderay (1.1.0)
29
29
  columnize (0.8.9)
30
- cql-rb (1.2.2)
30
+ cql-rb (2.0.0)
31
+ ione (~> 1)
31
32
  debugger (1.6.6)
32
33
  columnize (>= 0.3.1)
33
34
  debugger-linecache (~> 1.2.0)
@@ -38,6 +39,7 @@ GEM
38
39
  ffi (1.9.3-java)
39
40
  ffi2-generators (0.1.1)
40
41
  i18n (0.6.9)
42
+ ione (1.1.2)
41
43
  json (1.8.1)
42
44
  json (1.8.1-java)
43
45
  method_source (0.8.2)
data/README.md CHANGED
@@ -563,6 +563,7 @@ Cequel was written by:
563
563
  * Dan Cardamore
564
564
  * Kei Kusakari
565
565
  * Oleh Novosad
566
+ * John Smart
566
567
 
567
568
  Special thanks to [Brewster](https://www.brewster.com), which supported the 0.x
568
569
  releases of Cequel.
@@ -136,7 +136,7 @@ exec /opt/apache-cassandra-$1/bin/cassandra" > /etc/init/cassandra.conf
136
136
  service cassandra start
137
137
  SH
138
138
 
139
- versions = (0..7).map { |p| "2.0.#{p}" } + (0..16).map { |p| "1.2.#{p}" }
139
+ versions = (0..8).map { |p| "2.0.#{p}" } + (0..16).map { |p| "1.2.#{p}" }
140
140
  versions.each do |version|
141
141
  java_version = version =~ /^1/ ? '6' : '7'
142
142
  config.vm.define version do |machine|
@@ -724,10 +724,6 @@ module Cequel
724
724
  end
725
725
 
726
726
  def filter_primary_key(value)
727
- if scoped_indexed_column
728
- fail IllegalQuery,
729
- "Can't filter by both primary key and secondary index"
730
- end
731
727
  if value.is_a?(Range)
732
728
  self.in(value)
733
729
  else
@@ -749,10 +745,6 @@ module Cequel
749
745
  "Can't scope key column #{column_name} without also scoping " \
750
746
  "#{missing_column_names.join(', ')}"
751
747
  end
752
- if scoped_key_values.any?
753
- fail IllegalQuery,
754
- "Can't filter by both primary key and secondary index"
755
- end
756
748
  if scoped_indexed_column
757
749
  fail IllegalQuery,
758
750
  "Can't scope by more than one indexed column in the same query"
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Cequel
3
3
  # The current version of the library
4
- VERSION = '1.3.0'
4
+ VERSION = '1.3.1'
5
5
  end
@@ -729,22 +729,21 @@ describe Cequel::Record::RecordSet do
729
729
  end
730
730
 
731
731
  context 'mixing keys and secondary-indexed columns' do
732
- it 'should not allow mixture in hash argument' do
733
- expect { Post.where(blog_subdomain: 'cassandra',
734
- author_id: uuids.first) }
735
- .to raise_error(Cequel::Record::IllegalQuery)
732
+ it 'should allow mixture in hash argument' do
733
+ Post.where(blog_subdomain: 'cassandra', author_id: uuids.first).
734
+ should have(3).entries
736
735
  end
737
736
 
738
- it 'should not allow mixture in chain with primary first' do
739
- expect { Post.where(blog_subdomain: 'cassandra')
740
- .where(author_id: uuids.first) }
741
- .to raise_error(Cequel::Record::IllegalQuery)
737
+ it 'should allow mixture in chain with primary first' do
738
+ Post.where(blog_subdomain: 'cassandra')
739
+ .where(author_id: uuids.first)
740
+ .should have(3).entries
742
741
  end
743
742
 
744
- it 'should not allow mixture in chain with secondary first' do
745
- expect { Post.where(author_id: uuids.first)
746
- .where(blog_subdomain: 'cassandra') }
747
- .to raise_error(Cequel::Record::IllegalQuery)
743
+ it 'should allow mixture in chain with secondary first' do
744
+ Post.where(author_id: uuids.first)
745
+ .where(blog_subdomain: 'cassandra')
746
+ .should have(3).entries
748
747
  end
749
748
  end
750
749
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -16,10 +16,11 @@ authors:
16
16
  - Dan Cardamore
17
17
  - Kei Kusakari
18
18
  - Oleh Novosad
19
+ - John Smart
19
20
  autorequire:
20
21
  bindir: bin
21
22
  cert_chain: []
22
- date: 2014-05-29 00:00:00.000000000 Z
23
+ date: 2014-05-30 00:00:00.000000000 Z
23
24
  dependencies:
24
25
  - !ruby/object:Gem::Dependency
25
26
  name: activemodel
@@ -45,16 +46,22 @@ dependencies:
45
46
  name: cql-rb
46
47
  requirement: !ruby/object:Gem::Requirement
47
48
  requirements:
48
- - - "~>"
49
+ - - ">="
49
50
  - !ruby/object:Gem::Version
50
51
  version: '1.2'
52
+ - - "<"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
51
55
  type: :runtime
52
56
  prerelease: false
53
57
  version_requirements: !ruby/object:Gem::Requirement
54
58
  requirements:
55
- - - "~>"
59
+ - - ">="
56
60
  - !ruby/object:Gem::Version
57
61
  version: '1.2'
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '3.0'
58
65
  - !ruby/object:Gem::Dependency
59
66
  name: appraisal
60
67
  requirement: !ruby/object:Gem::Requirement