UnionOfRAD/lithium — pull request #318 by rmarscher (2012-02-08 18:46:16+00:00)
Title: updates to the 'li3 library extract' command

Added setting the namespace in files and the default library name according to the basename of the directory being extracted to. Can be explicitly set with the --namespace option.

Also updated fix for http://dev.lithify.me/lithium/tickets/view/32 to not hardcode the `LITHIUM_LIBRARY_PATH` if it is the same as the default `dirname(LITHIUM_APP_PATH) . '/libraries'` value which is more portable.

Lastly, library archives can include a special _replacements.json file that will override the default replacements that happen when a library is extracted.

Note - this is a bit cleaner than my previous pull request #297. I incorporated changes requested by nateabele and gwoo and made sure I have the lithium_qa pre-commit hook setup (which this commit passes).

Nate - I'm pretty sure the namespace on the default app was always `app` before the changes I made here unless I was missing something. You can see line 270 of my version has a replacement that searches all *.php files for `namespace app` and replaces it with the actual namespace.