kasket 4.7.0 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/kasket/configuration_mixin.rb +1 -1
- data/lib/kasket/read_mixin.rb +5 -1
- data/lib/kasket/relation_mixin.rb +1 -1
- data/lib/kasket/version.rb +1 -1
- data/lib/kasket/visitor.rb +6 -2
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e5cec0e5e944a74b977fd8e8113983160e1a5075eade70a499e6b16863abfde6
|
4
|
+
data.tar.gz: d9ee5a1d6a974e998191ad656b4b962b5a7ea74e0327be3944813790bf6e7e8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aca01c0f69b403d2476b5db05b610604899f2a38f450b0c29d8f19b60f5f2e3e67777c172690672ae83a1a4ce14e316c85175989d5dd4df826afdbf6b8e530c
|
7
|
+
data.tar.gz: 1645f52ca823c5c628d9fa5c1aba45393feffc9ac3f0c0e70e1552582bd55de79df20f8870f72deca67d8e0faae036d5fc5d1fa67b7be80dcf836d86808b7c68
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Kasket [![Build
|
1
|
+
# Kasket [![Build status](https://circleci.com/gh/zendesk/kasket.svg?style=svg)](https://circleci.com/gh/zendesk/kasket)
|
2
2
|
|
3
3
|
### Puts a cap on your queries
|
4
4
|
A caching layer for ActiveRecord (3.x and 4.x)
|
@@ -37,7 +37,7 @@ module Kasket
|
|
37
37
|
else
|
38
38
|
key = attribute_value_pairs.map do |attribute, value|
|
39
39
|
column = columns_hash[attribute.to_s]
|
40
|
-
value = nil if value.blank?
|
40
|
+
value = nil if value.blank? && value != false
|
41
41
|
"#{attribute}=#{kasket_quoted_value_for_column(value, column)}"
|
42
42
|
end.join('/')
|
43
43
|
|
data/lib/kasket/read_mixin.rb
CHANGED
@@ -16,7 +16,11 @@ module Kasket
|
|
16
16
|
if ActiveRecord::VERSION::MAJOR < 5
|
17
17
|
sql.to_kasket_query(self, args[1])
|
18
18
|
else
|
19
|
-
|
19
|
+
if ActiveRecord::VERSION::STRING < '5.2'
|
20
|
+
sql.to_kasket_query(self, args[1].map(&:value_for_database))
|
21
|
+
else
|
22
|
+
sql.to_kasket_query(self)
|
23
|
+
end
|
20
24
|
end
|
21
25
|
else
|
22
26
|
kasket_parser.parse(sanitize_sql(sql))
|
@@ -6,7 +6,7 @@ module Kasket
|
|
6
6
|
if ActiveRecord::VERSION::MAJOR < 5
|
7
7
|
arel.to_kasket_query(klass, (binds || bind_values))
|
8
8
|
else
|
9
|
-
arel.to_kasket_query(klass, (@values[:where].
|
9
|
+
arel.to_kasket_query(klass, (@values[:where].to_h.values + Array(@values[:limit])))
|
10
10
|
end
|
11
11
|
end
|
12
12
|
rescue TypeError # unsupported object in ast
|
data/lib/kasket/version.rb
CHANGED
data/lib/kasket/visitor.rb
CHANGED
@@ -119,11 +119,15 @@ module Kasket
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
-
def visit_Arel_Nodes_BindParam(
|
122
|
+
def visit_Arel_Nodes_BindParam(node, *_)
|
123
123
|
if ActiveRecord::VERSION::MAJOR < 5
|
124
124
|
visit(@binds.shift[1])
|
125
125
|
else
|
126
|
-
|
126
|
+
if ActiveRecord::VERSION::STRING < '5.2'
|
127
|
+
visit(@binds.shift)
|
128
|
+
else
|
129
|
+
visit(node.value.value) unless node.value.value.nil?
|
130
|
+
end
|
127
131
|
end
|
128
132
|
end
|
129
133
|
|
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.8.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:
|
12
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '4.2'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '6.1'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: '4.2'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '6.1'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rake
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,8 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
|
184
|
-
rubygems_version: 2.5.2
|
183
|
+
rubygems_version: 3.1.4
|
185
184
|
signing_key:
|
186
185
|
specification_version: 4
|
187
186
|
summary: A write back caching layer on active record
|