deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1203328 - /incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb
Date Thu, 17 Nov 2011 19:06:04 GMT
Author: mfojtik
Date: Thu Nov 17 19:06:04 2011
New Revision: 1203328

URL: http://svn.apache.org/viewvc?rev=1203328&view=rev
Log:
CIMI: Fixed MRI 1.9 incompatibility in schema.rb

Modified:
    incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb

Modified: incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb?rev=1203328&r1=1203327&r2=1203328&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb (original)
+++ incubator/deltacloud/trunk/server/lib/cimi/model/schema.rb Thu Nov 17 19:06:04 2011
@@ -61,8 +61,8 @@ class CIMI::Model::Schema
 
     def from_xml(xml, model)
       case @text
-        when :nested : model[@name] = xml[@xml_name].first["content"] if xml[@xml_name]
-        when :direct : model[@name] = xml["content"]
+        when :nested then model[@name] = xml[@xml_name].first["content"] if xml[@xml_name]
+        when :direct then model[@name] = xml["content"]
         else model[@name] = xml[@xml_name]
       end
     end
@@ -70,8 +70,8 @@ class CIMI::Model::Schema
     def to_xml(model, xml)
       return unless model[@name]
       case @text
-        when :nested : xml[@xml_name] = [{ "content" => model[@name] }]
-        when :direct : xml["content"] = model[@name]
+        when :nested then xml[@xml_name] = [{ "content" => model[@name] }]
+        when :direct then xml["content"] = model[@name]
         else xml[@xml_name] = model[@name]
       end
     end



Mime
View raw message