Browse files

refactored datastore helper and removed lein-clojars from projects.clj

  • Loading branch information...
1 parent 15b77d8 commit 785fa8fd55190a72504315c509378fc06a59195a @slagyr committed Aug 9, 2011
Showing with 22 additions and 16 deletions.
  1. +1 −0 .gitignore
  2. +3 −2 TODO.md
  3. +2 −1 kake/project.clj
  4. +7 −7 tsukuri/project.clj
  5. +9 −6 tsukuri/src/gaeshi/spec_helpers/datastore.clj
View
1 .gitignore
@@ -4,3 +4,4 @@ lib
classes
.idea
*.iml
+gaeshi-mvn
View
5 TODO.md
@@ -1,11 +1,12 @@
== TODO
* Create WEB-INF dir if if doesn't exist when starting the server
* It seems like the core-handler used by GaeshiDevServlet is not being reloaded by fresh
-* _ah/admin/backends and _ah/admin/inboundmail routes aren't working
+* '_ah/admin/backends' and _ah/admin/inboundmail routes aren't working
* generate sample model, controller, view with specs
* spec_helpers/controller must record all views rendered in addition to the last.
* the devserver should run a repl server
* need to resolve conflict with hiccup files. The .clj extension should be removed, and prepare-views task updated to exclude *.clj files.
* Add session clearing cron job to generated project
* Add a away to bypass timestamp updates in the datastore
-* Need to address problem where data is not loaded properly when the models haven't been loaded yet.
+* Need to address problem where data is not loaded properly when the models haven't been loaded yet.
+* Prepare task should run clean to empty classes dir. server task should not clean.
View
3 kake/project.clj
@@ -4,11 +4,12 @@
:url "file://LICENSE"
:distribution :repo
:comments "Copyright © 2011 Micah Martin All Rights Reserved."}
+ :repositories {"releases" "http://gaeshi-mvn.googlecode.com/svn/trunk/releases/"}
:dependencies [[org.clojure/clojure "1.2.1"]
[ring/ring-servlet "0.3.7"]
[compojure "0.6.2"]
[hiccup "0.3.1"]
- [com.google.appengine/appengine-api-1.0-sdk "1.5.0"]
+ [com.google.appengine/appengine-api-1.0-sdk "1.5.1"]
[inflections "0.4.3"]]
:dev-dependencies [[speclj "1.4.0"]
[gaeshi/tsukuri "0.6.0-SNAPSHOT"]
View
14 tsukuri/project.clj
@@ -4,16 +4,16 @@
:url "file://LICENSE"
:distribution :repo
:comments "Copyright © 2011 Micah Martin All Rights Reserved."}
- :repositories {"releases" "http://appengine-magic-mvn.googlecode.com/svn/releases/"}
+ :repositories {"releases" "http://gaeshi-mvn.googlecode.com/svn/trunk/releases/"}
:dependencies [[org.clojure/clojure "1.2.1"]
[speclj "1.3.1"]
[mmargs "1.2.0"]
[fresh "1.0.2"]
- [com.google.appengine/appengine-api-labs "1.5.0"]
- [com.google.appengine/appengine-api-stubs "1.5.0"]
- [com.google.appengine/appengine-local-runtime "1.5.0"]
- [com.google.appengine/appengine-local-runtime-shared "1.5.0"]
- [com.google.appengine/appengine-testing "1.5.0"]
+ [com.google.appengine/appengine-api-labs "1.5.1"]
+ [com.google.appengine/appengine-api-stubs "1.5.1"]
+ [com.google.appengine/appengine-local-runtime "1.5.1"]
+ [com.google.appengine/appengine-local-runtime-shared "1.5.1"]
+ [com.google.appengine/appengine-testing "1.5.1"]
[tomcat/jasper-runtime "5.0.28"]
[jstl "1.1.2"]
[taglibs/standard "1.1.2"]
@@ -22,7 +22,7 @@
[filecabinet "1.0.1"]]
:dev-dependencies [[speclj "1.4.0"]
[lein-clojars "0.6.0"]
- [com.google.appengine/appengine-api-1.0-sdk "1.5.0"]
+ [com.google.appengine/appengine-api-1.0-sdk "1.5.1"]
[ring/ring-servlet "0.3.7"]]
:test-path "spec/"
:java-source-path "src/")
View
15 tsukuri/src/gaeshi/spec_helpers/datastore.clj
@@ -9,15 +9,18 @@
LocalServiceTestHelper]
[com.google.apphosting.api ApiProxy]))
-(defn tear-down []
+(defn tear-down-local-datastore []
(.stop (ApiProxy/getDelegate))
- (ApiProxy/clearEnvironmentForCurrentThread)
- )
+ (ApiProxy/clearEnvironmentForCurrentThread))
+
+(defn set-up-local-datastore []
+ (.setUp (LocalServiceTestHelper.
+ (into-array LocalServiceTestConfig
+ [(LocalBlobstoreServiceTestConfig.) (LocalDatastoreServiceTestConfig.)]))))
(defn with-local-datastore []
(around [it]
(try
- (.setUp (LocalServiceTestHelper.
- (into-array LocalServiceTestConfig [(LocalBlobstoreServiceTestConfig.) (LocalDatastoreServiceTestConfig.)])))
+ (set-up-local-datastore)
(it)
- (finally (tear-down)))))
+ (finally (tear-down-local-datastore)))))

0 comments on commit 785fa8f

Please sign in to comment.