cashbox 0.0.34 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2860696c00462e8eefe813141a61ca74120bb854
4
- data.tar.gz: 8a5d1820857300faef6ee8d65400189c1d84270b
3
+ metadata.gz: 442b957550b2d74725ad8a893cfecf3ce1975118
4
+ data.tar.gz: 03e90d8c004d213e5b07e987d14b85684c322e79
5
5
  SHA512:
6
- metadata.gz: a296842ee7a6551161e6c475ff016e10ef02cd6ef13cf362482aefe4bfbf11b646da37a5f09e4d750e59caf9cb5a90d16f0f661b65984ecce7ba09689aeda180
7
- data.tar.gz: 4a04308a686cc2e1133449cdd74434b8306cab2ec2d93e78e4e77c58726cc809a7b2c180cddc1ce820c2af2b8eb46e467276ee4e72edad4b0f4dafd18b360170
6
+ metadata.gz: b0240b1dc8d232fa289316538781efc10157343138fd8890433727d72c3a30207cc3df1f2616c40c6f8380b2c33ce02721aca01292f24990494cf983471ec4bc
7
+ data.tar.gz: 39fe8dc4e1f12a35d444a92cbb44a632c00c765b7d812a9f508afc9f428f94937868d9801ed39f84c2663e60d430111a33ad1cbd6e4bde77f89547d81df28b6a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.34)
4
+ cashbox (0.0.35)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -3,7 +3,6 @@ require 'active_support/concern'
3
3
  module Cashbox::Rest
4
4
  module ReadWrite
5
5
  extend ActiveSupport::Concern
6
-
7
6
  DEFAULT_LIMIT = 100.freeze
8
7
 
9
8
  included do
@@ -53,7 +52,7 @@ module Cashbox::Rest
53
52
  response = Cashbox::Request.new(:get, route, { query: params }).response
54
53
  objects = cast(self.new, response)
55
54
 
56
- if objects.any? && response.next && (max.nil? || objects.count < max)
55
+ if (objects.count == DEFAULT_LIMIT) && (response.next && (max.nil? || objects.count < max))
57
56
  max -= objects.count if max
58
57
  params = Addressable::URI.parse(response.next).query_values
59
58
  objects.concat(query(params, max))
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.34"
2
+ VERSION = "0.0.35"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cashbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Storer