From 9e7feae81972af8162070ae5b559457c63745092 Mon Sep 17 00:00:00 2001 From: Alexander Vynnyk Date: Sun, 5 Feb 2017 16:39:03 +0200 Subject: [PATCH 1/2] Fix typo skelethon to skeleton --- TODO.md | 6 +- etc/jabs.conf | 14 +- share/bouts/default.bt | 2 +- share/hits/clean.hit | 4 +- share/hits/deploy-local.hit | 32 +- share/hits/initialize.hit | 2 +- share/hits/load-skelethon.hit | 4 +- share/hits/process-skelethon.hit | 4 +- share/hits/test.hit | 2 +- share/plugins/generic/make-binary/README.md | 2 +- share/plugins/generic/make-binary/build.jab | 2 +- .../generic/make-binary/src/make-binary.lisp | 6 +- share/plugins/generic/tmpl/build.jab | 2 +- share/plugins/generic/tmpl/plugin.lisp | 24 +- share/plugins/generic/tmpl/project.lisp | 32 +- share/plugins/generic/tmpl/runner.lisp | 2 +- share/plugins/repository/quicklisp/build.jab | 2 +- .../quicklisp/quicklisp-repository.lisp | 22 +- share/plugins/test/fiveam/build.jab | 2 +- share/rounds/initialize.rd | 2 +- src/core/jabs-asdf/jabs-asdf.lisp | 42 +- src/core/jabs-depmanager/jabs-depmanager.lisp | 40 +- src/core/jabs-operations/jabs-operations.lisp | 2 +- src/core/jabs-skelethon/jabs-skelethon.lisp | 388 +++++++++--------- src/core/jabs-test/jabs-test.lisp | 20 +- src/jabs-loader.lisp.input | 2 +- src/jabs-plugin.lisp | 2 +- src/wrappers/jab/jab.lisp.input | 2 +- test/e2e.sh | 2 +- 29 files changed, 334 insertions(+), 334 deletions(-) diff --git a/TODO.md b/TODO.md index f779bea..8d6431c 100644 --- a/TODO.md +++ b/TODO.md @@ -13,9 +13,9 @@ * realise round list view for projects * remove `*jabs-verbose*`, `*jabs-quiet*` and `*jabs-debug*` variables as deprecated * make automatic detection, which project should be launched -* check for multiple directories to load libs/plugins/skelethons/bouts/rounds/hits etc -* make possibility to add absolute pathnames to skelethon definition -* make skelethon definition in project regular (now: `:skelethon (:default)` ) +* check for multiple directories to load libs/plugins/skeletons/bouts/rounds/hits etc +* make possibility to add absolute pathnames to skeleton definition +* make skeleton definition in project regular (now: `:skeleton (:default)` ) * add CLI option additional-plugins ## Plugins: diff --git a/etc/jabs.conf b/etc/jabs.conf index 0f562eb..40cf3cd 100644 --- a/etc/jabs.conf +++ b/etc/jabs.conf @@ -1,6 +1,6 @@ -;; skelethons -;; (*jabs-skelethons-directory* (make-pathname :directory '(:relative "skelethons"))) +;; skeletons +;; (*jabs-skeletons-directory* (make-pathname :directory '(:relative "skeletons"))) ;; bouts ;; (*jabs-bouts-directory* (make-pathname :directory '(:relative "bouts"))) ;; hits @@ -21,12 +21,12 @@ ;; (*jabs-verbose* nil) ;; (*jabs-debug* nil) -;; (*jabs-default-skelethon-name* :default) +;; (*jabs-default-skeleton-name* :default) ;; (*jabs-default-bout* :default) ;; (*jabs-debug* t) -;; ;; (*jabs-skelethons-directory* "the/directory") -;; ;; *jabs-forced-skelethon* +;; ;; (*jabs-skeletons-directory* "the/directory") +;; ;; *jabs-forced-skeleton* ;; (*jabs-bouts-directory* "the/directory") ;; (*jabs-default-bout* :default) ;; ;; *jabs-current-compiler* @@ -60,11 +60,11 @@ ;; (*register-plugin-hook* nil) ;; (*register-repository-hook* nil) ;; ?? ;; (*register-project-hook* nil) -;; (*register-skelethon-hook* nil) +;; (*register-skeleton-hook* nil) ;; (*run-project-hook* nil) ;; (*run-hit-hook* nil) ;; (*run-bout-hook* nil) -;; (*initialize-skelethon-hook* nil) +;; (*initialize-skeleton-hook* nil) ;; (*init-hook* nil) ;; run directly after initialization ;; (*initialize-plugin-hook* nil) diff --git a/share/bouts/default.bt b/share/bouts/default.bt index 416daaf..50404f9 100644 --- a/share/bouts/default.bt +++ b/share/bouts/default.bt @@ -11,7 +11,7 @@ :deploy ) ;; :validate -;; :initialize - initialize skelethon, make source preprocessing etc +;; :initialize - initialize skeleton, make source preprocessing etc ;; :generate-sources ;; :process-sources ;; :generate-resources diff --git a/share/hits/clean.hit b/share/hits/clean.hit index 8cf38ee..6b5d95b 100644 --- a/share/hits/clean.hit +++ b/share/hits/clean.hit @@ -2,7 +2,7 @@ (clean :depends-on () (let ((target-dir (or - (try (get-skelethon-target (find-skelethon (project-slot-value *jabs-current-project* 'skelethon)))) - (try (get-skelethon-target (find-skelethon (car (project-slot-value *jabs-current-project* 'skelethon)))))))) + (try (get-skeleton-target (find-skeleton (project-slot-value *jabs-current-project* 'skeleton)))) + (try (get-skeleton-target (find-skeleton (car (project-slot-value *jabs-current-project* 'skeleton)))))))) (when target-dir (os-rm target-dir :recursive t)))) diff --git a/share/hits/deploy-local.hit b/share/hits/deploy-local.hit index d771771..95c3c5d 100644 --- a/share/hits/deploy-local.hit +++ b/share/hits/deploy-local.hit @@ -1,25 +1,25 @@ ;; -*- mode: lisp -*- (deploy-local :depends-on () - (let* ((current-skelethon (or (try (find-skelethon (car (project-slot-value *jabs-current-project* 'skelethon)))) - (try (find-skelethon (project-slot-value *jabs-current-project* 'skelethon))))) - (target-dir (when current-skelethon (pathname-as-directory (parse-namestring (get-skelethon-target current-skelethon))))) + (let* ((current-skeleton (or (try (find-skeleton (car (project-slot-value *jabs-current-project* 'skeleton)))) + (try (find-skeleton (project-slot-value *jabs-current-project* 'skeleton))))) + (target-dir (when current-skeleton (pathname-as-directory (parse-namestring (get-skeleton-target current-skeleton))))) ;; - (src-dir (try (get-skelethon-src current-skelethon))) - (bin-dir (try (get-skelethon-bin current-skelethon))) - (doc-dir (try (get-skelethon-doc current-skelethon))) - (share-dir (try (get-skelethon-share current-skelethon))) - (test-dir (try (get-skelethon-test current-skelethon))) - (contrib-dir (try (get-skelethon-contrib current-skelethon))) - (conf-dir (try (get-skelethon-conf current-skelethon))) - (script-dir (try (get-skelethon-script current-skelethon))) - (readme-file (try (get-skelethon-readme-file current-skelethon))) - (license-file (try (get-skelethon-license-file current-skelethon))) - (install-file (try (get-skelethon-install-file current-skelethon))) + (src-dir (try (get-skeleton-src current-skeleton))) + (bin-dir (try (get-skeleton-bin current-skeleton))) + (doc-dir (try (get-skeleton-doc current-skeleton))) + (share-dir (try (get-skeleton-share current-skeleton))) + (test-dir (try (get-skeleton-test current-skeleton))) + (contrib-dir (try (get-skeleton-contrib current-skeleton))) + (conf-dir (try (get-skeleton-conf current-skeleton))) + (script-dir (try (get-skeleton-script current-skeleton))) + (readme-file (try (get-skeleton-readme-file current-skeleton))) + (license-file (try (get-skeleton-license-file current-skeleton))) + (install-file (try (get-skeleton-install-file current-skeleton))) ;; ) (when (not target-dir) - (jlog:crit "Target directory for skelethon ``~a'', project ``~a'' is not set. Can not deploy locally" - (get-skelethon-name current-skelethon) + (jlog:crit "Target directory for skeleton ``~a'', project ``~a'' is not set. Can not deploy locally" + (get-skeleton-name current-skeleton) (get-project-name *jabs-current-project*))) ;; (dolist (dir (list src-dir bin-dir doc-dir test-dir contrib-dir script-dir share-dir conf-dir)) diff --git a/share/hits/initialize.hit b/share/hits/initialize.hit index 653470c..b7db201 100644 --- a/share/hits/initialize.hit +++ b/share/hits/initialize.hit @@ -1,3 +1,3 @@ ;; -*- mode: lisp -*- (initialize :depends-on () - (process-project-skelethon *jabs-current-project*)) + (process-project-skeleton *jabs-current-project*)) diff --git a/share/hits/load-skelethon.hit b/share/hits/load-skelethon.hit index dfa6fa7..f4ebbf5 100644 --- a/share/hits/load-skelethon.hit +++ b/share/hits/load-skelethon.hit @@ -1,3 +1,3 @@ ;; -*- mode: lisp -*- -(load-skelethon :depends-on () - (load-project-skelethon *jabs-current-project*)) +(load-skeleton :depends-on () + (load-project-skeleton *jabs-current-project*)) diff --git a/share/hits/process-skelethon.hit b/share/hits/process-skelethon.hit index db79438..c4be437 100644 --- a/share/hits/process-skelethon.hit +++ b/share/hits/process-skelethon.hit @@ -1,3 +1,3 @@ ;; -*- mode: lisp -*- -(process-skelethon :depends-on () - (process-project-skelethon *jabs-current-project*)) +(process-skeleton :depends-on () + (process-project-skeleton *jabs-current-project*)) diff --git a/share/hits/test.hit b/share/hits/test.hit index 7105079..7acb05d 100644 --- a/share/hits/test.hit +++ b/share/hits/test.hit @@ -4,7 +4,7 @@ ;; (jlog:err "NOT IMPLEMENTED")) ;; (jlog:info "Perform load testing...") ;; (let ((pname (get-project-name *jabs-current-project*)) - ;; (testdir (merge-n-directories (os-pwd) (get-project-pathname *jabs-current-project*) (car (skelethon@core@plugin@jabs::get-skelethon-test *jabs-current-skelethon*))))) + ;; (testdir (merge-n-directories (os-pwd) (get-project-pathname *jabs-current-project*) (car (skeleton@core@plugin@jabs::get-skeleton-test *jabs-current-skeleton*))))) ;; (asdf:operate 'asdf:load-op pname) ;; (if (find-package pname) ;; (jlog:info "DONE") diff --git a/share/plugins/generic/make-binary/README.md b/share/plugins/generic/make-binary/README.md index b7a6a52..b2355d0 100644 --- a/share/plugins/generic/make-binary/README.md +++ b/share/plugins/generic/make-binary/README.md @@ -1,6 +1,6 @@ # make-binary@generic -Makes binary executable from current lisp program in skelethon binary directory +Makes binary executable from current lisp program in skeleton binary directory ## Usage diff --git a/share/plugins/generic/make-binary/build.jab b/share/plugins/generic/make-binary/build.jab index 5962ee6..397c929 100644 --- a/share/plugins/generic/make-binary/build.jab +++ b/share/plugins/generic/make-binary/build.jab @@ -10,6 +10,6 @@ :license "MIT" :description "JABS plugin to make binary executable from project" :serial t - :skelethon (:default) + :skeleton (:default) :depends-on (:trivial-dump-core) :components ((:file "make-binary"))) diff --git a/share/plugins/generic/make-binary/src/make-binary.lisp b/share/plugins/generic/make-binary/src/make-binary.lisp index 7ceb580..6b1deb6 100644 --- a/share/plugins/generic/make-binary/src/make-binary.lisp +++ b/share/plugins/generic/make-binary/src/make-binary.lisp @@ -26,9 +26,9 @@ (folder (or (pathname-as-directory (parse-namestring - (get-skelethon-bin - (find-skelethon - (car (jabs:project-slot-value *jabs-current-project* 'jabs::skelethon)))))) + (get-skeleton-bin + (find-skeleton + (car (jabs:project-slot-value *jabs-current-project* 'jabs::skeleton)))))) ""))) ;; (when (not function) diff --git a/share/plugins/generic/tmpl/build.jab b/share/plugins/generic/tmpl/build.jab index fbb4607..58192df 100644 --- a/share/plugins/generic/tmpl/build.jab +++ b/share/plugins/generic/tmpl/build.jab @@ -9,7 +9,7 @@ :license "Public Domain" :description "Here is my project" ;; :serial t - :skelethon (:flat) ;; (nil) ;; will be w/o '(' ')' in v.0.2+ + :skeleton (:flat) ;; (nil) ;; will be w/o '(' ')' in v.0.2+ ;; :bout :default ;;; Additional sources ;; :sources ((make-pathname :directory '(:relative "another-lib"))) diff --git a/share/plugins/generic/tmpl/plugin.lisp b/share/plugins/generic/tmpl/plugin.lisp index e765338..ce595d2 100644 --- a/share/plugins/generic/tmpl/plugin.lisp +++ b/share/plugins/generic/tmpl/plugin.lisp @@ -16,7 +16,7 @@ (maintainer "John Doe ") (license "Public Domain") (description "Personal use plugin") - (skelethon "(:default)") + (skeleton "(:default)") (bout "default") (plugins "(:quicklisp@repository)") (components (format nil "~15t(:file \"fixture\")~%"))) @@ -32,23 +32,23 @@ :license \"~a\" :description \"~a\" :serial t - :skelethon ~a + :skeleton ~a ;; :bout :~a ;; :plugins ~a ;;;; Additional sources ;; :sources ((make-pathname :directory '(:relative \"another-lib\"))) ;;;; Dependencies ;; :depends-on (:alexandria :cl-ppcre) - ;; :pathname \"some/relative/path\" ;; relative name to your plugin root directory (where skelethon located) + ;; :pathname \"some/relative/path\" ;; relative name to your plugin root directory (where skeleton located) ;;;; Add files, mobules etc :components ( ~a)) -" name name name type version author maintainer license description skelethon bout plugins components)) +" name name name type version author maintainer license description skeleton bout plugins components)) (defhit tmpl-mkplugin () () (let* ((plugin-name (get-project-name *jabs-current-project*)) (plugin-description (get-project-description *jabs-current-project*)) - (plugin-skelethon-name (car (slot-value *jabs-current-project* 'jabs::skelethon))) + (plugin-skeleton-name (car (slot-value *jabs-current-project* 'jabs::skeleton))) (plugin-components (slot-value *jabs-current-project* 'jabs::components)) (plugin-component-names) (plugin-template)) @@ -72,7 +72,7 @@ :license (ignore-errors (slot-value *jabs-current-project* 'jabs::license)) :description plugin-description :plugins (ignore-errors (slot-value *jabs-current-project* 'jabs::plugins)) - :skelethon (concatenate 'string "(:" (string-downcase (princ-to-string plugin-skelethon-name)) ")") + :skeleton (concatenate 'string "(:" (string-downcase (princ-to-string plugin-skeleton-name)) ")") :components plugin-component-names )) ;; @@ -93,7 +93,7 @@ (terminate 0)) (progn (jlog:note "Plugin not exists. Going on") - (load-skelethon (list *tmpl-skelethon-name*)) + (load-skeleton (list *tmpl-skeleton-name*)) ;; (let* ((plugin-name (tools@jabs:tosymbol (car (reverse (pathname-directory (os-pwd)))))) (plugin-type (tools@jabs:tosymbol *tmpl-plugin-type*)) @@ -104,12 +104,12 @@ (plugin-description "Personal use plugin") (plugin-serial t) (plugin-plugins '(:quicklisp@repository)) - (plugin-skelethon (find-skelethon *tmpl-skelethon-name*)) + (plugin-skeleton (find-skeleton *tmpl-skeleton-name*)) (plugin-bout :default) (plugin-src-dir - (if (listp (get-skelethon-src plugin-skelethon)) - (merge-pathnames (make-pathname :directory (list :relative (car (get-skelethon-src plugin-skelethon)))) (os-pwd)) - (merge-pathnames (make-pathname :directory (list :relative (get-skelethon-src plugin-skelethon))) (os-pwd)))) + (if (listp (get-skeleton-src plugin-skeleton)) + (merge-pathnames (make-pathname :directory (list :relative (car (get-skeleton-src plugin-skeleton)))) (os-pwd)) + (merge-pathnames (make-pathname :directory (list :relative (get-skeleton-src plugin-skeleton))) (os-pwd)))) (plugin-components (list-directory (merge-pathnames plugin-src-dir (os-pwd)))) @@ -128,7 +128,7 @@ :license ,plugin-license :description ,plugin-description :serial t - :skelethon (,(get-skelethon-name plugin-skelethon)) + :skeleton (,(get-skeleton-name plugin-skeleton)) :components ,(reverse plugin-component-names))) ;; (run-project (find-plugin (tools@jabs:tosymbol plugin-name))) ))))) diff --git a/share/plugins/generic/tmpl/project.lisp b/share/plugins/generic/tmpl/project.lisp index 0fb35fe..2a375ad 100644 --- a/share/plugins/generic/tmpl/project.lisp +++ b/share/plugins/generic/tmpl/project.lisp @@ -5,7 +5,7 @@ (in-package #:tmpl@generic@plugin@jabs) -(defvar *tmpl-skelethon-name* :default) +(defvar *tmpl-skeleton-name* :default) (defvar *tmpl-author* :default) (defvar *tmpl-version* "0.0.1") @@ -20,7 +20,7 @@ (maintainer "John Doe ") (license "Public Domain") (description "Personal use project") - (skelethon "(:default)") + (skeleton "(:default)") (bout ":default") (plugins "(:quicklisp@repository)") (components (format nil "~15t(:file \"fixture\")~%"))) @@ -38,7 +38,7 @@ :license \"~a\" :description \"~a\" :serial t - :skelethon ~a + :skeleton ~a :bout ~a ;; :plugins ~a ;;;; Additional sources @@ -46,16 +46,16 @@ ;; :repositories (:quicklisp) ;; define some repositories here ;;;; Dependencies ;; :depends-on (:alexandria :cl-ppcre) - ;; :pathname \"some/relative/path\" ;; relative name to your project root directory (where skelethon located) + ;; :pathname \"some/relative/path\" ;; relative name to your project root directory (where skeleton located) ;;;; Add files, mobules etc :components ( ~a)) -" name name name name author version maintainer license description skelethon bout plugins components)) +" name name name name author version maintainer license description skeleton bout plugins components)) (defhit tmpl-mkproject () () (let* ((project-name (get-project-name *jabs-current-project*)) (project-description (get-project-description *jabs-current-project*)) - (project-skelethon-name (car (slot-value *jabs-current-project* 'jabs::skelethon))) + (project-skeleton-name (car (slot-value *jabs-current-project* 'jabs::skeleton))) (project-components (slot-value *jabs-current-project* 'jabs::components)) (project-component-names) (project-template)) @@ -78,7 +78,7 @@ :license (ignore-errors (slot-value *jabs-current-project* 'jabs::license)) :description project-description :plugins (ignore-errors (slot-value *jabs-current-project* 'jabs::plugins)) - :skelethon (concatenate 'string "(:" (string-downcase (princ-to-string project-skelethon-name)) ")") + :skeleton (concatenate 'string "(:" (string-downcase (princ-to-string project-skeleton-name)) ")") :components project-component-names )) ;; @@ -98,7 +98,7 @@ (jlog:note "Project already exists. Nothing to create") (terminate 0)) (progn - (load-skelethon (list *tmpl-skelethon-name*)) + (load-skeleton (list *tmpl-skeleton-name*)) ;; (let* ((project-name (car (reverse (pathname-directory (os-pwd))))) (project-author "John Doe ") @@ -108,12 +108,12 @@ (project-description "Personal use project") (project-serial t) (project-plugins '(:quicklisp@repository)) - (project-skelethon (find-skelethon *tmpl-skelethon-name*)) + (project-skeleton (find-skeleton *tmpl-skeleton-name*)) (project-bout :default) (project-src-dir - (if (listp (get-skelethon-src project-skelethon)) - (merge-pathnames (make-pathname :directory (list :relative (car (get-skelethon-src project-skelethon)))) (os-pwd)) - (merge-pathnames (make-pathname :directory (list :relative (get-skelethon-src project-skelethon))) (os-pwd)))) + (if (listp (get-skeleton-src project-skeleton)) + (merge-pathnames (make-pathname :directory (list :relative (car (get-skeleton-src project-skeleton)))) (os-pwd)) + (merge-pathnames (make-pathname :directory (list :relative (get-skeleton-src project-skeleton))) (os-pwd)))) (project-components (list-directory (merge-pathnames project-src-dir (os-pwd)))) @@ -134,20 +134,20 @@ :license ,project-license :description ,project-description :serial t - :skelethon (,(get-skelethon-name project-skelethon)) + :skeleton (,(get-skeleton-name project-skeleton)) :components ,(reverse project-component-names))) ;; (run-project (find-project (tools@jabs:tostr project-name))) ))))) (bind-jabs-cli-parameter - "tmpl-skelethon" + "tmpl-skeleton" #'(lambda (&rest x) - (setf *tmpl-skelethon-name* (tokeyword (car x))))) + (setf *tmpl-skeleton-name* (tokeyword (car x))))) (bind-jabs-cli-parameter "tmpl-version" #'(lambda (&rest x) (setf *tmpl-version* (car x)))) -(process-jabs-cli-parameter "tmpl-skelethon") +(process-jabs-cli-parameter "tmpl-skeleton") (process-jabs-cli-parameter "tmpl-version") diff --git a/share/plugins/generic/tmpl/runner.lisp b/share/plugins/generic/tmpl/runner.lisp index a17f884..b3d9082 100644 --- a/share/plugins/generic/tmpl/runner.lisp +++ b/share/plugins/generic/tmpl/runner.lisp @@ -10,7 +10,7 @@ (if (file-exists-p (merge-pathnames (make-pathname :name "build" :type "jab") (os-pwd))) (jlog:crit "Buildfile already exists. Nothing to create") (progn - (load-skelethon (list *tmpl-skelethon-name*)) + (load-skeleton (list *tmpl-skeleton-name*)) ;; (let ((project-name (car (reverse (pathname-directory (os-pwd)))))) (setf *jabs-project-to-run* (tokeyword project-name)) diff --git a/share/plugins/repository/quicklisp/build.jab b/share/plugins/repository/quicklisp/build.jab index 9a3930b..f991fa0 100644 --- a/share/plugins/repository/quicklisp/build.jab +++ b/share/plugins/repository/quicklisp/build.jab @@ -11,7 +11,7 @@ :license "Public Domain" :description "Here is my project" ;; :serial t - :skelethon (:flat) ;; (nil) ;; will be w/o '(' ')' in v.0.2+ + :skeleton (:flat) ;; (nil) ;; will be w/o '(' ')' in v.0.2+ :bout :default ;;; Additional sources ;; :sources ((make-pathname :directory '(:relative "another-lib"))) diff --git a/share/plugins/repository/quicklisp/quicklisp-repository.lisp b/share/plugins/repository/quicklisp/quicklisp-repository.lisp index 588dd7f..e26b9e0 100644 --- a/share/plugins/repository/quicklisp/quicklisp-repository.lisp +++ b/share/plugins/repository/quicklisp/quicklisp-repository.lisp @@ -18,28 +18,28 @@ (jlog:dbg "Quicklisp installed"))))) (with-project-to-be-run *jabs-current-project* - (let ((skelethon-name (or - (try (car (slot-value *jabs-current-project* 'jabs::skelethon))) - (try (slot-value *jabs-current-project* 'jabs::skelethon)) - *jabs-default-skelethon-name*))) - ;; pre-load skelethon - (load-skelethon skelethon-name) + (let ((skeleton-name (or + (try (car (slot-value *jabs-current-project* 'jabs::skeleton))) + (try (slot-value *jabs-current-project* 'jabs::skeleton)) + *jabs-default-skeleton-name*))) + ;; pre-load skeleton + (load-skeleton skeleton-name) ;; - (let* ((skelethon (find-skelethon skelethon-name)) - (skelethon-cache-dir + (let* ((skeleton (find-skeleton skeleton-name)) + (skeleton-cache-dir (or (try (make-pathname :directory (list :relative - (or (try (car (get-skelethon-cache skelethon))) - (try (get-skelethon-cache skelethon)))))) + (or (try (car (get-skeleton-cache skeleton))) + (try (get-skeleton-cache skeleton)))))) (make-pathname :directory '(:absolute "tmp")))) (path (merge-pathnames (merge-pathnames (make-pathname :directory (list :relative "quicklisp" (string-downcase (princ-to-string (get-project-name *jabs-current-project*))))) - skelethon-cache-dir) + skeleton-cache-dir) jabs::+jabs-run-directory+))) (initialize-repository path) (share-plugin (find-plugin :quicklisp :repository)) diff --git a/share/plugins/test/fiveam/build.jab b/share/plugins/test/fiveam/build.jab index 75ec0e3..0703efe 100644 --- a/share/plugins/test/fiveam/build.jab +++ b/share/plugins/test/fiveam/build.jab @@ -10,6 +10,6 @@ :license "Public Domain" :description "Personal use project" :serial t - :skelethon (:flat) + :skeleton (:flat) :depends-on (:fiveam) :components ((:file "fiveam"))) diff --git a/share/rounds/initialize.rd b/share/rounds/initialize.rd index e6c940b..8cb8f54 100644 --- a/share/rounds/initialize.rd +++ b/share/rounds/initialize.rd @@ -1,5 +1,5 @@ ;; -*- mode: lisp -*- (:initialize - :process-skelethon + :process-skeleton ;; :load-plugins ) diff --git a/src/core/jabs-asdf/jabs-asdf.lisp b/src/core/jabs-asdf/jabs-asdf.lisp index c29617b..b02e696 100644 --- a/src/core/jabs-asdf/jabs-asdf.lisp +++ b/src/core/jabs-asdf/jabs-asdf.lisp @@ -1,6 +1,6 @@ (defpackage asdf@core@plugin@jabs (:use :cl :tools@jabs :re@jabs :jabs - :skelethon@core@plugin@jabs)) + :skeleton@core@plugin@jabs)) ;; TODO: revise https://common-lisp.net/project/asdf/asdf.html#The-defsystem-grammar (in-package :asdf@core@plugin@jabs) @@ -118,8 +118,8 @@ compiling asdf.lisp to a FASL and then loading it." ;; (apply 'asdf/parse-defsystem:register-system-definition ',name ;; (clear-defsystem ',options :prefix -;; (or (car (get-skelethon-src -;; (find-skelethon (car (get-project-skelethon (find-project ',name)))))) +;; (or (car (get-skeleton-src +;; (find-skeleton (car (get-project-skeleton (find-project ',name)))))) ;; ""))) (defgeneric define-asdf-system (project) @@ -127,17 +127,17 @@ compiling asdf.lisp to a FASL and then loading it." (defmethod define-asdf-system ((project project)) (let* ((asdf-list) - (skelethon-name (or - (try (car (slot-value project 'skelethon))) - (try (slot-value project 'skelethon)) - (get-skelethon-name (find-skelethon *jabs-default-skelethon-name*)))) - (skelethon) + (skeleton-name (or + (try (car (slot-value project 'skeleton))) + (try (slot-value project 'skeleton)) + (get-skeleton-name (find-skeleton *jabs-default-skeleton-name*)))) + (skeleton) (name (get-project-name project)) - (skelethon-src)) - ;; Finding skelethon to get src-path - (setf skelethon (find-skelethon skelethon-name)) - (let ((skelethon-got-src (get-skelethon-src skelethon))) - (setf skelethon-src (if (atom skelethon-got-src) skelethon-got-src (car skelethon-got-src)))) + (skeleton-src)) + ;; Finding skeleton to get src-path + (setf skeleton (find-skeleton skeleton-name)) + (let ((skeleton-got-src (get-skeleton-src skeleton))) + (setf skeleton-src (if (atom skeleton-got-src) skeleton-got-src (car skeleton-got-src)))) ;; (dolist (v *asdf-symbols-list*) (let ((slot (try (slot-value project (tosymbol v :jabs))))) @@ -150,7 +150,7 @@ compiling asdf.lisp to a FASL and then loading it." ,name ',(append asdf-list (list :pathname (merge-pathnames - (pathname-as-directory skelethon-src) + (pathname-as-directory skeleton-src) (pathname-as-directory (slot-value project 'pathname))))))))) @@ -160,13 +160,13 @@ compiling asdf.lisp to a FASL and then loading it." (defmethod set-additional-sources ((project project)) (let ((additional-sources (try (slot-value project 'jabs::sources))) (skel-lib - (get-skelethon-lib - (find-skelethon + (get-skeleton-lib + (find-skeleton (or - (ignore-errors (car (slot-value project 'jabs:skelethon))) - (ignore-errors (slot-value project 'jabs:skelethon)) - *jabs-default-skelethon-name*))))) - ;; add skelethon lib dir + (ignore-errors (car (slot-value project 'jabs:skeleton))) + (ignore-errors (slot-value project 'jabs:skeleton)) + *jabs-default-skeleton-name*))))) + ;; add skeleton lib dir (push skel-lib additional-sources) ;; (when additional-sources @@ -202,7 +202,7 @@ compiling asdf.lisp to a FASL and then loading it." `(jabs::register-project ,(tools@jabs:tosymbol name) ',(append - '(:skelethon :flat) ; register ASDF system as project with flat skelethon + '(:skeleton :flat) ; register ASDF system as project with flat skeleton options)))))) ;;;; Some macros for better ASDF compatability diff --git a/src/core/jabs-depmanager/jabs-depmanager.lisp b/src/core/jabs-depmanager/jabs-depmanager.lisp index 2dabd5f..280e2d4 100644 --- a/src/core/jabs-depmanager/jabs-depmanager.lisp +++ b/src/core/jabs-depmanager/jabs-depmanager.lisp @@ -71,18 +71,18 @@ Created for ASDF compatability" (defmethod get-project-projects-map ((project project)) "Get project names mapped to files for only for given project w\o global map" - (let* ((skel-name (or (car (try (slot-value project 'skelethon))) - *jabs-default-skelethon-name*)) + (let* ((skel-name (or (car (try (slot-value project 'skeleton))) + *jabs-default-skeleton-name*)) (skel (or - (find-skelethon skel-name) + (find-skeleton skel-name) (and - (load-skelethon skel-name) - (find-skelethon skel-name)))) - (lib (or (try (car (get-skelethon-lib skel))) - (get-skelethon-lib skel))) - (contrib (or (try (car (get-skelethon-contrib skel))) - (get-skelethon-contrib skel))) - (opt (get-skelethon-opt skel)) + (load-skeleton skel-name) + (find-skeleton skel-name)))) + (lib (or (try (car (get-skeleton-lib skel))) + (get-skeleton-lib skel))) + (contrib (or (try (car (get-skeleton-contrib skel))) + (get-skeleton-contrib skel))) + (opt (get-skeleton-opt skel)) (hash (make-hash-table))) ;; (mapcar #'(lambda (x) @@ -98,18 +98,18 @@ w\o global map" (defmethod get-project-systems-map ((project project)) "Get asdf system names mapped to files for only for given project w\o global map. For ASDF back compatability" - (let* ((skel-name (or (car (try (slot-value project 'skelethon))) - *jabs-default-skelethon-name*)) + (let* ((skel-name (or (car (try (slot-value project 'skeleton))) + *jabs-default-skeleton-name*)) (skel (or - (find-skelethon skel-name) + (find-skeleton skel-name) (and - (load-skelethon skel-name) - (find-skelethon skel-name)))) - (lib (or (try (car (get-skelethon-lib skel))) - (get-skelethon-lib skel))) - (contrib (or (try (car (get-skelethon-contrib skel))) - (get-skelethon-contrib skel))) - (opt (get-skelethon-opt skel)) + (load-skeleton skel-name) + (find-skeleton skel-name)))) + (lib (or (try (car (get-skeleton-lib skel))) + (get-skeleton-lib skel))) + (contrib (or (try (car (get-skeleton-contrib skel))) + (get-skeleton-contrib skel))) + (opt (get-skeleton-opt skel)) (hash (make-hash-table))) ;; (mapcar #'(lambda (x) diff --git a/src/core/jabs-operations/jabs-operations.lisp b/src/core/jabs-operations/jabs-operations.lisp index 4285b67..4cdadc9 100644 --- a/src/core/jabs-operations/jabs-operations.lisp +++ b/src/core/jabs-operations/jabs-operations.lisp @@ -1,6 +1,6 @@ (defpackage operations@core@plugin@jabs (:use :cl :tools@jabs :re@jabs :jabs - :skelethon@core@plugin@jabs)) + :skeleton@core@plugin@jabs)) (in-package :operations@core@plugin@jabs) diff --git a/src/core/jabs-skelethon/jabs-skelethon.lisp b/src/core/jabs-skelethon/jabs-skelethon.lisp index 861c04f..eeef3ea 100644 --- a/src/core/jabs-skelethon/jabs-skelethon.lisp +++ b/src/core/jabs-skelethon/jabs-skelethon.lisp @@ -1,81 +1,81 @@ -(defpackage skelethon@core@plugin@jabs +(defpackage skeleton@core@plugin@jabs (:use :cl :tools@jabs :re@jabs :jabs)) -(in-package :skelethon@core@plugin@jabs) +(in-package :skeleton@core@plugin@jabs) -(make-instance 'jabs::plugin :name :skelethon :type :core :version jabs::+jabs-version+) +(make-instance 'jabs::plugin :name :skeleton :type :core :version jabs::+jabs-version+) (in-package :jabs) -(export '(defskelethon - find-skelethon - ;; run-skelethon - skelethon +(export '(defskeleton + find-skeleton + ;; run-skeleton + skeleton ;; - get-skelethon-name - get-skelethon-src - get-skelethon-bin - get-skelethon-lib - get-skelethon-doc - get-skelethon-share - get-skelethon-test - get-skelethon-contrib - get-skelethon-conf - get-skelethon-public - get-skelethon-script - get-skelethon-cache - get-skelethon-log - get-skelethon-template - get-skelethon-opt - get-skelethon-tmp - get-skelethon-target - get-skelethon-readme-file - get-skelethon-license-file - get-skelethon-install-file + get-skeleton-name + get-skeleton-src + get-skeleton-bin + get-skeleton-lib + get-skeleton-doc + get-skeleton-share + get-skeleton-test + get-skeleton-contrib + get-skeleton-conf + get-skeleton-public + get-skeleton-script + get-skeleton-cache + get-skeleton-log + get-skeleton-template + get-skeleton-opt + get-skeleton-tmp + get-skeleton-target + get-skeleton-readme-file + get-skeleton-license-file + get-skeleton-install-file ;; - *jabs-default-skelethon-name* - load-skelethon + *jabs-default-skeleton-name* + load-skeleton )) -(defvar *jabs-skelethon-directories* +(defvar *jabs-skeleton-directories* (list - (merge-pathnames (make-pathname :directory '(:relative "skelethons")) *jabs-share-directory*) - (merge-pathnames (make-pathname :directory '(:relative ".jabs" "skelethons")) (user-homedir-pathname)) - (merge-pathnames (make-pathname :directory '(:relative ".jabs" "skelethons")) (os-pwd)) + (merge-pathnames (make-pathname :directory '(:relative "skeletons")) *jabs-share-directory*) + (merge-pathnames (make-pathname :directory '(:relative ".jabs" "skeletons")) (user-homedir-pathname)) + (merge-pathnames (make-pathname :directory '(:relative ".jabs" "skeletons")) (os-pwd)) )) -(defvar *jabs-default-skelethon-name* :default) -(defvar *jabs-skelethon-registry* (make-hash-table)) -(defvar *jabs-current-skelethon* nil) -(defvar *jabs-skelethon-template-type* "skl") - -(defclass skelethon () - ((name :accessor get-skelethon-name :initarg :name) - (src :accessor get-skelethon-src :initarg :src) - (bin :accessor get-skelethon-bin :initarg :bin) - (lib :accessor get-skelethon-lib :initarg :lib) - (doc :accessor get-skelethon-doc :initarg :doc) - (share :accessor get-skelethon-share :initarg :share) - (test :accessor get-skelethon-test :initarg :test) - (contrib :accessor get-skelethon-contrib :initarg :contrib) - (conf :accessor get-skelethon-conf :initarg :conf) - (public :accessor get-skelethon-public :initarg :public) - (script :accessor get-skelethon-script :initarg :script) - (cache :accessor get-skelethon-cache :initarg :cache) - (log :accessor get-skelethon-log :initarg :log) - (template :accessor get-skelethon-template :initarg :template) - (opt :accessor get-skelethon-opt :initarg :opt) ;; other optional directories, not /opt :) - (tmp :accessor get-skelethon-tmp :initarg :tmp) - (target :accessor get-skelethon-target :initarg :target) - (readme-file :accessor get-skelethon-readme-file :initarg :readme-file) - (license-file :accessor get-skelethon-license-file :initarg :license-file) - (install-file :accessor get-skelethon-install-file :initarg :install-file))) - -(defun find-skelethon (name) +(defvar *jabs-default-skeleton-name* :default) +(defvar *jabs-skeleton-registry* (make-hash-table)) +(defvar *jabs-current-skeleton* nil) +(defvar *jabs-skeleton-template-type* "skl") + +(defclass skeleton () + ((name :accessor get-skeleton-name :initarg :name) + (src :accessor get-skeleton-src :initarg :src) + (bin :accessor get-skeleton-bin :initarg :bin) + (lib :accessor get-skeleton-lib :initarg :lib) + (doc :accessor get-skeleton-doc :initarg :doc) + (share :accessor get-skeleton-share :initarg :share) + (test :accessor get-skeleton-test :initarg :test) + (contrib :accessor get-skeleton-contrib :initarg :contrib) + (conf :accessor get-skeleton-conf :initarg :conf) + (public :accessor get-skeleton-public :initarg :public) + (script :accessor get-skeleton-script :initarg :script) + (cache :accessor get-skeleton-cache :initarg :cache) + (log :accessor get-skeleton-log :initarg :log) + (template :accessor get-skeleton-template :initarg :template) + (opt :accessor get-skeleton-opt :initarg :opt) ;; other optional directories, not /opt :) + (tmp :accessor get-skeleton-tmp :initarg :tmp) + (target :accessor get-skeleton-target :initarg :target) + (readme-file :accessor get-skeleton-readme-file :initarg :readme-file) + (license-file :accessor get-skeleton-license-file :initarg :license-file) + (install-file :accessor get-skeleton-install-file :initarg :install-file))) + +(defun find-skeleton (name) (check-type name keyword) - (gethash name *jabs-skelethon-registry*)) + (gethash name *jabs-skeleton-registry*)) -(defun skelethondir-p (dir) +(defun skeletondir-p (dir) "Skelethon directory record must be a string, or list in format @@ -106,48 +106,48 @@ It`s optional by default (null (nth 3 dir)))) t))) -(defun listskelethondirs-p (dirs) +(defun listskeletondirs-p (dirs) "Skelethon can take list of optional directories, which are not included to main schema (like socket or dev dir etc)" (cond ((null dirs) t) ((atom dirs) nil) - (t (when (skelethondir-p (car dirs)) - (listskelethondirs-p (cdr dirs)))))) + (t (when (skeletondir-p (car dirs)) + (listskeletondirs-p (cdr dirs)))))) -(deftype skelethondir () - '(satisfies skelethondir-p)) +(deftype skeletondir () + '(satisfies skeletondir-p)) -(deftype listskelethondirs () - '(satisfies listskelethondirs-p)) +(deftype listskeletondirs () + '(satisfies listskeletondirs-p)) -(defun register-skelethon (name &key bin lib src test conf share doc +(defun register-skeleton (name &key bin lib src test conf share doc contrib public script cache log template opt tmp target readme-file license-file install-file) (check-type name keyword) - (check-type bin (or null skelethondir)) - (check-type lib (or null skelethondir)) - (check-type src (or null skelethondir)) - (check-type test (or null skelethondir)) - (check-type conf (or null skelethondir)) - (check-type share (or null skelethondir)) - (check-type doc (or null skelethondir)) - (check-type contrib (or null skelethondir)) - (check-type public (or null skelethondir)) - (check-type script (or null skelethondir)) - (check-type cache (or null skelethondir)) - (check-type log (or null skelethondir)) - (check-type template (or null skelethondir)) - (check-type tmp (or null skelethondir)) - (check-type opt (or null listskelethondirs)) - (check-type target (or null skelethondir)) + (check-type bin (or null skeletondir)) + (check-type lib (or null skeletondir)) + (check-type src (or null skeletondir)) + (check-type test (or null skeletondir)) + (check-type conf (or null skeletondir)) + (check-type share (or null skeletondir)) + (check-type doc (or null skeletondir)) + (check-type contrib (or null skeletondir)) + (check-type public (or null skeletondir)) + (check-type script (or null skeletondir)) + (check-type cache (or null skeletondir)) + (check-type log (or null skeletondir)) + (check-type template (or null skeletondir)) + (check-type tmp (or null skeletondir)) + (check-type opt (or null listskeletondirs)) + (check-type target (or null skeletondir)) (check-type readme-file (or null string)) (check-type license-file (or null string)) (check-type install-file (or null string)) - (jlog:dbg "Registering skelethon ``~a''" name) + (jlog:dbg "Registering skeleton ``~a''" name) (setf - (gethash name *jabs-skelethon-registry*) + (gethash name *jabs-skeleton-registry*) (make-instance - 'skelethon + 'skeleton :name name :bin bin :lib lib :src src :test test :conf conf @@ -161,29 +161,29 @@ not included to main schema (like socket or dev dir etc)" :install-file install-file)) (jlog:info "Skelethon ``~a'' registered" name)) -(defmacro defskelethon (name &body options) - `(apply 'register-skelethon ,(tosymbol name) ',options)) +(defmacro defskeleton (name &body options) + `(apply 'register-skeleton ,(tosymbol name) ',options)) -(defgeneric initialize-license (skelethon) +(defgeneric initialize-license (skeleton) ) -(defmethod initialize-license ((skelethon skelethon)) ;; TODO: +(defmethod initialize-license ((skeleton skeleton)) ;; TODO: t) -(defgeneric initialize-readme (skelethon) +(defgeneric initialize-readme (skeleton) ) -(defmethod initialize-readme ((skelethon skelethon)) ;; TODO: +(defmethod initialize-readme ((skeleton skeleton)) ;; TODO: t) -(defgeneric initialize-install (skelethon) +(defgeneric initialize-install (skeleton) ) -(defmethod initialize-install ((skelethon skelethon)) ;; TODO: +(defmethod initialize-install ((skeleton skeleton)) ;; TODO: t) -(defun make-skelethon-directory (dir &key prefix force) ;; FIXME: rewrite for correct pathnames - (check-type dir skelethondir) +(defun make-skeleton-directory (dir &key prefix force) ;; FIXME: rewrite for correct pathnames + (check-type dir skeletondir) (check-type prefix (or null string pathname)) (when (or (and (listp dir) @@ -210,77 +210,77 @@ not included to main schema (like socket or dev dir etc)" (jlog:info "Making directory ``~a''" full-dir-path) (apply 'ensure-directories-exist list)))))) -(defgeneric initialize-skelethon (skelethon &key prefix force) +(defgeneric initialize-skeleton (skeleton &key prefix force) ) -(defmethod initialize-skelethon ((skelethon skelethon) &key (prefix "") (force nil)) +(defmethod initialize-skeleton ((skeleton skeleton) &key (prefix "") (force nil)) ;; directories-init (let ((dirs (list - (get-skelethon-bin skelethon) - (get-skelethon-lib skelethon) - (get-skelethon-src skelethon) - (get-skelethon-test skelethon) - (get-skelethon-conf skelethon) - (get-skelethon-share skelethon) - (get-skelethon-doc skelethon) - (get-skelethon-contrib skelethon) - (get-skelethon-public skelethon) - (get-skelethon-script skelethon) - (get-skelethon-cache skelethon) - (get-skelethon-log skelethon) - (get-skelethon-template skelethon) - (get-skelethon-tmp skelethon)))) - (jlog:dbg "Initializing skelethon ``~a'' in ``~a''" - (get-skelethon-name skelethon) + (get-skeleton-bin skeleton) + (get-skeleton-lib skeleton) + (get-skeleton-src skeleton) + (get-skeleton-test skeleton) + (get-skeleton-conf skeleton) + (get-skeleton-share skeleton) + (get-skeleton-doc skeleton) + (get-skeleton-contrib skeleton) + (get-skeleton-public skeleton) + (get-skeleton-script skeleton) + (get-skeleton-cache skeleton) + (get-skeleton-log skeleton) + (get-skeleton-template skeleton) + (get-skeleton-tmp skeleton)))) + (jlog:dbg "Initializing skeleton ``~a'' in ``~a''" + (get-skeleton-name skeleton) (merge-pathnames (pathname-as-directory (if (stringp prefix) (parse-namestring prefix) prefix)) (pathname-as-directory (os-pwd)))) (dolist (dir (remove nil dirs)) - (make-skelethon-directory dir :prefix prefix :force force))) + (make-skeleton-directory dir :prefix prefix :force force))) ;; - (when (not (null (get-skelethon-opt skelethon))) - (dolist (dir (get-skelethon-opt skelethon)) - (make-skelethon-directory dir :prefix prefix :force force))) + (when (not (null (get-skeleton-opt skeleton))) + (dolist (dir (get-skeleton-opt skeleton)) + (make-skeleton-directory dir :prefix prefix :force force))) ;; initializing standard files - ;; (initialize-license skelethon) - ;; (initialize-readme skelethon) - ;; (initialize-install skelethon) - (jlog:info ".[ Initialized skelethon ``~a'' in ``~a'' ]" - (get-skelethon-name skelethon) + ;; (initialize-license skeleton) + ;; (initialize-readme skeleton) + ;; (initialize-install skeleton) + (jlog:info ".[ Initialized skeleton ``~a'' in ``~a'' ]" + (get-skeleton-name skeleton) (merge-pathnames (pathname-as-directory (if (stringp prefix) (parse-namestring prefix) prefix)) (pathname-as-directory (os-pwd)))) ) -;; (defskelethon default +;; (defskeleton default ;; :bin "bin1" ;; :lib ("lib1") ;; :src ((:relative "src1") 0770 :required)) -;; (initialize-skelethon (find-skelethon :test)) +;; (initialize-skeleton (find-skeleton :test)) -(defun parse-skelethon-from-file (file) +(defun parse-skeleton-from-file (file) (check-type file (or string pathname)) (let* ((content (car (os-cat file :list))) - (skelethon-name (tosymbol (car content))) - (skelethon-body (cdr content))) + (skeleton-name (tosymbol (car content))) + (skeleton-body (cdr content))) ;; - (jlog:dbg "Processing skelethon file ``~a''" file) - (eval (cons 'defskelethon (cons skelethon-name skelethon-body))))) + (jlog:dbg "Processing skeleton file ``~a''" file) + (eval (cons 'defskeleton (cons skeleton-name skeleton-body))))) -(defun parse-skelethon-inline (name skelethon) +(defun parse-skeleton-inline (name skeleton) (check-type name symbol) - (check-type skelethon list) - (eval (cons 'defskelethon (cons name skelethon)))) + (check-type skeleton list) + (eval (cons 'defskeleton (cons name skeleton)))) -(defmacro make-get-project-smth-dir (dir) ;; TODO: rewrite w/o get-project-skelethon +(defmacro make-get-project-smth-dir (dir) ;; TODO: rewrite w/o get-project-skeleton `(progn (defgeneric ,(intern (string-upcase (concatenate 'string "project-" dir "-dir"))) (project)) (defmethod ,(intern (string-upcase (concatenate 'string "project-" dir "-dir"))) ((project project)) (let ((dir (parse-namestring - (,(intern (string-upcase (concatenate 'string "get-skelethon-" dir))) - (find-skelethon + (,(intern (string-upcase (concatenate 'string "get-skeleton-" dir))) + (find-skeleton (or - (try (slot-value project 'skelethon)) - (list *jabs-default-skelethon-name*)) + (try (slot-value project 'skeleton)) + (list *jabs-default-skeleton-name*)) )))) (project-pathname (get-project-pathname project)) (workdir (os-pwd))) @@ -292,84 +292,84 @@ not included to main schema (like socket or dev dir etc)" (dolist (d (list "src" "bin" "lib" "doc" "share" "test" "contrib" "conf" "public" "cache" "script" "log" "template" "opt" "tmp")) (eval `(make-get-project-smth-dir ,d))) -;; TODO: skelethon:create-from-project -;; TODO: show list of skelethons +;; TODO: skeleton:create-from-project +;; TODO: show list of skeletons -;; TODO: +add project name to skelethon dirs +;; TODO: +add project name to skeleton dirs ;; TODO: +add package naming convension -;; TODO: +add build.jab sample for all skelethons +;; TODO: +add build.jab sample for all skeletons -(defun process-skelethon (skelethon-params) - "process skelethon" +(defun process-skeleton (skeleton-params) + "process skeleton" (let* ((project-name (get-project-name *jabs-current-project*)) - (skelethon-name (if (atom skelethon-params) skelethon-params (car skelethon-params))) - (skelethon-force (when (listp skelethon-params) (cadr skelethon-params))) - (skelethon-obj (if skelethon-name - (find-skelethon skelethon-name) + (skeleton-name (if (atom skeleton-params) skeleton-params (car skeleton-params))) + (skeleton-force (when (listp skeleton-params) (cadr skeleton-params))) + (skeleton-obj (if skeleton-name + (find-skeleton skeleton-name) (progn - (jlog:wrn "There is no skelethon ``~a'' for project ``~a''. Using default: ``~a''" - skelethon-name project-name *jabs-default-skelethon-name*) - (find-skelethon *jabs-default-skelethon-name*))))) + (jlog:wrn "There is no skeleton ``~a'' for project ``~a''. Using default: ``~a''" + skeleton-name project-name *jabs-default-skeleton-name*) + (find-skeleton *jabs-default-skeleton-name*))))) ;; - (when (null skelethon-obj) - (jlog:crit "There is no skelethon for project ``~a'' or default skeelethon ``~a''. Check your installation consistency" - project-name *jabs-default-skelethon-name*)) - (if skelethon-force - (jlog:dbg "Processing skelethon ``~a'' for project ``~a'' FORCE" skelethon-name project-name) - (jlog:dbg "Processing skelethon ``~a'' for project ``~a''" skelethon-name project-name)) - (setf skelethon-name (tosymbol (gensym "SKELETHON-"))) - (initialize-skelethon skelethon-obj :force skelethon-force))) - -(defun find-skelethon-file (name) + (when (null skeleton-obj) + (jlog:crit "There is no skeleton for project ``~a'' or default skeelethon ``~a''. Check your installation consistency" + project-name *jabs-default-skeleton-name*)) + (if skeleton-force + (jlog:dbg "Processing skeleton ``~a'' for project ``~a'' FORCE" skeleton-name project-name) + (jlog:dbg "Processing skeleton ``~a'' for project ``~a''" skeleton-name project-name)) + (setf skeleton-name (tosymbol (gensym "SKELETHON-"))) + (initialize-skeleton skeleton-obj :force skeleton-force))) + +(defun find-skeleton-file (name) (check-type name (or string symbol)) - (let ((skelethon-name (string-downcase (princ-to-string name))) - (skelethon-dirs)) - (dolist (dirs *jabs-skelethon-directories*) + (let ((skeleton-name (string-downcase (princ-to-string name))) + (skeleton-dirs)) + (dolist (dirs *jabs-skeleton-directories*) (dolist (dir (directory (merge-pathnames - (make-pathname :name skelethon-name :type *jabs-skelethon-template-type*) + (make-pathname :name skeleton-name :type *jabs-skeleton-template-type*) dirs))) - (push dir skelethon-dirs))) - (car skelethon-dirs))) + (push dir skeleton-dirs))) + (car skeleton-dirs))) -(defun load-skelethon (skelethon) - (let ((skelethon-name (if (listp skelethon) (car skelethon) skelethon))) - (when (and (not (find-skelethon skelethon-name)) (or (atom skelethon) (null (cdr skelethon)) (eq (cdr skelethon) :force))) +(defun load-skeleton (skeleton) + (let ((skeleton-name (if (listp skeleton) (car skeleton) skeleton))) + (when (and (not (find-skeleton skeleton-name)) (or (atom skeleton) (null (cdr skeleton)) (eq (cdr skeleton) :force))) (let ((file-to-load - (find-skelethon-file (string-downcase (princ-to-string skelethon-name))))) + (find-skeleton-file (string-downcase (princ-to-string skeleton-name))))) (if file-to-load - (parse-skelethon-from-file file-to-load) - (jlog:crit "There is no file for skelethon ``~a''" skelethon-name)))))) + (parse-skeleton-from-file file-to-load) + (jlog:crit "There is no file for skeleton ``~a''" skeleton-name)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; extending defproject syntax (bind-project-symbol - :skelethon + :skeleton #'(lambda (x) (declare (ignore x)))) -(defgeneric load-project-skelethon (project) +(defgeneric load-project-skeleton (project) ) -(defmethod load-project-skelethon ((project project)) - (let ((skelethon +(defmethod load-project-skeleton ((project project)) + (let ((skeleton (or - (try (slot-value project 'skelethon)) - (list *jabs-default-skelethon-name*)))) - (load-skelethon skelethon))) + (try (slot-value project 'skeleton)) + (list *jabs-default-skeleton-name*)))) + (load-skeleton skeleton))) -(defgeneric process-project-skelethon (project) +(defgeneric process-project-skeleton (project) ) -(defmethod process-project-skelethon ((project project)) - (let ((skelethon (or - (try (slot-value project 'skelethon)) - (list *jabs-default-skelethon-name*)))) - (process-skelethon skelethon))) +(defmethod process-project-skeleton ((project project)) + (let ((skeleton (or + (try (slot-value project 'skeleton)) + (list *jabs-default-skeleton-name*)))) + (process-skeleton skeleton))) -;;;; adding define-project-hook to load skelethon -(add-hook *define-project-hook* #'load-project-skelethon) +;;;; adding define-project-hook to load skeleton +(add-hook *define-project-hook* #'load-project-skeleton) -;;;; adding run-project-hook to process skelethon -;; (add-hook *run-project-hook* #'process-project-skelethon) +;;;; adding run-project-hook to process skeleton +;; (add-hook *run-project-hook* #'process-project-skeleton) diff --git a/src/core/jabs-test/jabs-test.lisp b/src/core/jabs-test/jabs-test.lisp index 881ee17..c55154b 100644 --- a/src/core/jabs-test/jabs-test.lisp +++ b/src/core/jabs-test/jabs-test.lisp @@ -77,19 +77,19 @@ The logic is: if you don't have modeline, than all of your test files acceptable. Else, you should mark, what test engine do you use " - (let* ((skelethon (find-skelethon - (or (try (car (project-slot-value project 'skelethon))) - (try (project-slot-value project 'skelethon)) - *jabs-default-skelethon-name*))) - (skelethon-test-dir (pathname-as-directory + (let* ((skeleton (find-skeleton + (or (try (car (project-slot-value project 'skeleton))) + (try (project-slot-value project 'skeleton)) + *jabs-default-skeleton-name*))) + (skeleton-test-dir (pathname-as-directory (parse-namestring - (or (try (car (get-skelethon-test skelethon))) - (try (get-skelethon-test skelethon)) + (or (try (car (get-skeleton-test skeleton))) + (try (get-skeleton-test skeleton)) "")))) (project-pathname (pathname-as-directory (parse-namestring (or (project-slot-value project 'pathname) ""))))) - ;; (jlog:note "~a" (merge-pathnames skelethon-test-dir project-pathname)) + ;; (jlog:note "~a" (merge-pathnames skeleton-test-dir project-pathname)) (labels ((check-files (string files) (if (null files) nil (let ((scanstring @@ -107,7 +107,7 @@ Else, you should mark, what test engine do you use (get-plugin-name plugin) (get-plugin-type plugin)) t) (os-find (merge-pathnames - (merge-pathnames skelethon-test-dir project-pathname) + (merge-pathnames skeleton-test-dir project-pathname) (os-pwd)) :type :file :extension "lisp"))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -164,7 +164,7 @@ Else, you should mark, what test engine do you use ;; hit@round@bout -> bout -> round@bout -> round@ -> hit@@bout -> hit@round@ -> hit@@ -;; TEST running all files from skelethon test directory by default +;; TEST running all files from skeleton test directory by default ;; "**/Test*.java" - includes all of its subdirectories and all Java filenames that start with "Test". ;; "**/*Test.java" - includes all of its subdirectories and all Java filenames that end with "Test". diff --git a/src/jabs-loader.lisp.input b/src/jabs-loader.lisp.input index 5b5f0b2..1ab649e 100644 --- a/src/jabs-loader.lisp.input +++ b/src/jabs-loader.lisp.input @@ -28,7 +28,7 @@ ;;load core plugins (jlog:info "Loading core plugins") -(dolist (v '("jabs-skelethon" +(dolist (v '("jabs-skeleton" "jabs-asdf" "jabs-depmanager" "jabs-hit" diff --git a/src/jabs-plugin.lisp b/src/jabs-plugin.lisp index 07a96fa..423b09b 100644 --- a/src/jabs-plugin.lisp +++ b/src/jabs-plugin.lisp @@ -297,7 +297,7 @@ by many projects w/o requirement to set it as plugin in (plugin-type (tosymbol (cadr (split #\@ (princ-to-string plugin)))))) (load-plugin plugin-name plugin-type))))) -;; adding run-project-hook to load and process skelethon +;; adding run-project-hook to load and process skeleton (add-hook *define-project-hook* #'(lambda (x) diff --git a/src/wrappers/jab/jab.lisp.input b/src/wrappers/jab/jab.lisp.input index 8d63296..0370702 100644 --- a/src/wrappers/jab/jab.lisp.input +++ b/src/wrappers/jab/jab.lisp.input @@ -81,7 +81,7 @@ --autogen-project Generates simple buildfile (``build.jab'' by default. See -f option) available options: -Dtmpl-version= - -Dtmpl-skelethon= + -Dtmpl-skeleton= --serve Start swank server to work with app interactively -f, --buildfile=FILENAME Use selected buildfile instead of default diff --git a/test/e2e.sh b/test/e2e.sh index 87086b2..d899c34 100755 --- a/test/e2e.sh +++ b/test/e2e.sh @@ -11,7 +11,7 @@ cd ${DIR} echo '(in-package :jabs)' > testfile.lisp echo '(format *error-output* "Hello World~%")' >> testfile.lisp -${ROOT}/src/wrappers/jn/jn.sh -Dbouts=tmpl-mkproject -Dplugins=tmpl@generic -Dtmpl-skelethon=flat +${ROOT}/src/wrappers/jn/jn.sh -Dbouts=tmpl-mkproject -Dplugins=tmpl@generic -Dtmpl-skeleton=flat set +e -- GitLab From e4ada687611e1d81fec78fda674f4d69e1e58d9a Mon Sep 17 00:00:00 2001 From: Alexander Vynnyk Date: Sun, 5 Feb 2017 16:46:25 +0200 Subject: [PATCH 2/2] Fix directory placement --- doc | 2 +- share/hits/{load-skelethon.hit => load-skeleton.hit} | 0 share/hits/{process-skelethon.hit => process-skeleton.hit} | 0 share/{skelethons => skeletons}/default.skl | 0 share/{skelethons => skeletons}/flat.skl | 0 .../jabs-skelethon.lisp => jabs-skeleton/jabs-skeleton.lisp} | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename share/hits/{load-skelethon.hit => load-skeleton.hit} (100%) rename share/hits/{process-skelethon.hit => process-skeleton.hit} (100%) rename share/{skelethons => skeletons}/default.skl (100%) rename share/{skelethons => skeletons}/flat.skl (100%) rename src/core/{jabs-skelethon/jabs-skelethon.lisp => jabs-skeleton/jabs-skeleton.lisp} (100%) diff --git a/doc b/doc index ee469f9..7b7af0c 160000 --- a/doc +++ b/doc @@ -1 +1 @@ -Subproject commit ee469f99aa726cf8f930ae1db3fda6ba4767dd2b +Subproject commit 7b7af0ce2628813d7914396ce30fdd761f6cc7ac diff --git a/share/hits/load-skelethon.hit b/share/hits/load-skeleton.hit similarity index 100% rename from share/hits/load-skelethon.hit rename to share/hits/load-skeleton.hit diff --git a/share/hits/process-skelethon.hit b/share/hits/process-skeleton.hit similarity index 100% rename from share/hits/process-skelethon.hit rename to share/hits/process-skeleton.hit diff --git a/share/skelethons/default.skl b/share/skeletons/default.skl similarity index 100% rename from share/skelethons/default.skl rename to share/skeletons/default.skl diff --git a/share/skelethons/flat.skl b/share/skeletons/flat.skl similarity index 100% rename from share/skelethons/flat.skl rename to share/skeletons/flat.skl diff --git a/src/core/jabs-skelethon/jabs-skelethon.lisp b/src/core/jabs-skeleton/jabs-skeleton.lisp similarity index 100% rename from src/core/jabs-skelethon/jabs-skelethon.lisp rename to src/core/jabs-skeleton/jabs-skeleton.lisp -- GitLab