From ab9905d493407de670801baf134e208336db05a0 Mon Sep 17 00:00:00 2001 From: Nicolas Buduroi Date: Sat, 16 May 2009 07:17:34 +0800 Subject: [PATCH] Rearranged namespace comments into docstrings and added missing license notices. Signed-off-by: James Reeves --- src/compojure.clj | 9 +++------ src/compojure/control.clj | 5 +---- src/compojure/crypto.clj | 5 +---- src/compojure/encodings.clj | 5 +---- src/compojure/html.clj | 5 +---- src/compojure/html/form_helpers.clj | 5 +---- src/compojure/html/gen.clj | 9 +++------ src/compojure/html/page_helpers.clj | 5 +---- src/compojure/http.clj | 7 ++----- src/compojure/http/helpers.clj | 5 +---- src/compojure/http/multipart.clj | 7 ++----- src/compojure/http/request.clj | 5 +---- src/compojure/http/response.clj | 5 +---- src/compojure/http/routes.clj | 9 +++------ src/compojure/http/servlet.clj | 5 +---- src/compojure/http/session.clj | 5 +---- src/compojure/map_utils.clj | 7 ++----- src/compojure/ns_utils.clj | 8 ++++++++ src/compojure/server/common.clj | 5 +---- src/compojure/server/grizzly.clj | 7 ++----- src/compojure/server/jetty.clj | 5 +---- src/compojure/str_utils.clj | 5 +---- src/compojure/validation.clj | 11 ++++++++--- src/compojure/validation/predicates.clj | 8 ++++++++ 24 files changed, 55 insertions(+), 97 deletions(-) diff --git a/src/compojure.clj b/src/compojure.clj index 6ee34830..5baa5e8e 100644 --- a/src/compojure.clj +++ b/src/compojure.clj @@ -6,13 +6,10 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure: -;; -;; Convenience library that includes every compojure.* namespace. If you want -;; to access Compojure quickly, and don't care about having everything in one -;; namespace, just use or require 'compojure. - (ns compojure + "Convenience library that includes every compojure.* namespace. If you want + to access Compojure quickly, and don't care about having everything in one + namespace, just use or require 'compojure." (:use compojure.ns-utils)) (immigrate diff --git a/src/compojure/control.clj b/src/compojure/control.clj index fe5fdd39..6622d740 100644 --- a/src/compojure/control.clj +++ b/src/compojure/control.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.control: -;; -;; Various macros for controling program flow. - (ns compojure.control + "Various macros for controling program flow." (:use clojure.contrib.seq-utils)) (defmacro return diff --git a/src/compojure/crypto.clj b/src/compojure/crypto.clj index 837050cc..a9e2e8c9 100644 --- a/src/compojure/crypto.clj +++ b/src/compojure/crypto.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.crypto: -;; -;; Functions for cryptographically signing, verifying and encrypting data. - (ns compojure.crypto + "Functions for cryptographically signing, verifying and encrypting data." (:use compojure.encodings) (:import javax.crypto.Mac) (:import javax.crypto.spec.SecretKeySpec) diff --git a/src/compojure/encodings.clj b/src/compojure/encodings.clj index 1417c2e1..d56986e1 100644 --- a/src/compojure/encodings.clj +++ b/src/compojure/encodings.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.encodings: -;; -;; Functions for encoding data. - (ns compojure.encodings + "Functions for encoding data." (:use compojure.str-utils) (:use clojure.contrib.duck-streams) (:import java.net.URLEncoder) diff --git a/src/compojure/html.clj b/src/compojure/html.clj index 10485244..d106263b 100644 --- a/src/compojure/html.clj +++ b/src/compojure/html.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.html: -;; -;; Shortcut to include all compojure.http.* namespaces. - (ns compojure.html + "Shortcut to include all compojure.http.* namespaces." (:use compojure.ns-utils)) (immigrate diff --git a/src/compojure/html/form_helpers.clj b/src/compojure/html/form_helpers.clj index 66ea5f1a..aa963129 100644 --- a/src/compojure/html/form_helpers.clj +++ b/src/compojure/html/form_helpers.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.html.form-helpers: -;; -;; Functions for generating HTML forms and input fields. - (ns compojure.html.form-helpers + "Functions for generating HTML forms and input fields." (:use compojure.html.gen) (:use compojure.control) (:use compojure.str-utils) diff --git a/src/compojure/html/gen.clj b/src/compojure/html/gen.clj index 9c91bf15..6d16d0e2 100644 --- a/src/compojure/html/gen.clj +++ b/src/compojure/html/gen.clj @@ -6,13 +6,10 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.html.gen: -;; -;; A library for generating HTML output from a tree of vectors. The first item -;; of the vector is the tag name, the optional second item is a hash of -;; attributes, and the rest is the body of the tag. - (ns compojure.html.gen + "A library for generating HTML output from a tree of vectors. The first item + of the vector is the tag name, the optional second item is a hash of + attributes, and the rest is the body of the tag." (:use compojure.str-utils) (:use clojure.contrib.def)) diff --git a/src/compojure/html/page_helpers.clj b/src/compojure/html/page_helpers.clj index 825e20ee..f579df26 100644 --- a/src/compojure/html/page_helpers.clj +++ b/src/compojure/html/page_helpers.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.html.page-helpers: -;; -;; Functions for generating document and header boilerplate. - (ns compojure.html.page-helpers + "Functions for generating document and header boilerplate." (:use compojure.control) (:use compojure.html.gen) (:use compojure.str-utils) diff --git a/src/compojure/http.clj b/src/compojure/http.clj index 7c70197d..b66a7382 100644 --- a/src/compojure/http.clj +++ b/src/compojure/http.clj @@ -6,12 +6,9 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http: -;; -;; Shortcut to include compojure.http.routes, compojure.http.helpers and -;; compojure.http.servlet. - (ns compojure.http + "Shortcut to include compojure.http.routes, compojure.http.helpers and + compojure.http.servlet." (:use compojure.ns-utils)) (immigrate diff --git a/src/compojure/http/helpers.clj b/src/compojure/http/helpers.clj index fb4dc056..12112034 100644 --- a/src/compojure/http/helpers.clj +++ b/src/compojure/http/helpers.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.helper: -;; -;; Helper functions for things like redirection, serving files, 404s, etc. - (ns compojure.http.helpers + "Helper functions for things like redirection, serving files, 404s, etc." (:use compojure.encodings) (:use compojure.str-utils) (:use clojure.contrib.def) diff --git a/src/compojure/http/multipart.clj b/src/compojure/http/multipart.clj index 3e0e3ac9..23c06bc4 100644 --- a/src/compojure/http/multipart.clj +++ b/src/compojure/http/multipart.clj @@ -6,12 +6,9 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.multipart: -;; -;; Add multipart form handling to Compojure. Relies on the Apache Commons -;; FileUpload library. - (ns compojure.http.multipart + "Add multipart form handling to Compojure. Relies on the Apache Commons + FileUpload library." (:use clojure.contrib.def) (:use compojure.map-utils) (:import org.apache.commons.fileupload.FileUpload) diff --git a/src/compojure/http/request.clj b/src/compojure/http/request.clj index 967b7e5e..48e9cbda 100644 --- a/src/compojure/http/request.clj +++ b/src/compojure/http/request.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.request: -;; -;; Functions for pulling useful data out of a HTTP request map. - (ns compojure.http.request + "Functions for pulling useful data out of a HTTP request map." (:use compojure.control) (:use compojure.encodings) (:use compojure.map-utils) diff --git a/src/compojure/http/response.clj b/src/compojure/http/response.clj index 58228206..97a5a21b 100644 --- a/src/compojure/http/response.clj +++ b/src/compojure/http/response.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.response: -;; -;; Parse a Compojure route return value into a HTTP response map. - (ns compojure.http.response + "Parse a Compojure route return value into a HTTP response map." (:use clojure.contrib.def) (:use compojure.http.helpers) (:import clojure.lang.Fn) diff --git a/src/compojure/http/routes.clj b/src/compojure/http/routes.clj index 3f51657b..71b904df 100644 --- a/src/compojure/http/routes.clj +++ b/src/compojure/http/routes.clj @@ -6,13 +6,10 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.routes: -;; -;; Macros and functions for compiling routes in the form (method path & body) -;; into stand-alone functions that return the return value of the body, or the -;; keyword :next if they don't match. - (ns compojure.http.routes + "Macros and functions for compiling routes in the form (method path & body) + into stand-alone functions that return the return value of the body, or the + keyword :next if they don't match." (:use compojure.http.request) (:use compojure.http.response) (:use compojure.http.session) diff --git a/src/compojure/http/servlet.clj b/src/compojure/http/servlet.clj index 0d792093..dd770a49 100644 --- a/src/compojure/http/servlet.clj +++ b/src/compojure/http/servlet.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.servlet: -;; -;; Functions for interfacing Compojure with the Java servlet standard. - (ns compojure.http.servlet + "Functions for interfacing Compojure with the Java servlet standard." (:use compojure.http.routes) (:use compojure.http.request) (:import java.io.File) diff --git a/src/compojure/http/session.clj b/src/compojure/http/session.clj index 569c4432..a496eea3 100644 --- a/src/compojure/http/session.clj +++ b/src/compojure/http/session.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.http.session: -;; -;; Functions for creating and updating HTTP sessions. - (ns compojure.http.session + "Functions for creating and updating HTTP sessions." (:use compojure.str-utils) (:use compojure.http.helpers) (:use compojure.http.request) diff --git a/src/compojure/map_utils.clj b/src/compojure/map_utils.clj index 39630b7e..853c90ce 100644 --- a/src/compojure/map_utils.clj +++ b/src/compojure/map_utils.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.seq-utils -;; -;; Utility functions for manipulating maps - -(ns compojure.map-utils) +(ns compojure.map-utils + "functions for manipulating maps.") (defn assoc-vec "Associate a key with a value. If the key already exists in the map, create a diff --git a/src/compojure/ns_utils.clj b/src/compojure/ns_utils.clj index 725edd0c..5e26ab2d 100644 --- a/src/compojure/ns_utils.clj +++ b/src/compojure/ns_utils.clj @@ -1,3 +1,11 @@ +;; Copyright (c) James Reeves. All rights reserved. +;; The use and distribution terms for this software are covered by the Eclipse +;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which +;; can be found in the file epl-v10.html at the root of this distribution. By +;; using this software in any fashion, you are agreeing to be bound by the +;; terms of this license. You must not remove this notice, or any other, from +;; this software. + (ns compojure.ns-utils) (defn immigrate diff --git a/src/compojure/server/common.clj b/src/compojure/server/common.clj index 7523c4d5..b31fbd65 100644 --- a/src/compojure/server/common.clj +++ b/src/compojure/server/common.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.server.common -;; -;; Common functions for implementing compojure server wrapper. - (ns compojure.server.common + "Common functions for implementing compojure server wrapper." (:import java.net.URL)) (defn get-host-and-path diff --git a/src/compojure/server/grizzly.clj b/src/compojure/server/grizzly.clj index 60080cf4..5ebae9ac 100644 --- a/src/compojure/server/grizzly.clj +++ b/src/compojure/server/grizzly.clj @@ -6,12 +6,9 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.server.grizzly -;; -;; Clojure interface to start an embedded Grizzly server. To compile, use: -;; ant -Dwith.grizzly - (ns compojure.server.grizzly + "Clojure interface to start an embedded Grizzly server. To compile, use: + ant -Dwith.grizzly" (:use compojure.control) (:use compojure.server.common) (:import com.sun.grizzly.http.embed.GrizzlyWebServer) diff --git a/src/compojure/server/jetty.clj b/src/compojure/server/jetty.clj index 6039cd79..24ba6dbe 100644 --- a/src/compojure/server/jetty.clj +++ b/src/compojure/server/jetty.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.jetty: -;; -;; Clojure interface to start an embedded Jetty server. - (ns compojure.server.jetty + "Clojure interface to start an embedded Jetty server." (:use compojure.control) (:use compojure.server.common) (:import org.mortbay.jetty.Server) diff --git a/src/compojure/str_utils.clj b/src/compojure/str_utils.clj index 68052592..5dc6901a 100644 --- a/src/compojure/str_utils.clj +++ b/src/compojure/str_utils.clj @@ -6,11 +6,8 @@ ;; terms of this license. You must not remove this notice, or any other, from ;; this software. -;; compojure.str-utils: -;; -;; Utility functions for manipulating strings - (ns compojure.str-utils + "Utility functions for manipulating strings." (:use clojure.contrib.seq-utils) (:use clojure.contrib.str-utils) (:import clojure.lang.Named)) diff --git a/src/compojure/validation.clj b/src/compojure/validation.clj index c1a98141..5d3fc982 100644 --- a/src/compojure/validation.clj +++ b/src/compojure/validation.clj @@ -1,8 +1,13 @@ -;; compojure.validation -;; -;; Functions for validating form parameters. +;; Copyright (c) James Reeves. All rights reserved. +;; The use and distribution terms for this software are covered by the Eclipse +;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which +;; can be found in the file epl-v10.html at the root of this distribution. By +;; using this software in any fashion, you are agreeing to be bound by the +;; terms of this license. You must not remove this notice, or any other, from +;; this software. (ns compojure.validation + "Functions for validating form parameters." (:use compojure.control) (:use compojure.html.form-helpers) (:use compojure.html.page-helpers) diff --git a/src/compojure/validation/predicates.clj b/src/compojure/validation/predicates.clj index e15ff130..30cda60d 100644 --- a/src/compojure/validation/predicates.clj +++ b/src/compojure/validation/predicates.clj @@ -1,3 +1,11 @@ +;; Copyright (c) James Reeves. All rights reserved. +;; The use and distribution terms for this software are covered by the Eclipse +;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which +;; can be found in the file epl-v10.html at the root of this distribution. By +;; using this software in any fashion, you are agreeing to be bound by the +;; terms of this license. You must not remove this notice, or any other, from +;; this software. + (ns compojure.validation.predicates (:use compojure.str-utils))