lib/azure/armrest/resource_provider_service.rb in azure-armrest-0.0.3 vs lib/azure/armrest/resource_provider_service.rb in azure-armrest-0.0.4

- old
+ new

@@ -40,43 +40,43 @@ # this method are cached. # def list url = build_url response = rest_get(url) - JSON.parse(response.body)["value"] + JSON.parse(response)["value"].map{ |hash| Azure::Armrest::ResourceProvider.new(hash) } end cache_method(:list, cache_time) # Return information about a specific +namespace+ provider. The results # of this method are cached. # def get(namespace) url = build_url(namespace) response = rest_get(url) - JSON.parse(response.body) + Azure::Armrest::ResourceProvider.new(response) end cache_method(:get, cache_time) # Returns an array of geo-locations for the given +namespace+ provider. # The results of this method are cached. # def list_geo_locations(namespace) url = build_url(namespace) response = rest_get(url) - JSON.parse(response.body)['resourceTypes'].first['locations'] + JSON.parse(response)['resourceTypes'].first['locations'] end cache_method(:list_geo_locations, cache_time) # Returns an array of supported api-versions for the given +namespace+ provider. # The results of this method are cached. # def list_api_versions(namespace) url = build_url(namespace) response = rest_get(url) - JSON.parse(response.body)['resourceTypes'].first['apiVersions'] + JSON.parse(response)['resourceTypes'].first['apiVersions'] end cache_method(:list_api_versions, cache_time) # Register the current subscription with the +namespace+ provider.