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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 119e76371f98f3a1671d49a8de484055ce6b2b0f
4
- data.tar.gz: d7e0d18e9accfcc3eb92a36822ff3c036d5f747a
2
+ SHA256:
3
+ metadata.gz: e5cec0e5e944a74b977fd8e8113983160e1a5075eade70a499e6b16863abfde6
4
+ data.tar.gz: d9ee5a1d6a974e998191ad656b4b962b5a7ea74e0327be3944813790bf6e7e8c
5
5
  SHA512:
6
- metadata.gz: ebe60cc5d056b7baca75fd8f7890b8b8c0e43b96079fcd3029c98e803f7be2fd1a5e830ec438daf03d1ba73fa2267b750eeb9697e2c85e34817980775d83789a
7
- data.tar.gz: 742ba8672d944f20985310457b8f772f7ee26c77531e5eecd9b4cb1952e65bab180f04e77189b986a4a2beaa888bdcf59079f6e84f580ffb66676c0bc3b6da69
6
+ metadata.gz: 9aca01c0f69b403d2476b5db05b610604899f2a38f450b0c29d8f19b60f5f2e3e67777c172690672ae83a1a4ce14e316c85175989d5dd4df826afdbf6b8e530c
7
+ data.tar.gz: 1645f52ca823c5c628d9fa5c1aba45393feffc9ac3f0c0e70e1552582bd55de79df20f8870f72deca67d8e0faae036d5fc5d1fa67b7be80dcf836d86808b7c68
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Kasket [![Build Status](https://secure.travis-ci.org/zendesk/kasket.svg)](http://travis-ci.org/zendesk/kasket)
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
 
@@ -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
- sql.to_kasket_query(self, args[1].map(&:value_for_database))
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].binds.map(&:value_for_database) + Array(@values[:limit])))
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Kasket
3
- VERSION = '4.7.0'
3
+ VERSION = '4.8.0'
4
4
  class Version
5
5
  MAJOR = Kasket::VERSION.split('.')[0]
6
6
  MINOR = Kasket::VERSION.split('.')[1]
@@ -119,11 +119,15 @@ module Kasket
119
119
  end
120
120
  end
121
121
 
122
- def visit_Arel_Nodes_BindParam(_x, *_)
122
+ def visit_Arel_Nodes_BindParam(node, *_)
123
123
  if ActiveRecord::VERSION::MAJOR < 5
124
124
  visit(@binds.shift[1])
125
125
  else
126
- visit(@binds.shift)
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.7.0
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: 2018-11-12 00:00:00.000000000 Z
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: '5.2'
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: '5.2'
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
- rubyforge_project:
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