azure-armrest 0.3.8 → 0.3.9

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: cfe77ac7705382e48afa5deeab108cefa90d07ae
4
- data.tar.gz: a6c7a2ab379f076af861fb21fcc674a573aee67e
3
+ metadata.gz: 354b862215f326a7caf9baee4c8adf8e522e11e8
4
+ data.tar.gz: 51709b7ab4402f95fa434a7ec09c3db705f72bde
5
5
  SHA512:
6
- metadata.gz: 97bfb012ae0a449c8c95ed107c68e5849dfcb5359a2e7a7d9a566bc12b4406722fa0c88e6678cf8834b0abdba81fbd07804d628ff4025a12940f0428d788e2e4
7
- data.tar.gz: ebb632b5bfcf35007a99d6e46f0f65a85dea6fc0796d998d0b6c6620db01a6f99dc82795767db3c4792b226f07d6a81d539d0c53bc42f037d430057e2712e7e4
6
+ metadata.gz: 1c8a8bc99dd581528d3de37d60cf8dd15465f26a0e5cf3ce466c02c0597f286343bb85087daefe6c02b5c33a08d966569ec143c51ba4f087220189035b1c440f
7
+ data.tar.gz: 603b2c4b5a88c68e54d87c4bf630a83a6af55727c260615505c00d5b68078f64ac1a3825f461edabcb48dde363200aea89374c13a35edb62924af00c5279ed0b
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ = 0.3.9 - 19-Oct-2016
2
+ * The StorageAccount#delete_blob method now returns a ResponseHeaders object
3
+ instead of true.
4
+ # The Configuration.clear_caches method now additionally clears the
5
+ CacheMethod config store.
6
+
1
7
  = 0.3.8 - 7-Oct-2-16
2
8
  * Added more robust exception wrapping, now mostly based on http error code.
3
9
  * Refactored the internal fetch_providers method so that it uses our own
@@ -5,6 +5,7 @@ module Azure
5
5
  def self.clear_caches
6
6
  # Used to store unique token information.
7
7
  @token_cache = Hash.new { |h, k| h[k] = [] }
8
+ CacheMethod.config.storage.clear
8
9
  end
9
10
 
10
11
  clear_caches # Clear caches at load time.
@@ -162,9 +162,7 @@ module Azure
162
162
  Container.new(Hash.from_xml(element.to_s)['Container'])
163
163
  end
164
164
 
165
- results << next_marker_results(doc, :containers, key, options)
166
-
167
- results.flatten
165
+ results.concat(next_marker_results(doc, :containers, key, options))
168
166
  end
169
167
 
170
168
  # Returns the properties for the given container +name+ using account +key+.
@@ -265,9 +263,7 @@ module Azure
265
263
  hash.key?('Snapshot') ? BlobSnapshot.new(hash) : Blob.new(hash)
266
264
  end
267
265
 
268
- results << next_marker_results(doc, :blobs, container, key, options)
269
-
270
- results.flatten
266
+ results.concat(next_marker_results(doc, :blobs, container, key, options))
271
267
  end
272
268
 
273
269
  # Returns an array of all blobs for all containers.
@@ -278,10 +274,10 @@ module Azure
278
274
  mutex = Mutex.new
279
275
 
280
276
  Parallel.each(containers(key), :in_threads => max_threads) do |container|
281
- mutex.synchronize { array << blobs(container.name, key) }
277
+ mutex.synchronize { array.concat(blobs(container.name, key)) }
282
278
  end
283
279
 
284
- array.flatten
280
+ array
285
281
  end
286
282
 
287
283
  # Returns the blob service properties for the current storage account.
@@ -339,7 +335,7 @@ module Azure
339
335
  dst_url = File.join(properties.primary_endpoints.blob, dst_container, dst_blob)
340
336
  src_url = File.join(properties.primary_endpoints.blob, src_container, src_blob)
341
337
 
342
- options = {'x-ms-copy-source' => src_url, 'If-None-Match' => '*', :verb => 'PUT'}
338
+ options = {'x-ms-copy-source' => src_url, 'if-none-match' => '*', :verb => 'PUT'}
343
339
 
344
340
  headers = build_headers(dst_url, key, :blob, options)
345
341
 
@@ -353,7 +349,11 @@ module Azure
353
349
  :ssl_verify => ssl_verify
354
350
  )
355
351
 
356
- Blob.new(response.headers)
352
+ blob = blob_properties(dst_container, dst_blob, key)
353
+ blob.response_headers = Azure::Armrest::ResponseHeaders.new(response.headers)
354
+ blob.response_code = response.code
355
+
356
+ blob
357
357
  end
358
358
 
359
359
  # Delete the given +blob+ found in +container+.
@@ -366,7 +366,7 @@ module Azure
366
366
 
367
367
  headers = build_headers(url, key, :blob, :verb => 'DELETE')
368
368
 
369
- ArmrestService.send(
369
+ response = ArmrestService.send(
370
370
  :rest_delete,
371
371
  :url => url,
372
372
  :headers => headers,
@@ -375,7 +375,10 @@ module Azure
375
375
  :ssl_verify => ssl_verify
376
376
  )
377
377
 
378
- true
378
+ headers = Azure::Armrest::ResponseHeaders.new(response.headers)
379
+ headers.response_code = response.code
380
+
381
+ headers
379
382
  end
380
383
 
381
384
  # Create new blob for a container.
@@ -1,5 +1,5 @@
1
1
  module Azure
2
2
  module Armrest
3
- VERSION = '0.3.8'.freeze
3
+ VERSION = '0.3.9'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure-armrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-10-07 00:00:00.000000000 Z
14
+ date: 2016-10-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json