blobstore_client 1.3091.0 → 1.3093.0

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: 44da63745ae7b347d12c0fa424dd53017749b0d0
4
- data.tar.gz: 673e5bc4cf2d247a69658cf895394ec8f0a2a86f
3
+ metadata.gz: 8ea314f54fdeee107f401b1bbe2a26c6525dd703
4
+ data.tar.gz: 57eedf305975a368f5c028cc00d373247108b3e8
5
5
  SHA512:
6
- metadata.gz: 4abeab091a4073b09e2f6b77ef3296d0677163682ae5ec948b5e4a3af0c4139fbcdcd632344cb2415b1faca8a944fddef14553ea4a9e9cf5fa58652885dfd0e4
7
- data.tar.gz: 2e78aa17053d11c742a4d1a08ef2d1e61898db1512fee41caa3bf9ce431039ac49ed6e942dda187f0a353647a4f5fde261e4d3b78018121073bb1e61133411da
6
+ metadata.gz: 8020e39ff60582d5c4ef6259720919a9aaff2551317a60d9a22b09c7a3cec16eaf679c194b0eb15cc07f50a58e11ea7914cb212858c4049f5fddd8300980509a
7
+ data.tar.gz: 22977c18fcce31f399f42bce5a8f6f443a270db31314d7beeefb1adb129b69af0b0d9a231d143d39ffd71ab0b2975d585f2557bb6fb1561e4d63a733c071de4f
@@ -54,6 +54,7 @@ module Bosh
54
54
  def delete_object(id)
55
55
  response = @client.delete(url(id), header: @headers)
56
56
 
57
+ raise NotFound, "Object '#{id}' is not found, #{response.status}/#{response.content}" if response.status == 404
57
58
  raise BlobstoreError, "Could not delete object, #{response.status}/#{response.content}" if response.status != 204
58
59
  end
59
60
 
@@ -114,9 +114,8 @@ module Bosh
114
114
  raise BlobstoreError, 'unsupported action' if @simple
115
115
  object_id = full_oid_path(object_id)
116
116
  object = get_object_from_s3(object_id)
117
- unless object.exists?
118
- raise BlobstoreError, "no such object: #{object_id}"
119
- end
117
+ raise NotFound, "Object '#{object_id}' is not found" unless object.exists?
118
+
120
119
  object.delete
121
120
  rescue AWS::Errors::Base => e
122
121
  raise BlobstoreError, "Failed to delete object '#{object_id}', S3 response error: #{e.message}"
@@ -48,10 +48,9 @@ module Bosh
48
48
 
49
49
  def delete_object(id)
50
50
  response = @client.delete(url(id), header: @headers)
51
- if response.status != 204
52
- raise BlobstoreError,
53
- "Could not delete object, #{response.status}/#{response.content}"
54
- end
51
+
52
+ raise NotFound, "Object '#{id}' is not found, #{response.status}/#{response.content}" if response.status == 404
53
+ raise BlobstoreError, "Could not delete object, #{response.status}/#{response.content}" if response.status != 204
55
54
  end
56
55
 
57
56
  def object_exists?(id)
@@ -85,6 +85,8 @@ module Bosh
85
85
  raise NotFound, "Swift object '#{object_id}' not found" if object.nil?
86
86
 
87
87
  object.destroy
88
+ rescue NotFound => e
89
+ raise e
88
90
  rescue Exception => e
89
91
  raise BlobstoreError, "Failed to delete object '#{object_id}': #{e.message}"
90
92
  end
@@ -1,7 +1,7 @@
1
1
  module Bosh
2
2
  module Blobstore
3
3
  class Client
4
- VERSION = '1.3091.0'
4
+ VERSION = '1.3093.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blobstore_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3091.0
4
+ version: 1.3093.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-30 00:00:00.000000000 Z
11
+ date: 2015-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.3091.0
89
+ version: 1.3093.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.3091.0
96
+ version: 1.3093.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement