azure-armrest 0.9.13 → 0.9.14

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
  SHA256:
3
- metadata.gz: 6dcd07e3c1fc8044f9b374e414b9f73951882b44d6f829c5c1b576aa2bebe01c
4
- data.tar.gz: c35fe136a9f7e52f5f913ad5218f6958dbaf468e6021ab90cbfc3446b8d4b5a6
3
+ metadata.gz: 6b0957efe3f85a19324899af360fbd31e7e63240743645e52d2f97853a0e8c47
4
+ data.tar.gz: a32638465e060e560c607b1c0ea8143414f6b9b3a535ac1c1f65bc00743fc122
5
5
  SHA512:
6
- metadata.gz: 5158479f2c1247d7ac00014034c09009f886f386b2e7864846246148e449919ffe672b223f1d2a31f77113a3ab71665e0e41da6c4f57055a4ecc42bb88a12a6e
7
- data.tar.gz: 394a269426ccf9664b0c3da1d1838a46df032d152a629dee80e9d7c890d251047daa10740180e388a1fb0be98339b0e6dcc1541382111fc3e1ae73b95e5e7049
6
+ metadata.gz: 82cd043c9ae57d178edaf3078a9a4cb7d12ca79a08396b66c1cd0d24217dcb42d387750aa02282a4ee03b577d26114e05aa584234ce0cf4cd33eff9a78db93b6
7
+ data.tar.gz: 1909e23b186abc7992afc58b0b4755adefae92a6143de32c08abd5ddcef6b0ae54a80c37c7ce9505f97c4eeb15fa075a6ba7e5b36a2dd532a5c78707ef8ba336
@@ -2,9 +2,9 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  rvm:
5
- - "2.2.8"
6
5
  - "2.3.5"
7
6
  - "2.4.2"
7
+ - "2.5.3"
8
8
  - ruby-head
9
9
  - jruby-head
10
10
  matrix:
data/CHANGES CHANGED
@@ -1,3 +1,15 @@
1
+ = 0.9.14 - 23-Oct-2019
2
+ * Added the VirtualMachineService#list_by_location method.
3
+ * The VirtualMachineService#vm_operations method now returns a response object
4
+ instead of nil.
5
+ * The results of the ResourceProviderService#supported? method are now cached.
6
+ * Fixed a bug in the VirtualMachineService#vm_operate method where it wasn't
7
+ setting the response code.
8
+ * Fixed a bug in the Armrest::Configuration#log= method where it would bomb if
9
+ you used an object that was neither a string nor a logger instance.
10
+ * Made the requirements for the memoist gem less pessimistic.
11
+ * Some spec updates and general refactoring.
12
+
1
13
  = 0.9.13 - 12-Sep-2018
2
14
  * Updated the USGov AD authority endpoint, which was changed by Microsoft recently.
3
15
  * Added the timeout option for the Configuration class. This allows you to set
@@ -19,7 +19,7 @@ behind the scenes.
19
19
 
20
20
  spec.add_dependency 'json', '~> 2'
21
21
  spec.add_dependency 'rest-client', '~> 2.0.0'
22
- spec.add_dependency 'memoist', '~> 0.15.0'
22
+ spec.add_dependency 'memoist', '~> 0.15'
23
23
  spec.add_dependency 'azure-signature', '~> 0.2.3'
24
24
  spec.add_dependency 'activesupport', '>= 4.2.2'
25
25
  spec.add_dependency 'addressable', '~> 2.5.0'
@@ -211,8 +211,12 @@ module Azure
211
211
  # a logger instance
212
212
  #
213
213
  def self.log=(output)
214
- output = Logger.new(output) unless output.kind_of?(Logger)
215
- RestClient.log = output
214
+ case output
215
+ when String
216
+ RestClient.log = Logger.new(output)
217
+ else
218
+ RestClient.log = output
219
+ end
216
220
  end
217
221
 
218
222
  # Returns a list of subscriptions for the current configuration object.
@@ -131,10 +131,14 @@ module Azure
131
131
  # given +namespace+. By default it will search the Microsoft.Compute
132
132
  # namespace.
133
133
  #
134
+ # The results of this method are cached.
135
+ #
134
136
  def supported?(resource_type, namespace = 'Microsoft.Compute')
135
137
  get(namespace).resource_types.map(&:resource_type).map(&:downcase).include?(resource_type.downcase)
136
138
  end
137
139
 
140
+ memoize :supported?
141
+
138
142
  private
139
143
 
140
144
  def build_url(namespace = nil, *args)
@@ -1,6 +1,6 @@
1
1
  module Azure
2
2
  module Armrest
3
3
  # The version of the azure-armrest library.
4
- VERSION = '0.9.13'.freeze
4
+ VERSION = '0.9.14'.freeze
5
5
  end
6
6
  end
@@ -16,6 +16,14 @@ module Azure
16
16
  super(configuration, 'virtualMachines', 'Microsoft.Compute', options)
17
17
  end
18
18
 
19
+ # Return a list of virtual machines for the given +location+.
20
+ #
21
+ def list_by_location(location, options = {})
22
+ url = url_with_api_version(api_version, base_url, 'providers', provider, 'locations', location, service_name)
23
+ response = rest_get(url)
24
+ get_all_results(response, options[:skip_accessors_definition])
25
+ end
26
+
19
27
  # Return a list of available VM series (aka sizes, flavors, etc), such
20
28
  # as "Basic_A1", though other information is included as well.
21
29
  #
@@ -306,8 +314,11 @@ module Azure
306
314
  raise ArgumentError, "must specify name of the vm" unless vmname
307
315
 
308
316
  url = build_url(group, vmname, action)
309
- rest_post(url)
310
- nil
317
+ response = rest_post(url)
318
+
319
+ Azure::Armrest::ResponseHeaders.new(response.headers).tap do |headers|
320
+ headers.response_code = response.code
321
+ end
311
322
  end
312
323
  end
313
324
  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.9.13
4
+ version: 0.9.14
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: 2018-09-12 00:00:00.000000000 Z
14
+ date: 2019-10-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: 0.15.0
50
+ version: '0.15'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 0.15.0
57
+ version: '0.15'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: azure-signature
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -290,8 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubyforge_project:
294
- rubygems_version: 2.7.6
293
+ rubygems_version: 3.0.6
295
294
  signing_key:
296
295
  specification_version: 4
297
296
  summary: An interface for ARM/JSON Azure REST API