kasket 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kasket/configuration_mixin.rb +5 -1
- data/lib/kasket/version.rb +1 -1
- data/lib/kasket/visitor.rb +15 -4
- 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: 5b2b2f51d0f18215ca0c428ec4e90c168f904c67
|
4
|
+
data.tar.gz: 8b6d4afcb8706e7dc07cc957c59211f7d5baf37e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f242846bf9dfc20d05ebcd91568fceb27c721ff4821ed0b54159789aae4054e08bf4f500e7b2d32d658f49b889edc116d2b5e63f573d1a4d0c0aaf806e0ba60
|
7
|
+
data.tar.gz: a9992b70c8ebb9cb59c31eac918b20e172cb09157882d6b6d671c46d118c43a6762d8fb3586cf4a6beada4ed54f3dcc2d0333aafb7722cacfe42bb19a6ed8134
|
@@ -52,7 +52,11 @@ module Kasket
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def kasket_indices
|
55
|
-
result = @kasket_indices
|
55
|
+
result = if defined?(@kasket_indices) && @kasket_indices
|
56
|
+
@kasket_indices
|
57
|
+
else
|
58
|
+
[]
|
59
|
+
end
|
56
60
|
result += superclass.kasket_indices unless self == ActiveRecord::Base
|
57
61
|
result.uniq
|
58
62
|
end
|
data/lib/kasket/version.rb
CHANGED
data/lib/kasket/visitor.rb
CHANGED
@@ -94,8 +94,13 @@ module Kasket
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def visit_Arel_Nodes_Equality(node, *_)
|
97
|
-
right = node.right
|
98
|
-
|
97
|
+
right = case node.right
|
98
|
+
when false then 0 # This should probably be removed when Rails 3.2 is not supported anymore
|
99
|
+
when nil then nil
|
100
|
+
else
|
101
|
+
visit(node.right)
|
102
|
+
end
|
103
|
+
[visit(node.left), right]
|
99
104
|
end
|
100
105
|
|
101
106
|
def visit_Arel_Attributes_Attribute(node, *_)
|
@@ -128,14 +133,20 @@ module Kasket
|
|
128
133
|
quoted(node.val) unless node.val.nil?
|
129
134
|
end
|
130
135
|
|
136
|
+
def visit_TrueClass(node)
|
137
|
+
1
|
138
|
+
end
|
139
|
+
|
140
|
+
def visit_FalseClass(node)
|
141
|
+
0
|
142
|
+
end
|
143
|
+
|
131
144
|
def quoted(node)
|
132
145
|
@model_class.connection.quote(node)
|
133
146
|
end
|
134
147
|
|
135
148
|
alias :visit_String :literal
|
136
149
|
alias :visit_Fixnum :literal
|
137
|
-
alias :visit_TrueClass :literal
|
138
|
-
alias :visit_FalseClass :literal
|
139
150
|
alias :visit_Arel_Nodes_SqlLiteral :literal
|
140
151
|
end
|
141
152
|
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.
|
4
|
+
version: 4.4.1
|
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-07-
|
12
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|