productive 0.6.25 → 0.6.26

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: 85491a789b74ec127cf00a3a544e3b1b569e5402
4
- data.tar.gz: 3171997f009abc417ea25e4bfac2ba8bfcfb8d3a
3
+ metadata.gz: 527bd565d8af3346766530db80e8049b77abc4a9
4
+ data.tar.gz: 6aab8f658807d04e8e131a9d1e6c3137f31e6a03
5
5
  SHA512:
6
- metadata.gz: 1aefe7904ff86fa7dd3313a390687a414163e21f81e4396e020288f0e1600fe228a86ca4ee5838233cedcf062ecc8428d8f43fc2323691d14cd0cee307e0918b
7
- data.tar.gz: 28a308549a68dd39de5ffb13a02607422ee66e36104351a3010b83b3d9afea1879d3c028e0a366bbdf03a920df9363513415758bc9daecef46b1cd4daebf808b
6
+ metadata.gz: 6b2ed7fe8e172430c38b4430051dae80ccaabc620ee8a3655e1bced603ed2f2ce38d5daccbad02fa865a16e18fa7b8e798eca76cec50bfb372c67c3fcc479751
7
+ data.tar.gz: 10aa0794e8d7fbef89e15323132400604c9ae4ff4145aabede074f26bbc53ce7bda31d161d45d850dad61fbd6a20e128e2e80542aa642dd9408041ef07faed4d
@@ -1,10 +1,16 @@
1
1
  class JsonApiQueryBuilder < JsonApiClient::Query::Builder
2
2
  def all
3
3
  @all ||= begin
4
- results = []
4
+ results = page = find
5
+ next_page = 2
5
6
 
6
- meta.total_pages.times do |page|
7
- results += page(page + 1).find
7
+ loop do
8
+ break if page.links.links['next'].nil?
9
+
10
+ page = page(next_page).find
11
+ results += page
12
+
13
+ next_page += 1
8
14
  end
9
15
 
10
16
  results
@@ -1,3 +1,3 @@
1
1
  module Productive
2
- VERSION = '0.6.25'.freeze
2
+ VERSION = '0.6.26'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: productive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.25
4
+ version: 0.6.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josip Bišćan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack