forked from ring-clojure/ring
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
330 additions
and
340 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
bundle | ||
bundle |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
; An example of inserting the linter between each component to ensure | ||
; compliance to the Ring spec. | ||
|
||
(ns ring.examples.linted | ||
(:use (ring.handler dump) | ||
(ring.middleware stacktrace file file-info reload lint) | ||
(ring.adapter jetty))) | ||
|
||
(def app | ||
(-> handle-dump | ||
wrap-lint | ||
wrap-stacktrace | ||
wrap-lint | ||
wrap-file-info | ||
wrap-lint | ||
(wrap-file "src/ring/examples/public") | ||
wrap-lint | ||
(wrap-reload '(ring.dump) | ||
wrap-lint))) | ||
|
||
(run-jetty app {:port 8080}) |
File renamed without changes
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; A example of modular construction of Ring apps. | ||
|
||
(ns ring.example.wrapping | ||
(:use (ring.handler dump) | ||
(ring.middleware stacktrace file-info file) | ||
(ring.adapter jetty) | ||
(clojure.contrib fcase))) | ||
|
||
(defn wrap-error [app] | ||
(fn [req] | ||
(if (= "/error" (:uri req)) | ||
(throwf "Demonstrating ring.middleware.stacktrace") | ||
(app req)))) | ||
|
||
(def app | ||
(-> handle-dump | ||
wrap-stacktrace | ||
wrap-file-info | ||
(wrap-file "src/ring/examples/public") | ||
wrap-error)) | ||
|
||
(run-jetty app {:port 8080}) |
Oops, something went wrong.