pebblebed 0.3.19 → 0.3.20

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: c3319d5bf3e94fb16abb5605493d10a3f031881e
4
- data.tar.gz: e741ea44d9228b81723b03655d788f6a668b9c86
3
+ metadata.gz: 8310ad73ddbc179d054ac75fdf33890d51e3fa61
4
+ data.tar.gz: d60bca28ff3cce1676d00655f04a9717bcd65092
5
5
  SHA512:
6
- metadata.gz: 8e4f6b9e80cc33a2db5a55259c3ea12a7a00668ec3de415701b1290f2050e1c48ca7546a438ff22a1b13b9b25cce9359df833fef131dd489d73af7c539a86b0c
7
- data.tar.gz: 84a655055294e5d2ce69db6cef870a301938cfedbf357b896512697f666bd79aa4f8bf7fabc031d498644aa92615194bfee00659f175a63994846eb76b75eca9
6
+ metadata.gz: 2edd27c829d0567756bb27ff2d9e66401db37baad0c9ee35a5334ebcd8c2d740759137ea6e41812fbe5f8cef095d196eaeec39db071cbdf8b19a16309692c1d8
7
+ data.tar.gz: e75bbaef43db033a865b5e9965b818994bae9bf01ce379c8102143b83d74a13458a5645d84a05f494d93fa0f95e4b9cd50f3d7a8f1d352bb597d02c0c6df098d
@@ -123,8 +123,8 @@ module Sinatra
123
123
  def limit_offset_collection(collection, options)
124
124
  limit = (options[:limit] || 20).to_i
125
125
  offset = (options[:offset] || 0).to_i
126
- collection = collection.limit(limit+1).offset(offset)
127
- last_page = (collection.size <= limit)
126
+ collection = collection.limit(limit+1).offset(offset).to_a
127
+ last_page = (collection.length <= limit)
128
128
  metadata = {:limit => limit, :offset => offset, :last_page => last_page}
129
129
  collection = collection[0..limit-1]
130
130
  [collection, metadata]
@@ -1,3 +1,3 @@
1
1
  module Pebblebed
2
- VERSION = "0.3.19"
2
+ VERSION = "0.3.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebblebed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.19
4
+ version: 0.3.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katrina Owen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-20 00:00:00.000000000 Z
12
+ date: 2017-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec