platform_simulation_specs/common/ohai_plugin_common.rb
def process
        data = {}

        @instances ||= []

        @instances.each do |i|
          data[i[:platform]] ||= {}
          data[i[:platform]][i[:arch]] ||= []
          data[i[:platform]][i[:arch]] << i.reject { |k,v| k == :platform || k == :arch }
        end
        data
      end
#Format data into a form the rest of the app expects
Format data into a form the rest of the app expects
Format data into a form the rest of the app expects
def process
        data = {}
        @instances ||= []
        @instances.each do |i|
          data[i[:platform]] ||= {}
          data[i[:platform]][i[:arch]] ||= []
          data[i[:platform]][i[:arch]] << i.reject { |k,v| k == :platform || k == :arch }
        end
        data
      end
def process data = { } @instances ||= [ ] @instances . each do | i | data [ i [ :platform ] ] ||= { } data [ i [ :platform ] ] [ i [ :arch ] ] ||= [ ] data [ i [ :platform ] ] [ i [ :arch ] ] << i . reject { | k , v | k == :platform || k == :arch } end data end
Format data into a form the rest of the app expects
Format data into a form the rest of the app expects