lib/ecomdev/chefspec/helpers/platform.rb
# Returns list of available os versions
# @param [TrueClass, FalseClass] latest specify if would like to receive only latest
# @return [Array<Hash{Symbol => String, Symbol}>] list of os versions in view of hash
Returns list of available os versions
Returns list of available os versions
def list(latest = false)
      result = []
      @os.map do |os, versions|
        unless latest
          versions.each { |version| result << {os: os, version: version}}
        else
          result << {os: os, version: versions.last} if versions.length > 0
        end
      end
      result
    end
def list ( latest = false ) result = [ ] @os . map do | os , versions | unless latest versions . each { | version | result << { os : os , version : version } } else result << { os : os , version : versions . last } if versions . length > 0 end end result end
Returns list of available os versions
Returns list of available os versions
list of os versions in view of hash
list of os versions in view of hash
Array<Hash{Symbol => String, Symbol}>
latest
latest specify if would like to receive only latest
latest specify if would like to receive only latest