Skip to content

Commit 48555ca

Browse files
committed
First commit
0 parents  commit 48555ca

14 files changed

+109
-0
lines changed

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: lein run -m joodo.main production

config/development.clj

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(use 'joodo.env)
2+
3+
(def environment {
4+
:joodo-env "development"
5+
})
6+
7+
(swap! *env* merge environment)

config/environment.clj

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(use 'joodo.env)
2+
3+
(def environment {
4+
:joodo.core.namespace "clojurekoans.core"
5+
; environment settings go here
6+
})
7+
8+
(swap! *env* merge environment)

config/production.clj

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(use 'joodo.env)
2+
3+
(def environment {
4+
:joodo-env "production"
5+
})
6+
7+
(swap! *env* merge environment)

project.clj

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(defproject clojurekoans "0.0.1"
2+
:description "A website deployable to AppEngine"
3+
:dependencies [[org.clojure/clojure "1.2.1"]
4+
[joodo "0.6.0-SNAPSHOT"]]
5+
:dev-dependencies [[speclj "1.4.0"]]
6+
:test-path "spec/"
7+
:java-source-path "src/"
8+
:repl-init-script "config/development/repl_init.clj"
9+
:joodo-core-namespace clojurekoans.core)

public/images/joodo.png

2.94 KB
Loading

public/javascript/clojurekoans.js

Whitespace-only changes.

public/stylesheets/clojurekoans.css

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
body {
2+
background: #e3b200;
3+
font-family: sans-serif;
4+
width: 600px;
5+
margin: 30px auto 0 auto;
6+
}

spec/clojurekoans/core_spec.clj

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(ns clojurekoans.core-spec
2+
(:use
3+
[speclj.core]
4+
[joodo.spec-helpers.controller]
5+
[clojurekoans.core]))
6+
7+
(describe "clojurekoans"
8+
9+
(with-mock-rendering)
10+
(with-routes app-handler)
11+
12+
(it "handles home page"
13+
(let [result (do-get "/")]
14+
(should= 200 (:status result))
15+
(should= "index" @rendered-template)))
16+
)
17+
18+
(run-specs)

src/clojurekoans/core.clj

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
(ns clojurekoans.core
2+
(:use
3+
[compojure.core :only (defroutes GET)]
4+
[compojure.route :only (not-found)]
5+
[joodo.middleware.view-context :only (wrap-view-context)]
6+
[joodo.views :only (render-template render-html)]
7+
[joodo.controllers :only (controller-router)]))
8+
9+
(defroutes clojurekoans-routes
10+
(GET "/" [] (render-template "index"))
11+
(controller-router 'clojurekoans.controller)
12+
(not-found (render-template "not_found" :template-root "clojurekoans/view" :ns `clojurekoans.view.view-helpers)))
13+
14+
(def app-handler
15+
(->
16+
clojurekoans-routes
17+
(wrap-view-context :template-root "clojurekoans/view" :ns `clojurekoans.view.view-helpers)))
18+
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[:div {:style "text-align: center;"}
2+
[:img {:src "/images/joodo.png"}]
3+
[:h1 "Welcomes You!"]]
4+
5+
[:h3 "Intro"]
6+
[:p "Gaeshi is a clojure framework for building Google AppEngine sites. The project home is at "
7+
[:a {:href "https://github.com/slagyr/joodo"} "https://github.com/slagyr/joodo"] "."
8+
"It consists of 3 parts"
9+
[:ul
10+
[:li [:b "Kuzushi"] "- which means 'breaking balance', is a Leiningen plugin that supplies all the Geashi commands."]
11+
[:li [:b "Tsukuri"] "- which means 'entry', is a library containing all the development tools."]
12+
[:li [:b "Kake"] "- which means 'execution', is the runtime library that contains all the main APIs."]]]
13+
14+
[:h3 "License"]
15+
[:p "Copyright (C) 2011 Micah Martin All Rights Reserved."]
16+
[:p "Distributed under the The MIT License."]
17+
18+
[:p "This app was generated for clojurekoans."]
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(doctype :html5)
2+
[:html
3+
[:head
4+
[:meta {:http-equiv "Content-Type" :content "text/html" :charset "iso-8859-1"}]
5+
[:title "clojurekoans"]
6+
(include-css "/stylesheets/clojurekoans.css")
7+
(include-js "/javascript/clojurekoans.js")]
8+
[:body
9+
(eval (:template-body joodo.views/*view-context*))
10+
]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[:h1 "Not Found"]
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(ns clojurekoans.view.view-helpers
2+
"Put helper functions for views in this namespace."
3+
(:use
4+
[joodo.views :only (render-partial *view-context*)]
5+
[hiccup.page-helpers]
6+
[hiccup.form-helpers]))

0 commit comments

Comments
 (0)