fieldview 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fd1c79b470a1c46f9b283012ec5e0a661f810a0
4
- data.tar.gz: f6098db003ab6fb2e4155a92d005e5fe5ee4153b
3
+ metadata.gz: 2b2bcc720cf5f78b79a40cc1a8ab20b97e722937
4
+ data.tar.gz: 3e1e7e88670ea7e3092adf37ecce9ddbb9e57009
5
5
  SHA512:
6
- metadata.gz: 70d00c38c0722873b0d832b2912e050ee25ebf9ae9a459e8996236bef57ee75ba0c5c3f5a1484b8094be556d608667314aea61d4491160eff4a13943477d4b16
7
- data.tar.gz: e7ab22accda9f1ceeae46070f89860d3e842a950932f9bb1ef23a1629139691e4acac8ee672748c785a340400139e15607c1add466820083ecc8396c3888ae68
6
+ metadata.gz: 95f361211c0bbdd02639fbd7b9c3fe793e74fd84b0a68393fb9d829ac8b27b3f00fb6cfadd72912f57326533c7af54ff361d0f63dec50ab6d4f80fa651f17701
7
+ data.tar.gz: ffb1ce05c16459144cbbc74d9b979631db3f10f225384862b0af5e954c013cbed5d97825578946ec4fb6477232deb75de026d38d315e62e4180b3689367aa8cc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fieldview (0.0.6)
4
+ fieldview (0.0.7)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -89,7 +89,13 @@ module FieldView
89
89
  headers.each do |header,value|
90
90
  request[header] = value.to_s
91
91
  end
92
- response = http.request(request)
92
+ response = nil
93
+ begin
94
+ response = http.request(request)
95
+ rescue Zlib::DataError => e
96
+ raise BadRequestError.new("A data error has occurred with Zlib while making the request, check the headers: #{request.to_hash}",
97
+ http_body: params)
98
+ end
93
99
  FieldView.handle_response_error_codes(response)
94
100
  return FieldViewResponse.new(response)
95
101
  end
@@ -73,4 +73,9 @@ module FieldView
73
73
  # returns a 200
74
74
  class UnexpectedResponseError < FieldViewError
75
75
  end
76
+
77
+ # Raised when a request fails for some reason on the auth_token, this will be
78
+ # expanded upon as more errors arise
79
+ class BadRequestError < FieldViewError
80
+ end
76
81
  end
@@ -9,7 +9,7 @@ module FieldView
9
9
  @data = data
10
10
  @last_http_status = http_status
11
11
  @next_token = next_token
12
- @limit = 100
12
+ @limit = limit
13
13
  super(auth_token)
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module FieldView
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
@@ -18,6 +18,9 @@ class TestListObject < Minitest::Test
18
18
  list.each_with_index do |x, i|
19
19
  assert_equal data[i], x
20
20
  end
21
+
22
+ assert_equal 100, list.limit
23
+ assert_equal 200, list.last_http_status
21
24
  end
22
25
 
23
26
  def test_restart
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fieldview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Susmarski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ' FieldView is used to make data-driven decisions to maximize your return
14
14
  on every acre. This Ruby Gem is provided as a convenient way to access their API.'