ncannasse/spodadmin — pull request #2 by jasononeil (2013-05-10 06:45:29+00:00)
Title: Added the ability to specify a base URL.

Hi Nicolas, thanks for the great lib! I am trying to set up a general website admin, with

/admin/ # the main site
/admin/db/ # spodadmin

I'm pretty sure this patch should be backwards compatible with the instructions given in the README, though the previous code was more lenient and would let you choose any top-level subdirectory, rather than only "db/".

If you choose not to accept it I can subclass, but I thought the extra flexibility might be useful for others also.

....

Previously it assumed that you were in a top level directory, and just removed the first "/$something" from the path.

Now you must specify the base URL, and we just substitute it out.

If you don't specify a baseURL, "/db/" is assumed.