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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a6eb4488cb86bdefb5bf7693597cdf5cff6a9b0
4
- data.tar.gz: bbbbbd5620af219e06075552ae34028fee5ee265
3
+ metadata.gz: c73c5c59edb0f7c4d32af8fdadb8e51dbc1b669e
4
+ data.tar.gz: c9645128b31132dea84bda2b1079c9eece69a674
5
5
  SHA512:
6
- metadata.gz: c1a8fd826c515648a02c8aaa53ff9f83b3af7eb47f6311c1cc4ec285e6998bcab83949bdd3c6cae2d2c0ebc55171a3e3b28e662829b7754f5d1aa9a830a34402
7
- data.tar.gz: 3bb84421ca4ebffb78e8ea1953f306cd6e36f440b09403e3f4788eaf261b639bb78af0542336bfd651d6008b850a0caedd83ddaffc134cf384291a3c4c5739f7
6
+ metadata.gz: 0d7c80e97a8f8d6b8d9761d3447c1651bbde62f80d25bc215ad9aeb012f38477bd3b21c6cfbc5a8c97912aec8af7bd5d2a83a451f0428c0013ec54115454d879
7
+ data.tar.gz: 19161a7010a4dd5309ca9bdcc2b705b49bad1402285e22356923ddad6de65a18c421514ff0952dc2669d93bbd17e86e718b598e1dcd4dc12b440ed27c3ef2aa7
@@ -1,5 +1,10 @@
1
1
  # unreleased
2
2
 
3
+ # 0.1.3
4
+
5
+ Feature:
6
+ - Raise a `All3DP::API::GatewayTimeoutError` on 504s
7
+
3
8
  # 0.1.2
4
9
 
5
10
  Feature:
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module All3DP
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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.2
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-01-01 00:00:00.000000000 Z
11
+ date: 2019-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http