Permalink
Browse files

basic changes needed to get LP working with PLT 4.1.5

  • Loading branch information...
vegashacker committed Apr 21, 2009
1 parent 8fcd1d2 commit 8833ea02ef15bc492be98a0fa0a66bd68d71ae0c
Showing with 29 additions and 16 deletions.
  1. +1 −1 generate-lib.scm
  2. +2 −2 leftparen.scm
  3. +1 −1 page.scm
  4. +7 −7 scribblings/leftparen.scrbl
  5. +15 −2 web-export.ss
  6. +3 −3 web-support.scm
View
@@ -9,7 +9,7 @@
(provide generate-project)
-(define PLANET_MAJOR_VERISON 4)
+(define PLANET_MAJOR_VERISON 5)
(define PLANET_MINOR_VERSION 1)
(define (generate-project cmd-line-args-vec)
View
@@ -1,7 +1,7 @@
#lang scheme/base
(require scheme/match
- (planet untyped/dispatch:1:=7/dispatch)
+ (planet untyped/dispatch:2:=1/dispatch)
(planet jaymccarthy/with-bindings:1:=2/with-bindings)
web-server/servlet-env
web-server/dispatchers/dispatch
@@ -31,7 +31,7 @@
(provide
;; the work of others:
- (all-from-out (planet untyped/dispatch:1:=7/dispatch))
+ (all-from-out (planet untyped/dispatch:2:=1/dispatch))
(all-from-out (planet jaymccarthy/with-bindings:1:=2/with-bindings))
;; built-in PLT tools:
View
@@ -1,7 +1,7 @@
#lang scheme/base
(require net/url
- (planet untyped/dispatch:1:=7/dispatch)
+ (planet untyped/dispatch:2:=1/dispatch)
"util.scm"
"web-export.ss"
"web-support.scm"
@@ -1,23 +1,23 @@
#lang scribble/doc
@(require scribble/manual)
-@title{LeftParen 0.51 Documentation}
+@title{LeftParen 0.6 Documentation}
Website: @link["http://leftparen.com"]{http://leftparen.com}
LeftParen is a framework for quickly creating web apps. It runs on
-PLT Scheme v4.1.3.9 or greater. (@bold{This is not-yet-officially-released}, so you'll have to download it from the @link["http://pre.plt-scheme.org/installers/"]{PLT Pre-Relese Software page}.) LeftParen is released under an @link["http://github.com/vegashacker/leftparen/tree/master/MIT-LICENSE.txt"]{MIT License}. The source is available on @link["http://github.com/vegashacker/leftparen/tree/master"]{github}.
+PLT Scheme v4.1.5. LeftParen is released under an @link["http://github.com/vegashacker/leftparen/tree/master/MIT-LICENSE.txt"]{MIT License}. The source is available on @link["http://github.com/vegashacker/leftparen/tree/master"]{github}.
@section{Installing LeftParen}
-You'll need PLT Scheme v4.1.3@bold{.9} or greater installed.
+You'll need PLT Scheme v4.1.5 installed. More recent versions may work, but they are untested.
Make sure that @scheme[mzscheme] is in your path. You should be ready
to go if you can do this:
@verbatim{
% mzscheme
-Welcome to MzScheme v4.1.3.9...
+Welcome to MzScheme v4.1.5...
>
}
@@ -26,7 +26,7 @@ Installing LeftParen is done automatically when you perform various @link["http:
At any point, if you see an error like
@verbatim{
-make-directory: cannot make directory: /home/rob/.plt-scheme/planet/300/4.1.3.9 (Permission denied; errno=13)
+make-directory: cannot make directory: /home/rob/.plt-scheme/planet/300/4.1.5 (Permission denied; errno=13)
}
try re-running the command with @tt{sudo} (you won't need to do this everytime--just the once).
@@ -37,7 +37,7 @@ try re-running the command with @tt{sudo} (you won't need to do this everytime--
We're going to make a project called @tt{hello-world}. Change to the directory that you'd like to create the project in. Then issue
-@verbatim{% mzscheme -e '(require (planet vegashacker/leftparen:4:=1/generate))' hello-world}
+@verbatim{% mzscheme -e '(require (planet vegashacker/leftparen:5:=1/generate))' hello-world}
This will create a @tt{hello-world} project directory for you. In this directory you'll find the @tt{script} directory, which contains some useful scripts. All paths are relative to this project directory, so when calling scripts, you always want to be at the project root.
@@ -65,7 +65,7 @@ Point your browser to @link["http://localhost:8765"]{http://localhost:8765} and
Now let's try implementing the true "hello world" of web apps---a blog. First, execute the following commands from the directory in which you want to create your project:
@verbatim{
-% mzscheme -e '(require (planet vegashacker/leftparen:4:=1/generate))' blogerton
+% mzscheme -e '(require (planet vegashacker/leftparen:5:=1/generate))' blogerton
% cd blogerton
% chmod u+x script/server
}
View
@@ -5,15 +5,18 @@
;; own LeftParen projects if you want.
(require web-server/http/request-structs
- web-server/http/response-structs
web-server/http/bindings
web-server/http/redirect
- net/url)
+ web-server/http/response-structs
+ net/url
+ xml
+ "util.scm")
(provide make-header
header?
make-response/full
+ response/c
response?
response/full?
response/incremental?
@@ -40,3 +43,13 @@
)
+(define (response? obj)
+ (or (response/basic? obj)
+ (and (pair? obj)
+ (bytes? (car obj))
+ (list? (cdr obj))
+ (every (lambda (x) (or (string? x) (bytes? x)) (cdr obj))))
+ (xexpr? obj)))
+
+
+
View
@@ -51,7 +51,7 @@
;; optional
(#:type bytes? #:extras list?)
;; returns
- response?)))
+ response/c)))
;;
(define (list-response content-lst #:type (type #"text/html") #:extras (extras '()))
(basic-response (append-map (lambda (content) (map xexpr->string
@@ -222,7 +222,7 @@
;; response-from-promise
;;
(provide/contract
- (response-from-promise (->* (response-promise?) (#:headers (listof header?)) response?)))
+ (response-from-promise (->* (response-promise?) (#:headers (listof header?)) response/c)))
;;
(define (response-from-promise r-p #:headers (headers '()))
((response-promise-fn r-p) #:headers headers))
@@ -255,7 +255,7 @@
;; final-prep-of-response
;;
(provide/contract
- (final-prep-of-response (-> (or/c response? response-promise?) response?)))
+ (final-prep-of-response (-> (or/c response/c response-promise?) response/c)))
;;
(define (final-prep-of-response response-or-promise)
(if (response-promise? response-or-promise)

0 comments on commit 8833ea0

Please sign in to comment.