class WarpEngine::Platforms::Dos::Service
Publishes DOS uploads: a required cartridge zip and an optional Windows x86 zip, released on tags. Serves a folders shelf through ::shelf_folder.
Constants
- TARGETS
-
The shelf folder settings of each kind: the key prefix in the
dosblock of the metadata and theplatformwritten toINFO.INI.
Public Class Methods
# File app/services/warp_engine/platforms/dos/service.rb, line 30 def self.shelf_folder(metadata, kind) dos = metadata.is_a?(Hash) ? metadata["dos"] : nil prefix, platform = TARGETS[kind.to_s] return nil unless dos.is_a?(Hash) && prefix folder = dos["#{prefix}folder"].presence return nil unless folder { folder: folder, settings: Array(dos["settings"]), name: dos["#{prefix}store_name"].presence || folder, description: dos["#{prefix}store_description"].to_s, platform: platform } end
Returns the folder spec of a folders shelf for asset kind from the dos block of the uploaded metadata (a Hash with string keys): folder, store_name and store_description for the cartridge, the same keys with a win32_ prefix for win_x86, and the shared settings list.
Returns a Hash with folder, settings, name (the store name, or the folder), description and platform ("DOS" or "WIN32"), or nil when the block, the kind or the folder is missing.
Public Instance Methods
Source
# File app/services/warp_engine/platforms/dos/service.rb, line 46 def cartridge_ext = ".zip"
Returns ".zip".