Skip to content

Instantly share code, notes, and snippets.

@frodwith
Created February 18, 2011 20:33
Show Gist options
  • Save frodwith/834350 to your computer and use it in GitHub Desktop.
Save frodwith/834350 to your computer and use it in GitHub Desktop.
We have the opportunity now to rethink the way packages are done. The old
methods need to continue working, so we're going to maintain backwards
compatibility -- that is, we are going to support the old package format, etc.
New package system
---
- packages aren't going to be tied to WebGUI::Storage.
- operates on directories, not tarballs (transport detail)
- possibly support other transports, like gzipped tarballs
- New module, WebGUI::Package
- subclasses for different versions of the protocol, i.e.
- WebGUI::Package::Version::1_0_0 # legacy support
- WebGUI::Package::Version::2_0_0 # initial version
- WebGUI::Package::Version::2_0_1 # minor improvement that comes later
- WebGUI::Package::Version::2_1_0 # major enhancement (new object types)
- WebGUI::Package::Version::3_0_0 # totally different format
- 1_0_0 just uses the AssetPackage methods, WHICH REMAIN
- new versions inherit from the previous version and tweak (except 2 doesn't
inherit from 1, for example, and 3 might not inherit from 2)
- we bump the version number when we change something that has been released
- new({options}}
- factory method, dispatches on "version"
- write('path', [ compression ])
- read('path')
- can be a file, in which case the compression is guessed
- we will support AT LEAST tar, but probably also gzipped tar
- packages directory
MANIFEST (plist)
version: 2.0.0
exporter:
webgui_version: 7.10.10
url: http://somewhere.over.the.rainbow:8080
conf: somewhere.over.the.rainbow.conf
date: 2010-02-18T09:58 (ISO-8561 date)
user: f73hf63hf63hdgdg5623hd
contents:
assets:
- assetId: sdfosudf98sfu7
children:
- sdf8s7df98sd7f98sd7f
- sdf97asd9f78adf7f978
- id: sdf97sdf98s7f98s7df98
children:
- ds9f87s98adf7a98f7
- id: s9df87s9d8f7s98f7s9f
children:
- sdf987sdf98sd7f98sd7f9s8d7f9s8f7
metadata:
- list
- of
- field ids
metadata:
d83jdf73s72jd87g64h7d3
name: foobar
fieldType: yesNo
possibleValues: # etc...
assets:
djf7em3jd7fhtge6dht73s
info (plist -- properties, metadata)
collateral
asset-specific contents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment