ms_rest_azure 0.3.1 → 0.4.0
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 +4 -4
- data/ChangeLog.md +4 -1
- data/README.md +1 -1
- data/lib/ms_rest_azure.rb +3 -1
- data/lib/ms_rest_azure/serialization.rb +43 -0
- data/lib/ms_rest_azure/version.rb +1 -1
- data/ms_rest_azure.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1fd75e8ce7055d583a565b1ad63b22cb96e3322
|
4
|
+
data.tar.gz: 6ee48c9a1ef81a288efb1ed71043c1512d61bf8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8422b73a85b09725a67aeec31f1cacb520a45bf4e83e1247e1370544f272a78c4dcc4a91d7bc3bf383c8ce58bb2970fdb42f812c6e18b15c278c7aaa64ca6c2
|
7
|
+
data.tar.gz: 0a3ca8b657be867f3a8584fc073157c66648764a7bfbea20ae86530426769d4672d96560aa6a095177a2258d3cf5530b7463b6aaec15d13b25c2d2341a407a77
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
##2016.
|
1
|
+
##2016.08.10 ms_rest_azure version 0.4.0
|
2
|
+
* Adding & inheriting serialization class from ms_rest generic serializer
|
3
|
+
|
4
|
+
##2016.07.21 ms_rest_azure version 0.3.1
|
2
5
|
* [Bug fixes](https://github.com/Azure/autorest/commit/ede944a1fa30a7453aa30e6fa79154dc43393cdf)
|
3
6
|
|
4
7
|
##2016.07.14 ms_rest_azure version 0.3.0
|
data/README.md
CHANGED
@@ -38,7 +38,7 @@ To start working on the gem the only additional dev dependecy is required - rspe
|
|
38
38
|
Reference it in the gemfile and also add this line to your client's gemspec file:
|
39
39
|
|
40
40
|
```ruby
|
41
|
-
spec.add_runtime_dependency 'ms_rest_azure', '~> 0.
|
41
|
+
spec.add_runtime_dependency 'ms_rest_azure', '~> 0.4.0'
|
42
42
|
```
|
43
43
|
|
44
44
|
Don't forget to correct the version.
|
data/lib/ms_rest_azure.rb
CHANGED
@@ -9,6 +9,7 @@ require 'ms_rest_azure/version'
|
|
9
9
|
require 'ms_rest_azure/credentials/application_token_provider.rb'
|
10
10
|
|
11
11
|
require 'ms_rest_azure/resource.rb'
|
12
|
+
require 'ms_rest_azure/serialization.rb'
|
12
13
|
require 'ms_rest_azure/sub_resource.rb'
|
13
14
|
require 'ms_rest_azure/cloud_error_data.rb'
|
14
15
|
require 'ms_rest_azure/azure_operation_error.rb'
|
@@ -18,4 +19,5 @@ require 'ms_rest_azure/polling_state.rb'
|
|
18
19
|
require 'ms_rest_azure/active_directory_service_settings.rb'
|
19
20
|
require 'ms_rest_azure/azure_service_client.rb'
|
20
21
|
|
21
|
-
module MsRestAzure
|
22
|
+
module MsRestAzure end
|
23
|
+
module MsRestAzure::Serialization end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module MsRestAzure
|
6
|
+
# Base module for Azure Ruby serialization and deserialization.
|
7
|
+
#
|
8
|
+
# Provides methods to serialize Ruby object into Ruby Hash and
|
9
|
+
# to deserialize Ruby Hash into Ruby object.
|
10
|
+
module Serialization
|
11
|
+
include MsRest::Serialization
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
#
|
16
|
+
# Builds serializer
|
17
|
+
#
|
18
|
+
def build_serializer
|
19
|
+
Serialization.new(self)
|
20
|
+
end
|
21
|
+
|
22
|
+
#
|
23
|
+
# Class to handle serialization & deserialization.
|
24
|
+
#
|
25
|
+
class Serialization < MsRest::Serialization::Serialization
|
26
|
+
|
27
|
+
#
|
28
|
+
# Retrieves model of the model_name
|
29
|
+
#
|
30
|
+
# @param model_name [String] Name of the model to retrieve.
|
31
|
+
#
|
32
|
+
def get_model(model_name)
|
33
|
+
begin
|
34
|
+
Object.const_get(@context.class.to_s.split('::')[0...-1].join('::') + "::Models::#{model_name}")
|
35
|
+
rescue NameError
|
36
|
+
# Look into MsRestAzure namespace if model name not found in the ARM's models namespace
|
37
|
+
Object.const_get("MsRestAzure::#{model_name}")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/ms_rest_azure.gemspec
CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
33
33
|
spec.add_runtime_dependency 'faraday', '~> 0.9'
|
34
34
|
spec.add_runtime_dependency 'faraday-cookie_jar', '~> 0.0.6'
|
35
|
-
spec.add_runtime_dependency 'ms_rest', '~> 0.
|
35
|
+
spec.add_runtime_dependency 'ms_rest', '~> 0.4.0'
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms_rest_azure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Microsoft Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.4.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.4.0
|
125
125
|
description: Azure Client Library for Ruby.
|
126
126
|
email: azsdkteam@microsoft.com
|
127
127
|
executables: []
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- lib/ms_rest_azure/credentials/application_token_provider.rb
|
146
146
|
- lib/ms_rest_azure/polling_state.rb
|
147
147
|
- lib/ms_rest_azure/resource.rb
|
148
|
+
- lib/ms_rest_azure/serialization.rb
|
148
149
|
- lib/ms_rest_azure/sub_resource.rb
|
149
150
|
- lib/ms_rest_azure/version.rb
|
150
151
|
- ms_rest_azure.gemspec
|