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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/codeship-services.yml +1 -0
- data/lib/cashbox/rest/read_write.rb +2 -1
- data/lib/cashbox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2860696c00462e8eefe813141a61ca74120bb854
|
4
|
+
data.tar.gz: 8a5d1820857300faef6ee8d65400189c1d84270b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a296842ee7a6551161e6c475ff016e10ef02cd6ef13cf362482aefe4bfbf11b646da37a5f09e4d750e59caf9cb5a90d16f0f661b65984ecce7ba09689aeda180
|
7
|
+
data.tar.gz: 4a04308a686cc2e1133449cdd74434b8306cab2ec2d93e78e4e77c58726cc809a7b2c180cddc1ce820c2af2b8eb46e467276ee4e72edad4b0f4dafd18b360170
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/codeship-services.yml
CHANGED
@@ -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
|
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))
|
data/lib/cashbox/version.rb
CHANGED