kasket 4.4.5 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kasket/version.rb +1 -1
- data/lib/kasket/visitor.rb +7 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5feb7145adfe7370616cdd136bd0dfd38289909a
|
4
|
+
data.tar.gz: 87f59cd90a98235312a1f37349643d3d747fb279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad0905549d2e290fee2342b238c6a72555f2fdaabca06211d1c18bfc322831a0aba31abeaf78e95c4fe8ddb6fc15890203a97e91c0e6795d3385724116e5dd20
|
7
|
+
data.tar.gz: fa8bffa79ebcba044822cf110eb8a3ac13189622d3dab7961c02a1c42a832a7222886fe668168289db65d98145aba7fffa4c855784b3c578d136da3ee3a4685d
|
data/lib/kasket/version.rb
CHANGED
data/lib/kasket/visitor.rb
CHANGED
@@ -132,7 +132,11 @@ module Kasket
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def visit_Arel_Nodes_Casted(node, *_)
|
135
|
-
|
135
|
+
case node.val
|
136
|
+
when nil then nil
|
137
|
+
when String then node.val
|
138
|
+
else quoted(node.val)
|
139
|
+
end
|
136
140
|
end
|
137
141
|
|
138
142
|
def visit_TrueClass(_node)
|
@@ -144,7 +148,6 @@ module Kasket
|
|
144
148
|
end
|
145
149
|
|
146
150
|
def quoted(node)
|
147
|
-
return node if node.is_a?(String)
|
148
151
|
@model_class.connection.quote(node)
|
149
152
|
end
|
150
153
|
|
@@ -155,6 +158,8 @@ module Kasket
|
|
155
158
|
|
156
159
|
alias_method :visit_String, :literal
|
157
160
|
alias_method :visit_Fixnum, :literal
|
161
|
+
alias_method :visit_Integer, :literal
|
162
|
+
alias_method :visit_Bignum, :literal
|
158
163
|
alias_method :visit_Arel_Nodes_SqlLiteral, :literal
|
159
164
|
end
|
160
165
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kasket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-10-
|
12
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.5.1
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: A write back caching layer on active record
|