stuartpreston-azure-sdk-for-ruby 0.6.6 → 0.6.7

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: cb5627f9f51067de61dfecc5c42a6fb848691b6b
4
- data.tar.gz: 03fd7234dbe25d2705b6765f3bdffb6f4bfda7c9
3
+ metadata.gz: 79011371187700f252d099c2dba1361b7f578111
4
+ data.tar.gz: 46bcd38a6c7e472619b6d901e521439ae8a2268e
5
5
  SHA512:
6
- metadata.gz: 0ea894a519dac09200d87612edad6a079ab2329385586e3f0a173ac090002fd6cb87de7fca6a943fafd848545fa36fa7fb145db36a96cc183eea847742b19201
7
- data.tar.gz: 9ca113237450f9e9d061d11de6a7a387a316c2886a4585c410a56a679ce819323f44b9088a44bab87f7e06fbe15afa949c19fd09ee06cdb52713cc6949940f32
6
+ metadata.gz: 87a9c90eb7bc23b5b233472cb707c4feab18fdfff8e57dd2cbbed83f385e49b53ae1bd825b2a006d46e0dafc2a40da053df51544c484ac054520ff781c0a8b80
7
+ data.tar.gz: cec3895e035c7313890b8cde60bcf55cc09cc7e564a20d09b5259ab6e349d66805c6697a0403eac29461bd9d6446c6d3dab63f4769df2770b401b61e105b51c2
@@ -1,3 +1,16 @@
1
+ 2014.03.12 - version 0.6.7 (stuartpreston-azure-sdk-for-ruby)
2
+ * Support for .pfx and .publishsettings as certificate sources
3
+
4
+ 2014.03.09 - version 0.6.6 (stuartpreston-azure-sdk-for-ruby)
5
+ * Support for A10 and A11 Virtual Machine role sizes
6
+
7
+ 2013.03.03 - version 0.6.5 (stuartpreston-azure-sdk-for-ruby)
8
+ * Support for D, DS and G Virtual Machine role sizes
9
+ * Disabling Ruby 1.9 incompatibilities
10
+ * Fix serialization for Add Role/Create Virtual Machines
11
+ * Support creation of VM roles from User images
12
+ * Fix to support endpoint creation when User image used
13
+
1
14
  2014.05.06 - version 0.6.4
2
15
  * Upgraded Service Management Versioning to 2014-04-01
3
16
  * Created separate API for add role
@@ -31,13 +31,28 @@ module Azure
31
31
  class BaseManagementService
32
32
  def initialize
33
33
  validate_configuration
34
- cert_file = File.read(Azure.config.management_certificate)
34
+ cert_file = nil
35
35
  begin
36
36
  if Azure.config.management_certificate =~ /(pem)$/
37
+ cert_file = File.read(Azure.config.management_certificate)
37
38
  certificate_key = OpenSSL::X509::Certificate.new(cert_file)
38
39
  private_key = OpenSSL::PKey::RSA.new(cert_file)
39
- else
40
- # Parse pfx content
40
+ elsif Azure.config.management_certificate =~ /(pfx)$/
41
+ # Parse pfx content
42
+ File.open(Azure.config.management_certificate, "rb") do |f|
43
+ cert_file = f.read
44
+ end
45
+ cert_content = OpenSSL::PKCS12.new(Base64.decode64(cert_file))
46
+ certificate_key = OpenSSL::X509::Certificate.new(
47
+ cert_content.certificate.to_pem
48
+ )
49
+ private_key = OpenSSL::PKey::RSA.new(cert_content.key.to_pem)
50
+ elsif Azure.config.management_certificate =~ /(publishsettings)$/
51
+ # Parse publishsettings content
52
+ publish_settings = Nokogiri::XML(File.open(Azure.config.management_certificate, "r"))
53
+ subscription_id = Azure.config.subscription_id
54
+ xpath = "//PublishData/PublishProfile/Subscription[@Id='#{subscription_id}']/@ManagementCertificate"
55
+ cert_file = publish_settings.xpath(xpath).text
41
56
  cert_content = OpenSSL::PKCS12.new(Base64.decode64(cert_file))
42
57
  certificate_key = OpenSSL::X509::Certificate.new(
43
58
  cert_content.certificate.to_pem
@@ -68,8 +83,8 @@ module Azure
68
83
  raise error_message unless test('r', m_cert)
69
84
 
70
85
  m_cert = Azure.config.management_certificate
71
- error_message = 'Management certificate expects a .pem or .pfx file.'
72
- raise error_message unless m_cert =~ /(pem|pfx)$/
86
+ error_message = 'Management certificate expects a .pem, .pfx or .publishsettings file.'
87
+ raise error_message unless m_cert =~ /(pem|pfx|publishsettings)$/
73
88
  end
74
89
 
75
90
  # Public: Gets a list of regional data center locations from the server
@@ -231,4 +246,4 @@ module Azure
231
246
  end
232
247
  end
233
248
  end
234
- end
249
+ end
@@ -17,7 +17,7 @@ module Azure
17
17
  class Version
18
18
  MAJOR = 0 unless defined? MAJOR
19
19
  MINOR = 6 unless defined? MINOR
20
- UPDATE = 6 unless defined? UPDATE
20
+ UPDATE = 7 unless defined? UPDATE
21
21
  PRE = nil unless defined? PRE
22
22
 
23
23
  class << self
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stuartpreston-azure-sdk-for-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-03-09 00:00:00.000000000 Z
13
+ date: 2015-03-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri