deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [5/6] git commit: Mock: The user_metadata Hash is not being properly serialized
Date Tue, 20 Mar 2012 14:37:48 GMT
Mock: The user_metadata Hash is not being properly serialized

The user_metadata has is not properly serialized to Hash in the Mock
driver. This patch will asure that the user_metadata is hash before
iterate through it.


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/1440c59e
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/1440c59e
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/1440c59e

Branch: refs/heads/master
Commit: 1440c59e391fa9800cfc24a59710d5fb5fe108a4
Parents: 8b65b09
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue Mar 20 14:23:51 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Mar 20 15:38:35 2012 +0100

----------------------------------------------------------------------
 server/views/blobs/show.xml.haml |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1440c59e/server/views/blobs/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/blobs/show.xml.haml b/server/views/blobs/show.xml.haml
index 34b9cca..686d793 100644
--- a/server/views/blobs/show.xml.haml
+++ b/server/views/blobs/show.xml.haml
@@ -5,7 +5,8 @@
       - haml_tag(attribute, :<) do
         - haml_concat @blob.send(attribute)
   %user_metadata
-    - @blob.user_metadata.each do |k, v|
-      %entry{:key => k}
-        #{cdata v}
+    - if @blob.kind_of? Hash
+      - @blob.user_metadata.each do |k, v|
+        %entry{:key => k}
+          #{cdata v}
   %content{:href => bucket_url(@blob.bucket) + '/' + @blob.id + '/content'}


Mime
View raw message