diff --git a/app/demo/main.lisp b/app/demo/main.lisp index 53bae33..c1d7ea0 100644 --- a/app/demo/main.lisp +++ b/app/demo/main.lisp @@ -2,8 +2,8 @@ (defpackage :scopes/app/demo (:use :common-lisp) - (:local-nicknames (:forge :scopes/forge)) - (:export #:main)) + (:local-nicknames (:forge :scopes/forge)) + (:export #:main)) (in-package :scopes/app/demo) diff --git a/config.lisp b/config.lisp new file mode 100644 index 0000000..3d86c8c --- /dev/null +++ b/config.lisp @@ -0,0 +1,11 @@ +;;;; cl-scopes/config + +;;;; Utilities for configuration of scopes services. + +(defpackage :scopes/config + (:use :common-lisp) + (:export #:base #:make-system-path)) + +(in-package :scopes/config) + +(defclass base () ()) diff --git a/scopes.asd b/scopes.asd index 711b4c8..0c2a3d2 100644 --- a/scopes.asd +++ b/scopes.asd @@ -6,8 +6,10 @@ :version "0.0.1" :homepage "https://www.cyberconcepts.org" :description "" - :depends-on (:alexandria :chanl :com.inuoe.jzon :dbi :local-time :log4cl :str :sxql) - :components ((:file "forge/forge") + :depends-on (:alexandria :chanl :cl-dotenv :com.inuoe.jzon :dbi + :local-time :log4cl :str :sxql) + :components ((:file "config") + (:file "forge/forge") (:file "storage/storage") (:file "storage/tracking" :depends-on ("storage/storage")) (:file "testing") @@ -21,8 +23,10 @@ (defsystem :scopes/test :depends-on (:scopes) - :components ((:file "test/test-storage") + :components ((:file "test/test-config") + (:file "test/test-storage") (:file "test/test-forge")) :perform (test-op (o c) + (symbol-call :scopes/test-config :run) (symbol-call :scopes/test-storage :run-all) (symbol-call :scopes/test-forge :run))) diff --git a/test/test-config.lisp b/test/test-config.lisp index 01b1132..865be58 100644 --- a/test/test-config.lisp +++ b/test/test-config.lisp @@ -1,6 +1,6 @@ -;;;; cl-scopes/test/test-confi +;;;; cl-scopes/test/test-config -;;;; tests for the scopes/config functionality +;;;; Tests for the scopes/config functionality. (defpackage :scopes/test-config (:use :common-lisp) @@ -11,10 +11,13 @@ (in-package :scopes/test-config) -(defvar *override-keys* '(USER, PASSWORD)) - -(defclass config (config:base)) +(defclass config (config:base) + ((override-keys :initform '(user password) :reader override-keys + :allocation :class))) (defun run () (let ((t:*test-suite* (t:test-suite "config"))) - + (test-make-path) + (t:show-result))) + +(t:deftest test-make-path ()) diff --git a/test/test-storage.lisp b/test/test-storage.lisp index b46119f..1452e44 100644 --- a/test/test-storage.lisp +++ b/test/test-storage.lisp @@ -15,6 +15,7 @@ (defparameter *db-config-test* nil) (defparameter *config-source* + ;(asdf:system-relative-pathname :scopes "test") (str:concat (namestring (asdf:system-source-directory :scopes)) "test/config-")) (defun run-all ()