fieldview 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fieldview/auth_token.rb +7 -1
- data/lib/fieldview/errors.rb +5 -0
- data/lib/fieldview/list_object.rb +1 -1
- data/lib/fieldview/version.rb +1 -1
- data/test/test_list_object.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b2bcc720cf5f78b79a40cc1a8ab20b97e722937
|
4
|
+
data.tar.gz: 3e1e7e88670ea7e3092adf37ecce9ddbb9e57009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95f361211c0bbdd02639fbd7b9c3fe793e74fd84b0a68393fb9d829ac8b27b3f00fb6cfadd72912f57326533c7af54ff361d0f63dec50ab6d4f80fa651f17701
|
7
|
+
data.tar.gz: ffb1ce05c16459144cbbc74d9b979631db3f10f225384862b0af5e954c013cbed5d97825578946ec4fb6477232deb75de026d38d315e62e4180b3689367aa8cc
|
data/Gemfile.lock
CHANGED
data/lib/fieldview/auth_token.rb
CHANGED
@@ -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 =
|
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
|
data/lib/fieldview/errors.rb
CHANGED
@@ -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
|
data/lib/fieldview/version.rb
CHANGED
data/test/test_list_object.rb
CHANGED
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.
|
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-
|
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.'
|