ciql 0.2.2 → 0.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7db3d33bb56c654865ff2e3ad3e46f6798c3093b
4
- data.tar.gz: b4eccb76bd74c58d5e9be208b92d6c9b9bb9db29
3
+ metadata.gz: 2d8ad0ff919e0b19dfe689fb9e056bc5cee2b3c9
4
+ data.tar.gz: 390c331d402db1d6eae4fa2e3a9d794488f15884
5
5
  SHA512:
6
- metadata.gz: bb62bd623430c38c570892686f993b329b82dd7d35b709bbf6e35563f6a830eb7417ff86eccdd76db2f2325ce71b1e786f0e6ed9e31ca76bed099673310c5482
7
- data.tar.gz: dc9ec7029fbfd82c131d665dc2a3cb157d9af6819a7b40c821c275ecb1c16ab454073d09b362f15d4337ea5f6394b031f39195be19b6daf1a4fc08ab2f9174db
6
+ metadata.gz: 9bf17ecca6c90533e1d917021d161bf621f40326d9bae0cf82477db0952c4a207925313a6857d4a5251ac8c7969f8f94508d8a76d5522f5e5cdcd87412a4ac83
7
+ data.tar.gz: fa9b5e2031762c9e2d2068956841c3e358a6c681ecc8857eb31a51e2bc0b31fe57774bfc2cf701b753ea44c35ec897b035d2facf90f92637cd8406735bf873a4
data/lib/ciql/sanitize.rb CHANGED
@@ -34,6 +34,7 @@ module Ciql
34
34
  when Enumerable
35
35
  obj.map { |member| cast(member) }.join(',')
36
36
 
37
+ when NilClass then 'NULL'
37
38
  when Numeric then obj
38
39
  when DateTime, Time then obj.strftime('%s%3N').to_i
39
40
  when Date then quote(obj.strftime('%Y-%m-%d'))
data/lib/ciql/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ciql
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.3'.freeze
3
3
  end
@@ -47,6 +47,10 @@ module Ciql
47
47
  subject.sanitize('? ?', 1, 2.1).should == '1 2.1'
48
48
  end
49
49
 
50
+ it 'converts nil to NULL' do
51
+ subject.sanitize('?', nil).should == 'NULL'
52
+ end
53
+
50
54
  it 'quotes strings' do
51
55
  subject.sanitize('?', 'string').should == "'string'"
52
56
  end
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.2
4
+ version: 0.2.3
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-06-25 00:00:00.000000000 Z
11
+ date: 2013-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cassandra-cql