all3dp 0.1.3 → 0.1.4
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/README.md +1 -1
- data/lib/all3dp/api.rb +5 -2
- 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: b0d9b8991308469a783565f55407edb1c92e8b1b
|
4
|
+
data.tar.gz: e049dc0d67624b0c04930c3494b1cd0a685f8efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac68bdc12d3faf60fc4aad30b759626f09c1fa721fed2af32d10173b43922226d3c5cb1b0eb13213ddb4b2d09896473e96e8130d1c72c3de0232d903027f1d8
|
7
|
+
data.tar.gz: 9090014f0a4cd835360549acfcbe306d2810bcfeda560df59da9e4ec2a1ec4d424fa51c29a9de254b03d2b3b7341812f819d804000fc23d3802492507b925481
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -37,7 +37,7 @@ interactive prompt that will allow you to experiment.
|
|
37
37
|
## Release
|
38
38
|
|
39
39
|
To release a new version, update the version number in `version.rb`, update
|
40
|
-
the CHANGELOG
|
40
|
+
the `CHANGELOG.md`, commit, and then run `bundle exec rake release`, which will
|
41
41
|
create a git tag for the version, push git commits and tags, and push the
|
42
42
|
`.gem` file to [rubygems.org](https://rubygems.org).
|
43
43
|
|
data/lib/all3dp/api.rb
CHANGED
@@ -6,6 +6,7 @@ module All3DP
|
|
6
6
|
class Error < StandardError; end
|
7
7
|
class BadGatewayError < Error; end
|
8
8
|
class GatewayTimeoutError < Error; end
|
9
|
+
class ServiceUnavailableError < Error; end
|
9
10
|
|
10
11
|
def create_configuration(items:)
|
11
12
|
url = "#{BASE_URL}/configuration"
|
@@ -23,19 +24,21 @@ module All3DP
|
|
23
24
|
BASE_URL = "https://printing-engine.all3dp.com"
|
24
25
|
private_constant :BASE_URL
|
25
26
|
|
26
|
-
# rubocop:disable Metrics/AbcSize
|
27
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
27
28
|
def parse_response(response)
|
28
29
|
case response.code
|
29
30
|
when 201
|
30
31
|
response.parse
|
31
32
|
when 502
|
32
33
|
raise BadGatewayError, response.body.to_s.strip
|
34
|
+
when 503
|
35
|
+
raise ServiceUnavailableError, response.body.to_s.strip
|
33
36
|
when 504
|
34
37
|
raise GatewayTimeoutError, response.body.to_s.strip
|
35
38
|
else
|
36
39
|
raise Error, "Error #{response.code}: #{response.body.to_s.inspect}"
|
37
40
|
end
|
38
41
|
end
|
39
|
-
# rubocop:enable Metrics/AbcSize
|
42
|
+
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
40
43
|
end
|
41
44
|
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.4
|
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-02-
|
11
|
+
date: 2019-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|