/**
*    Copyright (C) 2008 10gen Inc.
*
*    This program is free software: you can redistribute it and/or  modify
*    it under the terms of the GNU Affero General Public License, version 3,
*    as published by the Free Software Foundation.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU Affero General Public License for more details.
*
*    You should have received a copy of the GNU Affero General Public License
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package ed.appserver.frameworks;

import java.io.IOException;

import ed.appserver.AppContext;
import ed.appserver.frameworks.Framework;
import ed.js.JSObject;
import ed.js.JSDict;
import ed.js.JSString;

public class AppEngine extends Framework {
    public void install (AppContext context) throws IOException {
        /*
         * Set up package mappings for google and django.
         */
        JSObject packages = (JSObject)context.getConfigObject("packages");
        if (packages == null) {
            packages = new JSDict();
        }

        JSObject django = new JSDict();
        django.set("module", "py-google");
        django.set("path", "django");
        packages.set("django", django);

        packages.set("google", "py-google");

        context.setConfigObject("packages", packages);

        /*
         * Run _init_ae.py (sets up adapterType and mapUrlToJxpFile)
         */
        context.runInitFile("/~~/modules/py-google/_init_ae.py");
    };
}

@@ -1209,16 +1209,172 @@
      %7D%0A%0A
+        JSObject google = new JSDict();%0A        google.set(%22module%22, %22py-google%22);%0A        google.set(%22path%22, %22%22);%0A        packages.set(%22google%22, google);%0A%0A
         
@@ -1531,54 +1531,8 @@
 );%0A%0A
-        packages.set(%22google%22, %22py-google%22);%0A%0A
     

make google a new style package-mapping (object w/ module and path vs. just a string)