connect_wise_rest 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
  SHA1:
3
- metadata.gz: 92c3f8a3959e75abf08881226e4d4c2a38ff8958
4
- data.tar.gz: 75b82e684a3eaad75b3622dbe2bec4bfac9f5197
3
+ metadata.gz: 75e34e38cf02534459657fbf231368b2bd44184b
4
+ data.tar.gz: 24842f7523c53d322fe63609cdf5834113fbc55d
5
5
  SHA512:
6
- metadata.gz: 811e3746a8c179e3008616fc7e2cb975f0a854c73e8a28003211e7c2fe8a03e5324703232a7c9c808d2e47bc8b36270a4d298e89cc3fbec023525ae653fd37a5
7
- data.tar.gz: c5c02793f8a4a77fab42d8885582624d6fc312d629149b3bede83e9ed32400e6d02b7f5af7f8ddeea4e0ffa13fccfc359f89f4709364183c1615ed82b0ba5240
6
+ metadata.gz: b9999532fbd4ef13f4d29b30bab68608ca620d666ee9b4f6415aa7879dcb9918700845ebd530d51a819783b13b0400185de3bfa6be1e2318fdc878b671ed17af
7
+ data.tar.gz: 21890fff2e9cd37b07790399ffd49307dfafbaaf164eeb739e5f2f230423a4a136d878bb0ab4887652234ec998a75bcbc75fdca1eb840547d1d0d1a52d21d08e
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
  *.gem
11
11
  /.idea
12
+ .ruby-*
@@ -60,7 +60,7 @@ module ConnectWiseRest
60
60
  ### Pagination ###
61
61
 
62
62
  def next_page?
63
- self.data.is_a?(Array) && self.data.count == self.options[:query]['pageSize']
63
+ self.data.is_a?(Array) && self.data.count >= self.options[:query]['pageSize']
64
64
  end
65
65
 
66
66
  def next_page
@@ -15,20 +15,25 @@ module ConnectWiseRest
15
15
  end
16
16
 
17
17
  def format!
18
- rows = []
18
+ if @data['row_values'].is_a?(Array)
19
+ rows = []
19
20
 
20
- @data['row_values'].each do |values|
21
- row = {}
21
+ @data['row_values'].each do |values|
22
+ row = {}
22
23
 
23
- values.each_with_index do |value, index|
24
- key = @data['column_definitions'][index].keys[0]
25
- row[key] = value
24
+ values.each_with_index do |value, index|
25
+ key = @data['column_definitions'][index].keys[0]
26
+ row[key] = value
27
+ end
28
+
29
+ rows << row
26
30
  end
27
31
 
28
- rows << row
29
- end
32
+ @data = rows
30
33
 
31
- @data = rows
34
+ else
35
+ @data = []
36
+ end
32
37
  end
33
38
 
34
39
  end
@@ -1,3 +1,3 @@
1
1
  module ConnectWiseRest
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: connect_wise_rest
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
  - Kevin Pheasey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2017-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.5.1
96
+ rubygems_version: 2.6.14
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: REST client wrapper for Connect Wise.