Sensifying location of defs

svn: r6632
This commit is contained in:
Jay McCarthy 2007-06-13 16:53:09 +00:00
parent 6f0ed133b3
commit 9341654f05
8 changed files with 18 additions and 24 deletions

View File

@ -8,7 +8,11 @@
[read-configuration-table (path-string? . -> . configuration-table?)]
[write-configuration-table (configuration-table? path-string? . -> . void)]
[configuration-table->sexpr (configuration-table? . -> . list?)]
[sexpr->configuration-table (list? . -> . configuration-table?)])
[sexpr->configuration-table (list? . -> . configuration-table?)]
[default-configuration-table-path path?])
(define default-configuration-table-path
(build-path (collection-path "web-server") "default-web-root" "configuration-table.ss"))
(define (get-binding key bindings default)
(first (get-binding* key bindings (list default))))
@ -85,13 +89,13 @@
(define (configuration-table->sexpr new)
`((port ,(configuration-table-port new))
(max-waiting ,(configuration-table-max-waiting new))
(initial-connection-timeout ,(configuration-table-initial-connection-timeout new))
(default-host-table
,(host-table->sexpr (configuration-table-default-host new)))
(virtual-host-table
. ,(map (lambda (h) (list (car h) (host-table->sexpr (cdr h))))
(configuration-table-virtual-hosts new)))))
(max-waiting ,(configuration-table-max-waiting new))
(initial-connection-timeout ,(configuration-table-initial-connection-timeout new))
(default-host-table
,(host-table->sexpr (configuration-table-default-host new)))
(virtual-host-table
. ,(map (lambda (h) (list (car h) (host-table->sexpr (cdr h))))
(configuration-table-virtual-hosts new)))))
; write-configuration-table : configuration-table path -> void
; writes out the new configuration file

View File

@ -83,6 +83,8 @@ the configuration table S-expression file format described in
reading, writing, parsing, and printing @scheme[configuration-table]
structures.
@defthing[default-configuration-table-path path?]{The default configuration table S-expression file.}
@defproc[(sexpr->configuration-table (sexpr list?))
configuration-table?]{
This function converts a @scheme[configuration-table] from an S-expression.
@ -152,7 +154,6 @@ This function writes a @scheme[configuration-table] to @scheme[path].
of @file{dispatchers/dispatch-servlets.ss} and @file{dispatchers/dispatch-lang.ss}.
@; XXX Define make-servlet-namespace?
@; XXX Use actual keyword argument syntax
@defproc[(make-make-servlet-namespace (#:to-be-copied-module-specs to-be-copied-module-specs (listof module-spec?)))

View File

@ -40,9 +40,6 @@ identifiers:
@file{web-config-unit.ss} provides the following:
@; XXX Move to configuration/configuration-table.ss ?
@defthing[default-configuration-table-path path?]{The default configuration table.}
@defproc[(configuration-table->web-config\@ [path path?]
[#:port port (or/c false/c port-number?) #f]
[#:listen-ip listen-ip (or/c false/c string?) #f]

View File

@ -5,8 +5,6 @@
(lib "list.ss")
(lib "pretty.ss")
(lib "file.ss")
(only (lib "web-config-unit.ss" "web-server")
default-configuration-table-path)
(lib "configuration-table-structs.ss" "web-server" "configuration")
(lib "configuration-table.ss" "web-server" "configuration")
(lib "util.ss" "web-server" "private"))

View File

@ -3,7 +3,7 @@
(lib "pregexp.ss")
(lib "unit.ss")
(lib "tcp-sig.ss" "net"))
(require "util.ss"
(require "../configuration/configuration-table.ss"
"../web-config-unit.ss"
"../web-config-sig.ss"
"../web-server-unit.ss"

View File

@ -2,6 +2,7 @@
(require (prefix net: (lib "sendurl.ss" "net"))
(lib "unit.ss"))
(require "web-server.ss"
"configuration/configuration-table.ss"
"web-config-unit.ss"
"web-config-sig.ss"
"private/util.ss"

View File

@ -1,8 +1,7 @@
(module configuration-table-test mzscheme
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
(lib "file.ss")
(lib "configuration-table.ss" "web-server" "configuration")
(lib "web-config-unit.ss" "web-server"))
(lib "configuration-table.ss" "web-server" "configuration"))
(provide configuration-table-tests)
(define configuration-table-tests

View File

@ -1,7 +1,6 @@
(module web-config-unit mzscheme
(require (lib "unit.ss")
(lib "kw.ss")
(lib "contract.ss"))
(lib "kw.ss"))
(require "private/util.ss"
"private/cache-table.ss"
"configuration/configuration-table-structs.ss"
@ -11,11 +10,6 @@
"web-config-sig.ss")
(provide configuration-table->web-config@
configuration-table-sexpr->web-config@)
(provide/contract
[default-configuration-table-path path?])
(define default-configuration-table-path
(build-path (collection-path "web-server") "default-web-root" "configuration-table.ss"))
; configuration-table->web-config@ : path -> configuration
(define/kw (configuration-table->web-config@ table-file-name