gds-api-adapters 24.2.0 → 24.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f5131c255f8144ad889497e23aa2dcae9ba325b
4
- data.tar.gz: e6e3dbcc6ce43bc4b6d2af1a022156258bfd3b99
3
+ metadata.gz: 82534ab64fb0ed91583434029e987473da8b7acf
4
+ data.tar.gz: d3ca040c9c252488d5fd931a082a3c2922a4374b
5
5
  SHA512:
6
- metadata.gz: a21296fc73994cc0f7e63391cb8570a51dc1c5c583753ff98b9c324edbbf8c63005309ccbb071e6c7f7fa8ba65e99d51b3395c21a84320bdb872cfbf9f8023c4
7
- data.tar.gz: 441f32b37a11f7566adc57c009f12641d5f536ff18e26c6f79eb675b0288ab7cac9de7bb3b0ce2d4fb93f3342d8dbe94a9362d1c3c1b9ec444ef46e1132e12df
6
+ metadata.gz: fbe2b79cb8fa19b0e9aa2d9d54ac74a3789ec60083b9ecf4cf92be469818aad6e66e604473d7c4f95779329afdc5e77e5b306b043723a2807a04cb710cb30cad
7
+ data.tar.gz: 8962b8bca9a05a374a656ebfaa22fe972b3112ea160492da556789c2d88004b7ea98142009fed3b893812a2b84e99cd5c43595a015d1422b748dda1e8f09597d
@@ -36,6 +36,9 @@ module GdsApi
36
36
  class HTTPForbidden < HTTPClientError
37
37
  end
38
38
 
39
+ class HTTPConflict < HTTPClientError
40
+ end
41
+
39
42
  class NoBearerToken < BaseError; end
40
43
 
41
44
  module ExceptionHandling
@@ -60,6 +63,8 @@ module GdsApi
60
63
  GdsApi::HTTPNotFound.new(code, message, details)
61
64
  when 410
62
65
  GdsApi::HTTPGone.new(code, message, details)
66
+ when 409
67
+ GdsApi::HTTPConflict.new(code, message, details)
63
68
  when (400..499)
64
69
  GdsApi::HTTPClientError.new(code, message, details)
65
70
  when (500..599)
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '24.2.0'
2
+ VERSION = '24.3.0'
3
3
  end
@@ -392,6 +392,14 @@ class JsonClientTest < MiniTest::Spec
392
392
  end
393
393
  end
394
394
 
395
+ def test_get_should_raise_conflict_for_410
396
+ url = "http://some.endpoint/some.json"
397
+ stub_request(:delete, url).to_return(:body => "{}", :status => 409)
398
+ assert_raises GdsApi::HTTPConflict do
399
+ @client.delete_json!(url)
400
+ end
401
+ end
402
+
395
403
  def test_get_should_follow_permanent_redirect
396
404
  url = "http://some.endpoint/some.json"
397
405
  new_url = "http://some.endpoint/other.json"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 24.2.0
4
+ version: 24.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Stewart