Skip to content

Commit 684eeab

Browse files
author
Julius.yu
committed
add writer project
1 parent b383acf commit 684eeab

File tree

8 files changed

+89
-0
lines changed

8 files changed

+89
-0
lines changed

payment/src/payment/views.clj

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
(ns payment.views
23
(:use [midje.sweet]
34
[clojure.string :only (blank?)])

tools/profiles.clj

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
[compojure/lein-template "0.2.0"]
77
[lein-newnew "0.2.6"]
88
[lein-midje "1.0.10"]
9+
[lein-create-template "0.1.1"]
910
[lein-tarsier "0.9.4"]]
1011
} }

writer/.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/target
2+
/lib
3+
/classes
4+
/checkouts
5+
pom.xml
6+
*.jar
7+
*.class
8+
.lein-deps-sum
9+
.lein-failures
10+
.lein-plugins
11+
.lein-env

writer/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# payment
2+
3+
FIXME
4+
5+
## Prerequisites
6+
7+
You will need [Leiningen][1] 1.7.0 or above installed.
8+
9+
[1]: https://github.com/technomancy/leiningen
10+
11+
## Running
12+
13+
To start a web server for the application, run:
14+
15+
lein ring server
16+
17+
## License
18+
19+
Copyright © 2012 FIXME

writer/backlog.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Writer backlog
2+
===============
3+
4+
Intention
5+
---------
6+
keep the stack of the work
7+
8+
Features
9+
-------
10+
11+
id description points priority estimation actual comment
12+
1. add a new note

writer/project.clj

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
(defproject writer "1.0.0-SNAPSHOT"
3+
:description "a knowledge,note writer"
4+
:url "http://example.com/FIXME"
5+
:dependencies [[org.clojure/clojure "1.4.0"]
6+
[compojure "1.1.1"]
7+
[midje "1.4.0"]
8+
[kerodon "0.0.7"]
9+
[org.clojure/java.jdbc "0.2.3"]
10+
[hiccup "1.0.0"]
11+
[org.clojure/tools.nrepl "0.2.0-beta10"]
12+
[mysql/mysql-connector-java "5.1.21"]]
13+
:plugins [[lein-ring "0.7.1"]
14+
[lein-cucumber "1.0.0"]]
15+
:ring {:handler writer.handler/app}
16+
:profiles
17+
{:dev {:dependencies [[ring-mock "0.1.2"]]
18+
:plugins [[lein-midje "2.0.1"]]}
19+
})

writer/src/writer/handler.clj

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
(ns writer.handler
2+
(:use [compojure.core])
3+
(:require [compojure.handler :as handler]
4+
[compojure.route :as route]
5+
[writer.views :as views]))
6+
7+
(defroutes app-routes
8+
(POST "/notes"
9+
{params :params}
10+
"add a new note""
11+
(views/create-new-note params))
12+
(route/not-found "Hello, Not Found"))
13+
14+
(def app
15+
(handler/site app-routes))

writer/src/writer/views.clj

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
(ns writer.views
3+
(:use [midje.sweet])
4+
(:import [java.lang.IllegalArgumentException]))
5+
6+
7+
(defn create-new-note
8+
"create a new note"
9+
[{user-id :USERID}]
10+
(str "welcome? user:" user-id))
11+

0 commit comments

Comments
 (0)