breathe 0.3.0 → 0.3.1

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
  SHA256:
3
- metadata.gz: 730f5f521725f470d139ffee0425cbc9df04ed07ca4785ce1c67fd9043ae15cc
4
- data.tar.gz: e0c659cbbec9dbd2ffd24fac7178486b2e94502b1a35d643d31521f0e3b3acdc
3
+ metadata.gz: ff2837bf3695cdf7014639abd4e60f70dca9f6832167e1c0846a08416c446212
4
+ data.tar.gz: 468036efeb1ef793a94c1568f92c0abda53a4a82e1b9ca16318a728396820c3f
5
5
  SHA512:
6
- metadata.gz: ca27b9bd958517afdcf7b1457fdbe3522cff6cc4bfe6acaec85258410b29e4c11d2db2c43bab6103b2fa2aeaaef2f293f319a6d583a983668fd8a750e81e0fb1
7
- data.tar.gz: fc65ad45281a859bad96842e621de81254b63ff8eeafa3c2b3259ccb5db7d65ea9f9a462194a5ae8e7a96d4f34bed6783fcee0cc032934317836e7a3aa2a704b
6
+ metadata.gz: 339a9998eea5fdbce58e178ac1ec545a966da3593b8a44ff89ad77091f446a22b42fd85c72918cfa5233307c57c31639c1e7b6a66fce4d2b8c301bfd14221a2b
7
+ data.tar.gz: 93f1d9a8582071ae1f78471bbcd62c0f0d6a5c59bcf3fad2e9fa84adde101286cb7f33159397645b80f08ab470b0b693d740dedc80fbf35d717efb4201f6a89d
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog]
6
6
 
7
+ [0.3.1]
8
+
9
+ - Fix bug with auto pagination
10
+
7
11
  [0.3.0]
8
12
 
9
13
  - Allow listing of sicknesses
@@ -26,6 +30,7 @@ The format is based on [Keep a Changelog]
26
30
 
27
31
  - Allow listing of absences
28
32
 
33
+ [0.3.1]: https://github.com/dxw/breathe_ruby/releases/tag/0.3.1
29
34
  [0.3.0]: https://github.com/dxw/breathe_ruby/releases/tag/0.3.0
30
35
  [0.2.0]: https://github.com/dxw/breathe_ruby/releases/tag/0.2.0
31
36
  [0.1.2]: https://github.com/dxw/breathe_ruby/releases/tag/0.1.2
@@ -45,13 +45,16 @@ module Breathe
45
45
  private
46
46
 
47
47
  def auto_paginated_response(parsed_response)
48
+ pages = parsed_response
49
+
48
50
  while (next_page = parsed_response.next_page)
49
51
  break if next_page.nil?
50
52
 
51
- parsed_response.concat(next_page)
53
+ pages.concat(next_page.body)
54
+ parsed_response = next_page
52
55
  end
53
56
 
54
- parsed_response
57
+ pages
55
58
  end
56
59
  end
57
60
  end
@@ -3,18 +3,13 @@ module Breathe
3
3
  extend Forwardable
4
4
  attr_reader :response, :type
5
5
 
6
- delegate [:each, :find, :select, :count, :[]] => :body
6
+ delegate [:each, :find, :select, :count, :[], :concat] => :body
7
7
 
8
8
  def initialize(response:, type:)
9
9
  @response = response
10
10
  @type = type
11
11
  end
12
12
 
13
- def concat(response)
14
- @response = response.response
15
- body.concat(response.body)
16
- end
17
-
18
13
  def body
19
14
  @body ||= response.data[type]
20
15
  end
@@ -1,3 +1,3 @@
1
1
  module Breathe
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: breathe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Harrison
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler