Created
June 9, 2010 15:28
-
-
Save christianberg/431643 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- set-app-engine-environment [] | |
"Sets up the App Engine environment for the current thread." | |
(let [att (HashMap. {"com.google.appengine.server_url_key" | |
(str "http://localhost:" *port*)}) | |
env-proxy (proxy [ApiProxy$Environment] [] | |
(isLoggedIn [] (:logged-in? @login-info)) | |
(getEmail [] (:email @login-info)) | |
(getAuthDomain [] (:auth-domain @login-info)) | |
(isAdmin [] (:admin? @login-info)) | |
(getRequestNamespace [] "") | |
(getDefaultNamespace [] "") | |
(getAttributes [] att) | |
(getAppId [] "_local_"))] | |
(ApiProxy/setEnvironmentForCurrentThread env-proxy))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment