searchkick 5.1.0 → 5.1.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
  SHA256:
3
- metadata.gz: 4f8772937f9490975f3e21a5dbd7e2ddc18da42959a42a991875e4d04caca549
4
- data.tar.gz: c10ee19a6feb618cc6d84da994053ed3996b97aaeac85d2c6510246ba4dfd7cf
3
+ metadata.gz: dcb83468ee84892db5a2484a3d5ec75bb9b8964fd0a9b9c3ab73b735f8467390
4
+ data.tar.gz: d309602fe457bf39fd170d2bcf446119d4a2a93ea669df833b21bf1b0ef76a4b
5
5
  SHA512:
6
- metadata.gz: d6e13f2d84a1869b912732befa604da472a020a5862e8387916bc1c8fb57e24f23a899d774d043f5af2a93856b25278f618e16ffd177a7fe035844660dfc1723
7
- data.tar.gz: 53b5c913f753a9f8c0ef2d2de3c7f1c2fd21c5a456919a453d0f48f8a891b73e57e0746d30d669c0d0d0f89c4cd174559a616d715aee4b6dc55aa627a420963e
6
+ metadata.gz: 196f076e15d708c89ae13ddb96ef7fce4cd19de9b5cfef639ea68e8886e81a66b1f01ed1f5453065ad58c617a42aceeda493ac6bc5c34e89cb08956be35eb87d
7
+ data.tar.gz: ac58225f370165c19a9378c3c84e07aedc297ae7f263cb1c027f5536184e4fe336b540726e6adf6ac1aca6802e424026a448d783d1e4a4279e03db01931b707c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 5.1.1 (2022-12-05)
2
+
3
+ - Added support for strings for `offset` and `per_page`
4
+
1
5
  ## 5.1.0 (2022-10-12)
2
6
 
3
7
  - Added support for fractional search timeout
data/README.md CHANGED
@@ -1112,7 +1112,7 @@ Restaurant.search("soup", where: {bounds: {geo_shape: {type: "polygon", coordina
1112
1112
  Falling entirely within the query shape
1113
1113
 
1114
1114
  ```ruby
1115
- Restaurant.search("salad", where: {bounds: {geo_shape: {type: "circle", relation: "within", coordinates: [{lat: 38, lon: -123}], radius: "1km"}}})
1115
+ Restaurant.search("salad", where: {bounds: {geo_shape: {type: "circle", relation: "within", coordinates: {lat: 38, lon: -123}, radius: "1km"}}})
1116
1116
  ```
1117
1117
 
1118
1118
  Not touching the query shape
@@ -251,7 +251,7 @@ module Searchkick
251
251
  default_limit = searchkick_options[:deep_paging] ? 1_000_000_000 : 10_000
252
252
  per_page = (options[:limit] || options[:per_page] || default_limit).to_i
253
253
  padding = [options[:padding].to_i, 0].max
254
- offset = options[:offset] || (page - 1) * per_page + padding
254
+ offset = (options[:offset] || (page - 1) * per_page + padding).to_i
255
255
  scroll = options[:scroll]
256
256
 
257
257
  max_result_window = searchkick_options[:max_result_window]
@@ -1,3 +1,3 @@
1
1
  module Searchkick
2
- VERSION = "5.1.0"
2
+ VERSION = "5.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchkick
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-13 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel