que 0.14.0 → 0.14.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/que/adapters/base.rb +7 -1
- data/lib/que/version.rb +1 -1
- data/spec/support/shared_examples/adapter.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dad50627f82edb14529d66b00f009f61f8cce6ad
|
|
4
|
+
data.tar.gz: 5644e3ae8518c25e14ddc3381973dc81374e32f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4f23840e1d4c2143d9fe66a672659421af2a01f321a5a29abf9019f1b79c57a91832f6211c2d0dfd6a793c9e9ba7cc6d8ae44f5d4d925844106f6af7b1193d1
|
|
7
|
+
data.tar.gz: 203489a4d1e2fbcd3b6c6e3f4e54f5e9c5cb0df11b32f392fc65a5a5feae969694001e4fdfbf778afb4a50dddc666054e23bc7704b22f273c2a006aca6c3f5e0
|
data/CHANGELOG.md
CHANGED
data/lib/que/adapters/base.rb
CHANGED
|
@@ -105,7 +105,13 @@ module Que
|
|
|
105
105
|
CAST_PROCS[114] = -> (value) { JSON.parse(value, create_additions: false) }
|
|
106
106
|
|
|
107
107
|
# Boolean:
|
|
108
|
-
CAST_PROCS[16] =
|
|
108
|
+
CAST_PROCS[16] = -> (value) {
|
|
109
|
+
case value
|
|
110
|
+
when String then value == 't'
|
|
111
|
+
when TrueClass, FalseClass then value
|
|
112
|
+
else raise "Unexpected boolean value: #{value.inspect} (#{value.class})"
|
|
113
|
+
end
|
|
114
|
+
}
|
|
109
115
|
|
|
110
116
|
def cast_result(result)
|
|
111
117
|
output = result.to_a
|
data/lib/que/version.rb
CHANGED
|
@@ -7,6 +7,11 @@ shared_examples "a Que adapter" do
|
|
|
7
7
|
result.first[:one].should == 1
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
it "should be able to cast boolean results properly" do
|
|
11
|
+
r = Que.execute("SELECT true AS true_value, false AS false_value")
|
|
12
|
+
r.should == [{'true_value' => true, 'false_value' => false}]
|
|
13
|
+
end
|
|
14
|
+
|
|
10
15
|
it "should be able to execute multiple SQL statements in one string" do
|
|
11
16
|
Que.execute("SELECT 1 AS one; SELECT 1 AS one")
|
|
12
17
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: que
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.
|
|
4
|
+
version: 0.14.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Hanks
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|