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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f87cf99e6a474e1fbd9cc065f70b7d3fdf8d63e
4
- data.tar.gz: b80fdd81db181a37ce17307b766b8226b1d585f0
3
+ metadata.gz: 5feb7145adfe7370616cdd136bd0dfd38289909a
4
+ data.tar.gz: 87f59cd90a98235312a1f37349643d3d747fb279
5
5
  SHA512:
6
- metadata.gz: 55d6fee7b35ff8fe213842590551a8855c52b26213f6a90a3993d2165fb39dc6abad1a95c8d1262dfe123124d7a269c771b8a153bbba102b45397062812434c0
7
- data.tar.gz: 51e4d7e84544db2ca0fb9f36525167bf863847d31c7b10962fab41f45070e3e2cceec3733a00186c00e5034927b6bb6ebf215fd94f11a230b3b5de74a606e430
6
+ metadata.gz: ad0905549d2e290fee2342b238c6a72555f2fdaabca06211d1c18bfc322831a0aba31abeaf78e95c4fe8ddb6fc15890203a97e91c0e6795d3385724116e5dd20
7
+ data.tar.gz: fa8bffa79ebcba044822cf110eb8a3ac13189622d3dab7961c02a1c42a832a7222886fe668168289db65d98145aba7fffa4c855784b3c578d136da3ee3a4685d
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Kasket
3
- VERSION = '4.4.5'
3
+ VERSION = '4.5.0'
4
4
  class Version
5
5
  MAJOR = Kasket::VERSION.split('.')[0]
6
6
  MINOR = Kasket::VERSION.split('.')[1]
@@ -132,7 +132,11 @@ module Kasket
132
132
  end
133
133
 
134
134
  def visit_Arel_Nodes_Casted(node, *_)
135
- quoted(node.val) unless node.val.nil?
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.5
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-11 00:00:00.000000000 Z
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.6.13
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