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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c67ae492640e6fff14a848754b829a4b9a401b77
4
- data.tar.gz: 33d881cb1e0cea757e940c5d149090ed15dc45ff
3
+ metadata.gz: 5b2b2f51d0f18215ca0c428ec4e90c168f904c67
4
+ data.tar.gz: 8b6d4afcb8706e7dc07cc957c59211f7d5baf37e
5
5
  SHA512:
6
- metadata.gz: 1b1a9d5cdb84a2ebb1d51a9df5810ddcb467ca6e36efba5c42c039a88aee9357323d7c390c7af992bcecc523725b2fcca62035433a4810b9f6bbf4cabfcff812
7
- data.tar.gz: 97a6bf840ccf1dc7c77128182c9800eba98834f8ca8896e4af8d5a6b858d37fcb00e62cbae9d3b6d10e8552a99e3a8b4b19424817312aaa90aebbd44e774c32d
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
@@ -1,5 +1,5 @@
1
1
  module Kasket
2
- VERSION = '4.4.0'
2
+ VERSION = '4.4.1'
3
3
  class Version
4
4
  MAJOR = Kasket::VERSION.split('.')[0]
5
5
  MINOR = Kasket::VERSION.split('.')[1]
@@ -94,8 +94,13 @@ module Kasket
94
94
  end
95
95
 
96
96
  def visit_Arel_Nodes_Equality(node, *_)
97
- right = node.right
98
- [visit(node.left), right ? visit(right) : nil]
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.0
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-06 00:00:00.000000000 Z
12
+ date: 2017-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord