You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/03/20 15:37:48 UTC

[5/6] git commit: Mock: The user_metadata Hash is not being properly serialized

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 <mf...@redhat.com>
Authored: Tue Mar 20 14:23:51 2012 +0100
Committer: Michal fojtik <mf...@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'}