bridge_api 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2ZhN2ZlNTMwODNhZDYwZmE5YmM4YmI5NTVhMWMxNjJmMDE2ZmM4Zg==
4
+ YzAxN2RiZjlmYzQ0ZDAxNjNkN2JjNDAwNzU2Y2RhMmZjNTg4MGI4NA==
5
5
  data.tar.gz: !binary |-
6
- OTRhZjM1ODg4YzMzZGVlZjYwMDYwNGQxM2YwZjc3ZTZiNjM5MjlkMA==
6
+ ODE2NDQ2OTJlYWY1NTU2MmJhNTIyZTk1NWVlNTEwZGNmZjM4ZDY1Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDU3MDE0YzU3ODBhNTNkOWM2OGQ2YmMwNjUwOWExZDAzZWY5N2Y5YWI2NWQ3
10
- ZTBlNjBlOWMyYjkwMzYxNmYzOWQyODZhNzhlY2UxZWI0MzE2MDc3OWRiYmRj
11
- NTI5N2Q2OTA3Yjg4ZTVkYmIxNGViYTFiNzJmMjBlZDM3MDQ2ZDA=
9
+ Y2UyZjZiNmNiODhhMDM0YTgyMjQ2OWQwYWFhYTA1Yzk2MTJiYjQxZjg3NjQ1
10
+ MGVmNGFmYjgzMDg0ZGJhMzY5YWEzMDAyNjFmY2JmM2U4YTViOTgwYjZmODI5
11
+ OWZmYTRmYTkxOWVjMjJmMjZiMjkxOWFkNDVhYzVkODlkZWYyMTQ=
12
12
  data.tar.gz: !binary |-
13
- MzBjNzgwMjEyNjFkMDRhMDQzYzUxNmUxMzk3ZjM2ZTY5MTQxYzAxZWY0YTFk
14
- ODZlODA3OGMzMmI2OGZiZmUxMGFmNWM5NjRkODkyZTBmZTdlZjg5ODljNjJi
15
- Zjc5MGNmNjVhNTA4OGZmZTE1NmU5YmNmOWZjYWU5NTQ3YTIwY2E=
13
+ MDNiMDM3ZTFkZDIzMTdmZDBjNjgyZTNlY2I1YjA1NDk4NmY0OTQ5ZjFhZjFk
14
+ NjJlM2QzN2U1NjczZjU3MDkyYThkYWI2MGUwNTM0YjFhOWYxYzA4NDMwOGU3
15
+ OTQxOWVhZmU0NGQ5MTJjMmRkZWI2OTc2YTVjMmZlZjRlZTE2ZjI=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bridge_api (0.0.6)
4
+ bridge_api (0.0.8)
5
5
  faraday (~> 0.9.0)
6
6
  faraday_middleware (~> 0.9.0)
7
7
  footrest (>= 0.5.1)
@@ -34,7 +34,7 @@ GEM
34
34
  json (1.8.3)
35
35
  link_header (0.0.8)
36
36
  method_source (0.8.2)
37
- minitest (5.8.4)
37
+ minitest (5.9.0)
38
38
  multipart-post (2.0.0)
39
39
  pry (0.10.3)
40
40
  coderay (~> 1.1.0)
@@ -58,11 +58,11 @@ module BridgeAPI
58
58
  end
59
59
 
60
60
  def each_page(&block)
61
- block.call(@members)
61
+ block.call(@members, @linked, @meta)
62
62
  while @next_page
63
63
  response = get_page(@next_page)
64
- apply_response_metadata(response)
65
- block.call(@members)
64
+ apply_response_metadata(response, false)
65
+ block.call(@members, @linked, @meta)
66
66
  end
67
67
  @link_hash = {}
68
68
  end
@@ -108,7 +108,11 @@ module BridgeAPI
108
108
  []
109
109
  end
110
110
 
111
- def apply_response_metadata(response)
111
+ def apply_response_metadata(response, concat = true)
112
+ unless concat
113
+ @linked = {}
114
+ @meta = {}
115
+ end
112
116
  @status = response.status
113
117
  @headers = response.headers
114
118
  @method = response.env[:method]
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.0.7' unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.0.8' unless defined?(BridgeAPI::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-13 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake