azure-armrest 0.8.0 → 0.8.1

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: 8132014956246e577b66ccaf5a59e002e1dc06d3
4
- data.tar.gz: f15ad3108839654399c954bb0f4460499de319cd
3
+ metadata.gz: 5510479b90908d095cc2d830f6b711e88c632d50
4
+ data.tar.gz: 10a7c8a75d093ee25a9a0e2eb219233dcb6f4f73
5
5
  SHA512:
6
- metadata.gz: 4ca343728c62c77096e320d04ea0bfdeb0e6d9ce3aadbc0ea53935053335d1b20089004591915cf031fa380bd16009f89e7acdea0db4cb08b8098274d7dc3276
7
- data.tar.gz: b0185801ee3a2c6cf1079f5f8040ca143402109659b991504b40d2a6e06fa294452163086c00094fdaddca1553738af3278ac0464115f502652894684901c6af
6
+ metadata.gz: c6e32191a32c5e81dd84c6ce0c1c1c8a8a5aaa6afde180a0fcf41a00c0597334c5223fb32eb05e15cdcac23a35d86f588d4878b802e4a3c66d8c3f676e2700a9
7
+ data.tar.gz: 73f7cd8ce556642de1001f12fa4bea83c15a815d74be1b02205fdc4d47b12f4551680de3bd3e255f34a1da79d5bde5fc986ddb7db090aaa7bbbbf676ea6b685e
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ = 0.8.1 - 4-Aug-2017
2
+ * Fixed a bug in the DiskService#get_blob_raw method that affected you if you
3
+ used :start_byte + :length options. Thanks go to Jerry Keselman for the spot.
4
+ * The :filter option for ResourceGroupBaseService#list_all now ignores case
5
+ when testing against string values.
6
+
1
7
  = 0.8.0 - 20-Jul-2017
2
8
  * The StorageAccount#create_blob and StorageAccount#create_blob_snapshot methods
3
9
  were heavily revamped and now return a ResponseHeaders object.
@@ -83,6 +83,8 @@ module Azure
83
83
  # vms = Azure::Armrest::VirtualMachineService.new(conf)
84
84
  # vms.list_all(:location => "eastus", :resource_group => "rg1")
85
85
  #
86
+ # Note that comparisons against string values are caseless.
87
+ #
86
88
  def list_all(filter = {})
87
89
  url = build_url
88
90
  url = yield(url) || url if block_given?
@@ -90,7 +92,19 @@ module Azure
90
92
  response = rest_get(url)
91
93
  results = get_all_results(response)
92
94
 
93
- filter.empty? ? results : results.select { |obj| filter.all? { |k, v| obj.public_send(k) == v } }
95
+ if filter.empty?
96
+ results
97
+ else
98
+ results.select do |obj|
99
+ filter.all? do |method_name, value|
100
+ if value.kind_of?(String)
101
+ obj.public_send(method_name).casecmp(value).zero?
102
+ else
103
+ obj.public_send(method_name) == value
104
+ end
105
+ end
106
+ end
107
+ end
94
108
  end
95
109
 
96
110
  # This method returns a model object based on an ID string for a resource.
@@ -96,8 +96,14 @@ module Azure
96
96
 
97
97
  # The same restrictions that apply to the StorageAccont method also apply here.
98
98
  range = options[:range] if options[:range]
99
- range ||= options[:start_byte]..options[:end_byte] if options[:start_byte] && options[:end_byte]
100
- range ||= options[:start_byte]..options[:length]-1 if options[:start_byte] && options[:length]
99
+
100
+ if options[:start_byte] && options[:end_byte]
101
+ range ||= options[:start_byte]..options[:end_byte]
102
+ end
103
+
104
+ if options[:start_byte] && options[:length]
105
+ range ||= options[:start_byte]..((options[:start_byte] + options[:length])-1)
106
+ end
101
107
 
102
108
  range_str = range ? "bytes=#{range.min}-#{range.max}" : nil
103
109
 
@@ -1,6 +1,6 @@
1
1
  module Azure
2
2
  module Armrest
3
3
  # The version of the azure-armrest library.
4
- VERSION = '0.8.0'.freeze
4
+ VERSION = '0.8.1'.freeze
5
5
  end
6
6
  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.8.0
4
+ version: 0.8.1
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: 2017-07-20 00:00:00.000000000 Z
14
+ date: 2017-08-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json