Sensifying location of defs
svn: r6632
This commit is contained in:
parent
6f0ed133b3
commit
9341654f05
|
@ -8,7 +8,11 @@
|
||||||
[read-configuration-table (path-string? . -> . configuration-table?)]
|
[read-configuration-table (path-string? . -> . configuration-table?)]
|
||||||
[write-configuration-table (configuration-table? path-string? . -> . void)]
|
[write-configuration-table (configuration-table? path-string? . -> . void)]
|
||||||
[configuration-table->sexpr (configuration-table? . -> . list?)]
|
[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)
|
(define (get-binding key bindings default)
|
||||||
(first (get-binding* key bindings (list default))))
|
(first (get-binding* key bindings (list default))))
|
||||||
|
@ -85,13 +89,13 @@
|
||||||
|
|
||||||
(define (configuration-table->sexpr new)
|
(define (configuration-table->sexpr new)
|
||||||
`((port ,(configuration-table-port new))
|
`((port ,(configuration-table-port new))
|
||||||
(max-waiting ,(configuration-table-max-waiting new))
|
(max-waiting ,(configuration-table-max-waiting new))
|
||||||
(initial-connection-timeout ,(configuration-table-initial-connection-timeout new))
|
(initial-connection-timeout ,(configuration-table-initial-connection-timeout new))
|
||||||
(default-host-table
|
(default-host-table
|
||||||
,(host-table->sexpr (configuration-table-default-host new)))
|
,(host-table->sexpr (configuration-table-default-host new)))
|
||||||
(virtual-host-table
|
(virtual-host-table
|
||||||
. ,(map (lambda (h) (list (car h) (host-table->sexpr (cdr h))))
|
. ,(map (lambda (h) (list (car h) (host-table->sexpr (cdr h))))
|
||||||
(configuration-table-virtual-hosts new)))))
|
(configuration-table-virtual-hosts new)))))
|
||||||
|
|
||||||
; write-configuration-table : configuration-table path -> void
|
; write-configuration-table : configuration-table path -> void
|
||||||
; writes out the new configuration file
|
; writes out the new configuration file
|
||||||
|
|
|
@ -83,6 +83,8 @@ the configuration table S-expression file format described in
|
||||||
reading, writing, parsing, and printing @scheme[configuration-table]
|
reading, writing, parsing, and printing @scheme[configuration-table]
|
||||||
structures.
|
structures.
|
||||||
|
|
||||||
|
@defthing[default-configuration-table-path path?]{The default configuration table S-expression file.}
|
||||||
|
|
||||||
@defproc[(sexpr->configuration-table (sexpr list?))
|
@defproc[(sexpr->configuration-table (sexpr list?))
|
||||||
configuration-table?]{
|
configuration-table?]{
|
||||||
This function converts a @scheme[configuration-table] from an S-expression.
|
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}.
|
of @file{dispatchers/dispatch-servlets.ss} and @file{dispatchers/dispatch-lang.ss}.
|
||||||
|
|
||||||
@; XXX Define make-servlet-namespace?
|
@; XXX Define make-servlet-namespace?
|
||||||
|
|
||||||
@; XXX Use actual keyword argument syntax
|
@; XXX Use actual keyword argument syntax
|
||||||
|
|
||||||
@defproc[(make-make-servlet-namespace (#:to-be-copied-module-specs to-be-copied-module-specs (listof module-spec?)))
|
@defproc[(make-make-servlet-namespace (#:to-be-copied-module-specs to-be-copied-module-specs (listof module-spec?)))
|
||||||
|
|
|
@ -40,9 +40,6 @@ identifiers:
|
||||||
|
|
||||||
@file{web-config-unit.ss} provides the following:
|
@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?]
|
@defproc[(configuration-table->web-config\@ [path path?]
|
||||||
[#:port port (or/c false/c port-number?) #f]
|
[#:port port (or/c false/c port-number?) #f]
|
||||||
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
(lib "list.ss")
|
(lib "list.ss")
|
||||||
(lib "pretty.ss")
|
(lib "pretty.ss")
|
||||||
(lib "file.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-structs.ss" "web-server" "configuration")
|
||||||
(lib "configuration-table.ss" "web-server" "configuration")
|
(lib "configuration-table.ss" "web-server" "configuration")
|
||||||
(lib "util.ss" "web-server" "private"))
|
(lib "util.ss" "web-server" "private"))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(lib "pregexp.ss")
|
(lib "pregexp.ss")
|
||||||
(lib "unit.ss")
|
(lib "unit.ss")
|
||||||
(lib "tcp-sig.ss" "net"))
|
(lib "tcp-sig.ss" "net"))
|
||||||
(require "util.ss"
|
(require "../configuration/configuration-table.ss"
|
||||||
"../web-config-unit.ss"
|
"../web-config-unit.ss"
|
||||||
"../web-config-sig.ss"
|
"../web-config-sig.ss"
|
||||||
"../web-server-unit.ss"
|
"../web-server-unit.ss"
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
(require (prefix net: (lib "sendurl.ss" "net"))
|
(require (prefix net: (lib "sendurl.ss" "net"))
|
||||||
(lib "unit.ss"))
|
(lib "unit.ss"))
|
||||||
(require "web-server.ss"
|
(require "web-server.ss"
|
||||||
|
"configuration/configuration-table.ss"
|
||||||
"web-config-unit.ss"
|
"web-config-unit.ss"
|
||||||
"web-config-sig.ss"
|
"web-config-sig.ss"
|
||||||
"private/util.ss"
|
"private/util.ss"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
(module configuration-table-test mzscheme
|
(module configuration-table-test mzscheme
|
||||||
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
(require (planet "test.ss" ("schematics" "schemeunit.plt" 2))
|
||||||
(lib "file.ss")
|
(lib "file.ss")
|
||||||
(lib "configuration-table.ss" "web-server" "configuration")
|
(lib "configuration-table.ss" "web-server" "configuration"))
|
||||||
(lib "web-config-unit.ss" "web-server"))
|
|
||||||
(provide configuration-table-tests)
|
(provide configuration-table-tests)
|
||||||
|
|
||||||
(define configuration-table-tests
|
(define configuration-table-tests
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
(module web-config-unit mzscheme
|
(module web-config-unit mzscheme
|
||||||
(require (lib "unit.ss")
|
(require (lib "unit.ss")
|
||||||
(lib "kw.ss")
|
(lib "kw.ss"))
|
||||||
(lib "contract.ss"))
|
|
||||||
(require "private/util.ss"
|
(require "private/util.ss"
|
||||||
"private/cache-table.ss"
|
"private/cache-table.ss"
|
||||||
"configuration/configuration-table-structs.ss"
|
"configuration/configuration-table-structs.ss"
|
||||||
|
@ -11,11 +10,6 @@
|
||||||
"web-config-sig.ss")
|
"web-config-sig.ss")
|
||||||
(provide configuration-table->web-config@
|
(provide configuration-table->web-config@
|
||||||
configuration-table-sexpr->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
|
; configuration-table->web-config@ : path -> configuration
|
||||||
(define/kw (configuration-table->web-config@ table-file-name
|
(define/kw (configuration-table->web-config@ table-file-name
|
||||||
|
|
Loading…
Reference in New Issue
Block a user