lib/azure/configurable.rb in azure-0.7.0 vs lib/azure/configurable.rb in azure-0.7.1

- old
+ new

@@ -267,12 +267,20 @@ end def read_cert_from_file(cert_file_path) if File.extname(cert_file_path).downcase == '.pem' File.read(cert_file_path) + elsif File.extname(cert_file_path).downcase == '.publishsettings' + management_cert = parse_publishsettings(cert_file_path)['ManagementCertificate'] + Base64.decode64(management_cert) else File.binread(cert_file_path) end + end + + def parse_publishsettings(pub_file_path) + pub_xml = Nokogiri::XML.parse(File.read(pub_file_path)) + pub_xml.css('PublishData PublishProfile Subscription')[0] end def normalize_endpoint if block_given? File.join(yield, '') \ No newline at end of file