juju/juju-gui — pull request #115 by frankban (2014-02-07 18:45:46+00:00)
Title: Zip file handling in sandbox mode.

Zip file handling in sandbox mode.

This is another incremental step in the
implementation of the local charms upload
functionality in sandbox mode.

This branch introduces the zip.js library
as a GUI dependency. While in the process
of integrating it, I also added the steps
I followed in the HACKING file.
In reviewing this branch, you can safely ignore
the following files: zip.js, inflate.js and
deflate.js.

Note that the zip-utils.js file is instead
a new internal module I added to collect
helper functions for working with zip
archives.

This does not add so much functionality
except for the integration.

QA:
1) make debug;
2) Open the GUI and the js console.
3) Drag a zip containing a charm in the zip root,
and click "upload":
- you should see the "charm upload in sandbox
mode is not yet implemented" notification;
- in the js console, you should also see a list
of the three files we are interested in, included
in the zip.
4) Do again setp 3 but this time with a zip
including the charm in a nested directory
(e.g. a zip like this is in
https://github.com/hatched/ghost-charm).
5) Now drag a zip not including a charm:
you should see an error notification similar to
"unable to find the charm configuration file".

Done, thank you!