all3dp 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/all3dp/api.rb +5 -0
- data/lib/all3dp/version.rb +1 -1
- 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: c73c5c59edb0f7c4d32af8fdadb8e51dbc1b669e
|
4
|
+
data.tar.gz: c9645128b31132dea84bda2b1079c9eece69a674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7c80e97a8f8d6b8d9761d3447c1651bbde62f80d25bc215ad9aeb012f38477bd3b21c6cfbc5a8c97912aec8af7bd5d2a83a451f0428c0013ec54115454d879
|
7
|
+
data.tar.gz: 19161a7010a4dd5309ca9bdcc2b705b49bad1402285e22356923ddad6de65a18c421514ff0952dc2669d93bbd17e86e718b598e1dcd4dc12b440ed27c3ef2aa7
|
data/CHANGELOG.md
CHANGED
data/lib/all3dp/api.rb
CHANGED
@@ -5,6 +5,7 @@ module All3DP
|
|
5
5
|
class API
|
6
6
|
class Error < StandardError; end
|
7
7
|
class BadGatewayError < Error; end
|
8
|
+
class GatewayTimeoutError < Error; end
|
8
9
|
|
9
10
|
def create_configuration(items:)
|
10
11
|
url = "#{BASE_URL}/configuration"
|
@@ -22,15 +23,19 @@ module All3DP
|
|
22
23
|
BASE_URL = "https://printing-engine.all3dp.com"
|
23
24
|
private_constant :BASE_URL
|
24
25
|
|
26
|
+
# rubocop:disable Metrics/AbcSize
|
25
27
|
def parse_response(response)
|
26
28
|
case response.code
|
27
29
|
when 201
|
28
30
|
response.parse
|
29
31
|
when 502
|
30
32
|
raise BadGatewayError, response.body.to_s.strip
|
33
|
+
when 504
|
34
|
+
raise GatewayTimeoutError, response.body.to_s.strip
|
31
35
|
else
|
32
36
|
raise Error, "Error #{response.code}: #{response.body.to_s.inspect}"
|
33
37
|
end
|
34
38
|
end
|
39
|
+
# rubocop:enable Metrics/AbcSize
|
35
40
|
end
|
36
41
|
end
|
data/lib/all3dp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: all3dp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sunny Ripert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|