diff --git a/mocha-common b/mocha-common index 94de4f0..8825fc5 160000 --- a/mocha-common +++ b/mocha-common @@ -1 +1 @@ -Subproject commit 94de4f0a8e855543c0f1b0679aebf7caa2db56c9 +Subproject commit 8825fc5980678050edde42e7555a15e3ed99c016 diff --git a/mocha-php b/mocha-php index 70a9255..62f717e 160000 --- a/mocha-php +++ b/mocha-php @@ -1 +1 @@ -Subproject commit 70a9255d1e6732bd3f43f633b32dfb20fea66aba +Subproject commit 62f717eda520af256b05f20505f18eca0d22e7b6 diff --git a/mocha-suv/common/libexec/mocha-suv b/mocha-suv/common/libexec/mocha-suv index 9c3da1e..a69d59c 100755 --- a/mocha-suv/common/libexec/mocha-suv +++ b/mocha-suv/common/libexec/mocha-suv @@ -337,6 +337,8 @@ elif [ "$1" == "new" ]; then esac done + ARGS=${1+"$@"} + if [ "$BACKEND" == "vagrant" ]; then command -v vagrant 2>&1 >/dev/null @@ -367,11 +369,12 @@ elif [ "$1" == "new" ]; then elif [ "$BACKEND" == "docker" ]; then - cd /usr/lib/mocha/docker - ./docker-run + pushd /usr/lib/mocha/docker + ./docker-run $ARGS + popd else - + echo "unknown backend '$BACKEND'" fi diff --git a/mocha-suv/common/oms.conf b/mocha-suv/common/oms.conf new file mode 100644 index 0000000..a0d6d6f --- /dev/null +++ b/mocha-suv/common/oms.conf @@ -0,0 +1,41 @@ +# -------------------------------------------- +# Mocha OMS Configuration File +# Format Description +# -------------------------------------------- +# +# Keys that can include Spaces = Value ... +# +# Property Group = { Property Name = Value } +# Property Group with Multiple Properties +# { +# Property Name = Value +# Another Property = Value +# } +# +# Test Group = { Name = Value, Another = Value2 } +# +# Array = [ Something, Something Else ] +# Multiline Array = +# [ +# Something +# Something Else +# Yet Another Thing, And Another +# "Value with embedded, commas # and pound signs and \"quotes\"" +# ] +# +# When reading the file, if '=' has been encountered but '\n' comes before +# a valid property value, assume property line continues on next line and +# keep reading. Otherwise, '\n' terminates the property line. +# +# Inside array, '\n' always delineates an array value, as does ',' (unless quoted). +# Quotes behave and can be escaped "just as you \"would\" expect". +Version = 1.0 + +OMS Server Settings = +{ + Port = 4436 + Catch Exceptions = + [ + System.NotImplementedException + ] +} \ No newline at end of file diff --git a/mocha-suv/docker/fs/usr/sbin/mochactl b/mocha-suv/docker/fs/usr/sbin/mochactl index 3d642f0..b9cdf42 100755 --- a/mocha-suv/docker/fs/usr/sbin/mochactl +++ b/mocha-suv/docker/fs/usr/sbin/mochactl @@ -11,6 +11,10 @@ case "$1" in exec $EXECPATH/$EXECFILE & apache2ctl -D FOREGROUND ;; + "stop") + echo "not implemented; just restart the container for now" + exit 2 + ;; "up") exec $EXECPATH/$EXECFILE & mocha up diff --git a/samples/PrepChart/PrepChart.dtd b/samples/PrepChart/PrepChart.dtd new file mode 100644 index 0000000..82bd341 --- /dev/null +++ b/samples/PrepChart/PrepChart.dtd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/PrepChart/PrepChart.mochax b/samples/PrepChart/PrepChart.mochax new file mode 100644 index 0000000..30a007e --- /dev/null +++ b/samples/PrepChart/PrepChart.mochax @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/samples/PrepChart/PrepChartLineItem.mochax b/samples/PrepChart/PrepChartLineItem.mochax new file mode 100644 index 0000000..3d756fe --- /dev/null +++ b/samples/PrepChart/PrepChartLineItem.mochax @@ -0,0 +1,20 @@ +// Copyright (C) 2025 Michael Becker +// +// This file is part of mocha-suv. +// +// mocha-suv is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// mocha-suv is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with mocha-suv. If not, see . + + + + diff --git a/samples/PrepChart/Zq2/PrepChart.zq2 b/samples/PrepChart/Zq2/PrepChart.zq2 new file mode 100644 index 0000000..202a9a0 --- /dev/null +++ b/samples/PrepChart/Zq2/PrepChart.zq2 @@ -0,0 +1,93 @@ +// class name id sugarname { } +classIndexBase 13100 + +attributes { + text `Recipe Name` recipeName + +} + +relationships { + hasShelfLifeMeasurementUnit { + source shelfLife + type "has" + target shelfLifeMeasurementUnit + singular false + sibling { + type "for" + } + } + hasPrepChartItem { + source prepchart + type "has" + target prepchartitem + singular false + sibling { + type "for" + } + } +} + +class `Recipe Shelf Life` shelfLife { + + attribute shelfLifeAmount + relationship hasShelfLifeMeasurementUnit + +} + +class `Recipe Shelf Life Measurement Unit` shelfLifeMeasurementUnit { + + attribute shelfLifeAmount + relationship hasShelfLifeMeasurementUnit + +} + +module `Prep Chart` prepchartmodule { + + class `Prep Chart` prepchart { + + attributes { + name + } + relationships { + hasPrepChartItem items + } + constructors { + name + } + } + + class `Prep Chart Line Item` prepchartitem { + + attributes { + name + } + relationships { + forPrepChartItem + } + + public getSpecificInstances `get` `Prep Chart Line Item 1` returns pp1 + public getSpecificInstances `get` `My Line Items` returns [ pp1 pp2 pp3 ] + + instances { + { + name "Prep Chart Line Item 1" + } pp1 + `Prep Chart Line Item 2` pp2 + } + + constructors { + name + } + } + + prepchart `Default Prep Chart` + { + items + { + pp1 + pp2 + new prepchartitem `Prep Chart Line Item 3` pp3 + } + } + +} \ No newline at end of file diff --git a/samples/mochax.xsd b/samples/mochax.xsd new file mode 100644 index 0000000..2e20a3e --- /dev/null +++ b/samples/mochax.xsd @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file