deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [12/65] git commit: Core: The 'supported_collections' helper now return correct array
Date Fri, 20 Jul 2012 09:59:21 GMT
Core: The 'supported_collections' helper now return correct array


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

Branch: refs/heads/master
Commit: da550725b60e7003825724feeb96996e3608ec29
Parents: abd83a5
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Jul 18 17:52:02 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Jul 20 11:57:42 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/helpers/deltacloud_helper.rb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/da550725/server/lib/deltacloud/helpers/deltacloud_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index cec22ac..047e1b2 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -19,6 +19,7 @@ module Deltacloud::Helpers
     require 'benchmark'
 
     def supported_collections
+      collection_arr = []
       Deltacloud::Collections.deltacloud_modules.each do |m|
         m.collections.each do |c|
           # Get the required capability for the :index operation (like 'realms' or 'instance_state_machine')
@@ -27,8 +28,10 @@ module Deltacloud::Helpers
           # for the Sinatra::Base class evaluate to 'true'
           next if m.settings.respond_to?(:capability) and !m.settings.capability(index_operation_capability)
           yield c if block_given?
+          collection_arr << c
         end
       end
+      collection_arr
     end
 
     def auth_feature_name


Mime
View raw message