Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Ring 0.2.0 dependencies

  • Loading branch information...
commit 493851f509fa9aad5733428323bbc276f1d025d1 1 parent c25d3c6
@weavejester authored
Showing with 10 additions and 5 deletions.
  1. +4 −2 project.clj
  2. +6 −3 src/compojure/core.clj
View
6 project.clj
@@ -3,5 +3,7 @@
:url "http://github/weavejester/compojure/tree/refactor"
:dependencies [[org.clojure/clojure "1.1.0"]
[org.clojure/clojure-contrib "1.1.0"]
- [clout "0.2.0-SNAPSHOT"]]
- :dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]])
+ [clout "0.2.0-SNAPSHOT"]
+ [ring/ring-core "0.2.0-SNAPSHOT"]]
+ :dev-dependencies [[lein-clojars "0.5.0-SNAPSHOT"]
+ [ring/ring-jetty-adapter "0.2.0-SNAPSHOT"]])
View
9 src/compojure/core.clj
@@ -8,7 +8,8 @@
(ns compojure.core
"A concise syntax for generating Ring handlers."
- (:use clout.core
+ (:use [ring.middleware params cookies]
+ clout.core
compojure.response))
(defn- method-matches
@@ -67,8 +68,10 @@
(defn routes
"Create a Ring handler by combining several handlers into one."
[& handlers]
- (fn [request]
- (some #(% request) handlers)))
+ (wrap-cookies
+ (wrap-params
+ (fn [request]
+ (some #(% request) handlers)))))
(defn- apply-doc
"Return a symbol and body with an optional docstring applied."
Please sign in to comment.
Something went wrong with that request. Please try again.