onfleet-ruby 0.0.1 → 0.0.2
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 +4 -4
- data/README.md +17 -0
- data/lib/{onfleet.rb → onfleet-ruby.rb} +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/create.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/delete.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/find.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/get.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/list.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/save.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/actions/update.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/address.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/admin.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/destination.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/errors/authentication_error.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/errors/connection_error.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/errors/invalid_request_error.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/errors/onfleet_error.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/onfleet_object.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/organization.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/recipient.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/task.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/team.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/util.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/vehicle.rb +0 -0
- data/lib/{onfleet → onfleet-ruby}/worker.rb +0 -0
- data/{onfleet.gemspec → onfleet-ruby.gemspec} +3 -4
- metadata +34 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f01cc0a7fc44924b639b186d15b2a2c32c971842
|
|
4
|
+
data.tar.gz: 02c758d9310f340a7db1fbcc79b2cfeb40c0e7f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69f9066c747b79ce8b61fc6b844139a0216f893c0ce1079dd604cc1301d04f726ee6a066a980a8c56781911cc943039f325ba4f5fe0a715c693787d21d4c27ce
|
|
7
|
+
data.tar.gz: 32f640f62b07cce4571d93564f582787768722d29e972db0434b6ddf2ecbf9fb39a7d569798021e70fe95eb6a9857620be4845b74cf4bd52a930a7f31009c892
|
data/README.md
CHANGED
|
@@ -288,6 +288,23 @@ Onfleet::Task.list({state: 0}) # => returns all tasks with state 0, see official
|
|
|
288
288
|
Currently not supported
|
|
289
289
|
|
|
290
290
|
|
|
291
|
+
##Error Handling
|
|
292
|
+
```ruby
|
|
293
|
+
begin
|
|
294
|
+
# perform onfleet api requests
|
|
295
|
+
rescue AuthenticationError => e
|
|
296
|
+
# API authentication issues
|
|
297
|
+
rescue ConnectionError => e
|
|
298
|
+
# API connection Problems
|
|
299
|
+
rescue InvalidRequestError => e
|
|
300
|
+
# Bad request/invalid request params
|
|
301
|
+
# also if resource is not found
|
|
302
|
+
rescue OnfleetError => e
|
|
303
|
+
# general error
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
|
|
291
308
|
## TODO
|
|
292
309
|
1. Tests
|
|
293
310
|
2. Better error handling
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'onfleet-ruby'
|
|
3
|
-
s.version = '0.0.
|
|
3
|
+
s.version = '0.0.2'
|
|
4
4
|
s.date = '2015-08-03'
|
|
5
5
|
s.summary = "Onfleet ruby api"
|
|
6
6
|
s.description = "To interact with Onfleet's API"
|
|
7
7
|
s.authors = ["Nick Wargnier"]
|
|
8
8
|
s.email = 'nick@stylelend.com'
|
|
9
|
-
s.homepage =
|
|
10
|
-
'http://rubygems.org/gems/onfleet'
|
|
9
|
+
s.homepage = 'http://rubygems.org/gems/onfleet-ruby'
|
|
11
10
|
s.license = 'MIT'
|
|
12
11
|
|
|
13
12
|
s.add_dependency('rest-client', '~> 1.4')
|
|
14
13
|
|
|
15
|
-
s.add_development_dependency
|
|
14
|
+
s.add_development_dependency("rspec",'~> 3.3.0', '>= 3.0.0')
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
s.files = `git ls-files`.split("\n")
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onfleet-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Wargnier
|
|
@@ -28,16 +28,22 @@ dependencies:
|
|
|
28
28
|
name: rspec
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
+
- - ~>
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: 3.3.0
|
|
31
34
|
- - '>='
|
|
32
35
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
36
|
+
version: 3.0.0
|
|
34
37
|
type: :development
|
|
35
38
|
prerelease: false
|
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
40
|
requirements:
|
|
41
|
+
- - ~>
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: 3.3.0
|
|
38
44
|
- - '>='
|
|
39
45
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
46
|
+
version: 3.0.0
|
|
41
47
|
description: To interact with Onfleet's API
|
|
42
48
|
email: nick@stylelend.com
|
|
43
49
|
executables: []
|
|
@@ -48,33 +54,33 @@ files:
|
|
|
48
54
|
- .rspec
|
|
49
55
|
- Gemfile
|
|
50
56
|
- README.md
|
|
51
|
-
- lib/onfleet.rb
|
|
52
|
-
- lib/onfleet/actions/create.rb
|
|
53
|
-
- lib/onfleet/actions/delete.rb
|
|
54
|
-
- lib/onfleet/actions/find.rb
|
|
55
|
-
- lib/onfleet/actions/get.rb
|
|
56
|
-
- lib/onfleet/actions/list.rb
|
|
57
|
-
- lib/onfleet/actions/save.rb
|
|
58
|
-
- lib/onfleet/actions/update.rb
|
|
59
|
-
- lib/onfleet/address.rb
|
|
60
|
-
- lib/onfleet/admin.rb
|
|
61
|
-
- lib/onfleet/destination.rb
|
|
62
|
-
- lib/onfleet/errors/authentication_error.rb
|
|
63
|
-
- lib/onfleet/errors/connection_error.rb
|
|
64
|
-
- lib/onfleet/errors/invalid_request_error.rb
|
|
65
|
-
- lib/onfleet/errors/onfleet_error.rb
|
|
66
|
-
- lib/onfleet/onfleet_object.rb
|
|
67
|
-
- lib/onfleet/organization.rb
|
|
68
|
-
- lib/onfleet/recipient.rb
|
|
69
|
-
- lib/onfleet/task.rb
|
|
70
|
-
- lib/onfleet/team.rb
|
|
71
|
-
- lib/onfleet/util.rb
|
|
72
|
-
- lib/onfleet/vehicle.rb
|
|
73
|
-
- lib/onfleet/worker.rb
|
|
74
|
-
- onfleet.gemspec
|
|
57
|
+
- lib/onfleet-ruby.rb
|
|
58
|
+
- lib/onfleet-ruby/actions/create.rb
|
|
59
|
+
- lib/onfleet-ruby/actions/delete.rb
|
|
60
|
+
- lib/onfleet-ruby/actions/find.rb
|
|
61
|
+
- lib/onfleet-ruby/actions/get.rb
|
|
62
|
+
- lib/onfleet-ruby/actions/list.rb
|
|
63
|
+
- lib/onfleet-ruby/actions/save.rb
|
|
64
|
+
- lib/onfleet-ruby/actions/update.rb
|
|
65
|
+
- lib/onfleet-ruby/address.rb
|
|
66
|
+
- lib/onfleet-ruby/admin.rb
|
|
67
|
+
- lib/onfleet-ruby/destination.rb
|
|
68
|
+
- lib/onfleet-ruby/errors/authentication_error.rb
|
|
69
|
+
- lib/onfleet-ruby/errors/connection_error.rb
|
|
70
|
+
- lib/onfleet-ruby/errors/invalid_request_error.rb
|
|
71
|
+
- lib/onfleet-ruby/errors/onfleet_error.rb
|
|
72
|
+
- lib/onfleet-ruby/onfleet_object.rb
|
|
73
|
+
- lib/onfleet-ruby/organization.rb
|
|
74
|
+
- lib/onfleet-ruby/recipient.rb
|
|
75
|
+
- lib/onfleet-ruby/task.rb
|
|
76
|
+
- lib/onfleet-ruby/team.rb
|
|
77
|
+
- lib/onfleet-ruby/util.rb
|
|
78
|
+
- lib/onfleet-ruby/vehicle.rb
|
|
79
|
+
- lib/onfleet-ruby/worker.rb
|
|
80
|
+
- onfleet-ruby.gemspec
|
|
75
81
|
- spec/spec_helper.rb
|
|
76
82
|
- spec/test_data.rb
|
|
77
|
-
homepage: http://rubygems.org/gems/onfleet
|
|
83
|
+
homepage: http://rubygems.org/gems/onfleet-ruby
|
|
78
84
|
licenses:
|
|
79
85
|
- MIT
|
|
80
86
|
metadata: {}
|