bearcat 1.3.49 → 1.3.51

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: 5570d1db50569863bfbfd3a30b1e69bf9f95802e2659738c81064be7525bf615
4
- data.tar.gz: '0869eea17f98c4e5f367d558a955c05fb003ae6f55e201b9f50cf8a7f48fd9f3'
3
+ metadata.gz: 74ac1f7a25b0fc1e8b55d931d7ba7fe4713e0a9d5b47b0acff54811d940af9f4
4
+ data.tar.gz: cb29fcdbaccfbdf407072625276e16bbeedd29cadd4be8fec04f3e75a10b47bc
5
5
  SHA512:
6
- metadata.gz: 2c88f8820f87e55951822661b76664321401ab8819110c0f41a4465a0e28e1405a09dfe6fe1a0fda58faa64516d8b78d8d73c4d340c0beee56b9cdac9ab0355a
7
- data.tar.gz: 5a264903ecf7b56e94d1a5085d6f551a93a441a50c018b126448ec3404c7236d84ebd1160d2aada62232535f071162d9e4642a3add729d1b04b4ee78c7735877
6
+ metadata.gz: 28f325c2b16af3989a2a366556e1ed832e15749184c5673cb0e42d6fbdf4c9513217c6c3fd7119d5813351044effb55a3540193cbc6196c76730e7ae37b3f2d5
7
+ data.tar.gz: e73cfe35199f3b65ff65e11cd12b99814cca0ab67f069966409e311317ba37bab5990b82b8b1d234e8ae077e9a56a4087992343ad306d2bd931c2a1bd1df69c7
@@ -70,7 +70,7 @@ module Bearcat
70
70
  init_pages(@headers[:link])
71
71
  @members = process_body(response)
72
72
  block.call(@members)
73
- while @link_hash['next']
73
+ while @link_hash['next'] && @members.present?
74
74
  response = get_page(@link_hash['next'])
75
75
  @headers = response.headers
76
76
  @status = response.status
@@ -105,7 +105,9 @@ module Bearcat
105
105
  @headers = response.headers
106
106
  @status = response.status
107
107
  @method = response.env[:method]
108
- @members.concat(process_body(response))
108
+ page_members = process_body(response)
109
+ break unless page_members.present?
110
+ @members.concat(page_members)
109
111
  init_pages(@headers[:link])
110
112
  end
111
113
  @link_hash = {}
@@ -4,6 +4,11 @@ module Bearcat
4
4
  module GraphQL
5
5
 
6
6
  def graphql_query(query)
7
+ if query.is_a?(String)
8
+ query = {
9
+ query: query
10
+ }
11
+ end
7
12
  post('/api/graphql', query)
8
13
  end
9
14
 
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.3.49' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.3.51' unless defined?(Bearcat::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.49
4
+ version: 1.3.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-17 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake