Skip to content
Browse files

Fixes to make examples work.

  • Loading branch information...
1 parent e6abe13 commit c5eceba5cf78a84f51f06601cd44817ca9d958ff @mmcgrana committed
View
2 README.textile
@@ -14,7 +14,7 @@ First clone the Ring source and download Ring's dependencies:
To see a live "Hello World" Ring app, run:
- java -Djava.ext.dirs=deps clojure.main src/ring/examples/hello_world.clj
+ java -Djava.ext.dirs=deps clojure.main src/ring/example/hello_world.clj
Now visit @http://localhost:8080/@ in your browser; the Ring app will respond to your request with a simple HTML page indicating the time of day.
View
4 src/ring/example/linted.clj
@@ -1,7 +1,7 @@
; An example of inserting the linter between each component to ensure
; compliance to the Ring spec.
-(ns ring.examples.linted
+(ns ring.example.linted
(:use (ring.handler dump)
(ring.middleware stacktrace file file-info reload lint)
(ring.adapter jetty)))
@@ -13,7 +13,7 @@
wrap-lint
wrap-file-info
wrap-lint
- (wrap-file "src/ring/examples/public")
+ (wrap-file "src/ring/example/public")
wrap-lint
(wrap-reload '(ring.dump)
wrap-lint)))
View
8 src/ring/example/wrapping.clj
@@ -4,7 +4,7 @@
(:use (ring.handler dump)
(ring.middleware stacktrace file-info file)
(ring.adapter jetty)
- (clojure.contrib fcase)))
+ (clojure.contrib except)))
(defn wrap-error [app]
(fn [req]
@@ -14,9 +14,9 @@
(def app
(-> handle-dump
- wrap-stacktrace
+ wrap-error
+ (wrap-file "src/ring/example/public")
wrap-file-info
- (wrap-file "src/ring/examples/public")
- wrap-error))
+ wrap-stacktrace))
(run-jetty app {:port 8080})
View
2 src/ring/handler/dump.clj
@@ -47,7 +47,7 @@
:headers {"Content-Type" "text/html"}
:body (template req)})
-(def css "
+(def #^{:private true} css "
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
View
2 src/ring/middleware/stacktrace.clj
@@ -56,7 +56,7 @@
(catch Exception e
(response req e)))))
-(def css "
+(def #^{:private true} css "
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:

0 comments on commit c5eceba

Please sign in to comment.
Something went wrong with that request. Please try again.