cashbox 0.0.33 → 0.0.34

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: d17e8700b633f1c18ed3e59569e8fd74c5c3b179
4
- data.tar.gz: 2d2ac0b7349afa2bacd85c3ee542e190d63d143b
3
+ metadata.gz: 2860696c00462e8eefe813141a61ca74120bb854
4
+ data.tar.gz: 8a5d1820857300faef6ee8d65400189c1d84270b
5
5
  SHA512:
6
- metadata.gz: d22dace23091c8827bfd6d35040ccb420a2b8fd073098e56b7869082b4f8428a8ecabc04ae34cb4b3f1e698cd5b8dc86b735c1c5ba350ae21f89b961336ad093
7
- data.tar.gz: 9cd22f3295d735921efd2e2ead5e03c1b5e2c4fddc2c94efeb3ce4c4635d1ba75fc1e9bdefefb74613a31971a700db8d39831c8fd119c7f0e5a4010cf4d3c69b
6
+ metadata.gz: a296842ee7a6551161e6c475ff016e10ef02cd6ef13cf362482aefe4bfbf11b646da37a5f09e4d750e59caf9cb5a90d16f0f661b65984ecce7ba09689aeda180
7
+ data.tar.gz: 4a04308a686cc2e1133449cdd74434b8306cab2ec2d93e78e4e77c58726cc809a7b2c180cddc1ce820c2af2b8eb46e467276ee4e72edad4b0f4dafd18b360170
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /tmp/
9
9
  /.DS_store
10
10
  examples.rb
11
+ cashbox*gem
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cashbox (0.0.33)
4
+ cashbox (0.0.34)
5
5
  activesupport
6
6
  addressable
7
7
  hashie
@@ -2,3 +2,4 @@ cashbox:
2
2
  build:
3
3
  image: cashbox
4
4
  dockerfile: Dockerfile
5
+ cached: true
@@ -3,6 +3,7 @@ require 'active_support/concern'
3
3
  module Cashbox::Rest
4
4
  module ReadWrite
5
5
  extend ActiveSupport::Concern
6
+
6
7
  DEFAULT_LIMIT = 100.freeze
7
8
 
8
9
  included do
@@ -52,7 +53,7 @@ module Cashbox::Rest
52
53
  response = Cashbox::Request.new(:get, route, { query: params }).response
53
54
  objects = cast(self.new, response)
54
55
 
55
- if (objects.count == DEFAULT_LIMIT) && (response.next && (max.nil? || objects.count < max))
56
+ if objects.any? && response.next && (max.nil? || objects.count < max)
56
57
  max -= objects.count if max
57
58
  params = Addressable::URI.parse(response.next).query_values
58
59
  objects.concat(query(params, max))
@@ -1,3 +1,3 @@
1
1
  module Cashbox
2
- VERSION = "0.0.33"
2
+ VERSION = "0.0.34"
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.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathon Storer