Skip to content

Commit d78faea

Browse files
authored
Merge pull request #56 from gwaredd/dev
maintenance and pytest examples
2 parents ce45449 + 8693ac0 commit d78faea

35 files changed

+1445
-108
lines changed

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[Ll]ibrary/
2+
[Ll]ogs/
23
[Tt]emp/
34
[Tt]mp/
45
[Oo]bj/
@@ -53,5 +54,6 @@ node_modules
5354
yarn-error.log
5455
npm-error.log
5556

56-
# tools
57-
checkout.bat
57+
__pycache__
58+
.pytest_cache
59+
node_modules
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Unium Ala Carte</title><link href="/alacarte/static/css/2.07a70648.chunk.css" rel="stylesheet"><link href="/alacarte/static/css/main.2e6b069d.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/alacarte/static/js/2.ff78cc1e.chunk.js"></script><script src="/alacarte/static/js/main.f1794c8b.chunk.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Unium Ala Carte</title><link href="/alacarte/static/css/2.07a70648.chunk.css" rel="stylesheet"><link href="/alacarte/static/css/main.fb194e1b.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={1:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/alacarte/static/js/2.c0718291.chunk.js"></script><script src="/alacarte/static/js/main.611a61ab.chunk.js"></script></body></html>

Assets/StreamingAssets/alacarte/static/css/main.2e6b069d.chunk.css Assets/StreamingAssets/alacarte/static/css/main.fb194e1b.chunk.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/js/2.ff78cc1e.chunk.js.map.meta Assets/StreamingAssets/alacarte/static/css/main.fb194e1b.chunk.css.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/js/2.c0718291.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/css/main.2e6b069d.chunk.css.meta Assets/StreamingAssets/alacarte/static/js/2.c0718291.chunk.js.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/js/2.ff78cc1e.chunk.js

-2
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/2.ff78cc1e.chunk.js.map

-1
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/main.611a61ab.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/js/2.ff78cc1e.chunk.js.meta Assets/StreamingAssets/alacarte/static/js/main.611a61ab.chunk.js.meta

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/StreamingAssets/alacarte/static/js/main.f1794c8b.chunk.js

-2
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/main.f1794c8b.chunk.js.map

-1
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/main.f1794c8b.chunk.js.map.meta

-7
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/main.f1794c8b.chunk.js.meta

-7
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/runtime~main.a8a9905a.js.map

-1
This file was deleted.

Assets/StreamingAssets/alacarte/static/js/runtime~main.a8a9905a.js.map.meta

-7
This file was deleted.

Assets/Unium/Unium.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static class Unium
1818
{
1919
public delegate void EventDelegate( object data );
2020

21-
public static readonly Version Version = new Version( 1, 0, 2 );
21+
public static readonly Version Version = new Version( 1, 0, 3 );
2222
public static Router RoutesHTTP = new Router();
2323
public static Router RoutesSocket = new Router();
2424
public static Root Root = new Root();

Assets/Unium/unium.pdf

-657 Bytes
Binary file not shown.

Dev/package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "unium development scripts",
55
"scripts": {
66
"test": "node node_modules/mocha/bin/mocha --opts ./test/mocha.opts ./test/*.coffee",
7-
"compile": "coffee -c -b -m -o ./tmp ./scripts/"
7+
"release": "coffee release.coffee"
88
},
99
"author": "[email protected]",
1010
"license": "MIT",
@@ -13,13 +13,15 @@
1313
"chai": "^4.2.0",
1414
"chalk": "^2.4.2",
1515
"coffeescript": "^2.4.1",
16-
"mocha": "^6.1.4",
16+
"fs-extra": "^8.1.0",
17+
"glob": "^7.1.4",
18+
"mocha": "^6.2.0",
1719
"moment": "^2.24.0",
1820
"npmlog": "^4.1.2",
1921
"optimist": "^0.6.1",
2022
"q": "^1.5.1",
2123
"requestify": "^0.2.5",
2224
"underscore": "^1.9.1",
23-
"ws": "^7.1.0"
25+
"ws": "^7.1.1"
2426
}
2527
}

Dev/release.coffee

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{spawn} = require 'child_process'
2+
fs = require 'fs-extra'
3+
glob = require 'glob'
4+
chalk = require 'chalk'
5+
6+
7+
info = (action,object) ->
8+
console.log chalk.green( action ), chalk.white object
9+
10+
11+
bumpVersion = ->
12+
13+
file = '../Assets/Unium/Unium.cs'
14+
re = /Version\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/
15+
16+
# read file
17+
contents = fs.readFileSync file, 'utf8'
18+
19+
# bump version
20+
match = re.exec contents
21+
version = match[ 1..3 ].map (v) -> parseInt v
22+
version[2]++
23+
24+
# replace file
25+
contents = contents.replace re, "Version( #{ version.join ', ' } )"
26+
fs.writeFileSync file, contents, 'utf8'
27+
28+
return version.join '.'
29+
30+
31+
ver = bumpVersion()
32+
info 'version', ver
33+
34+
info 'update', 'unium.pdf'
35+
fs.copySync '../unium.pdf', '../Assets/Unium/unium.pdf'
36+
37+
info 'git', 'add files'
38+
git = spawn 'git', "add --verbose ../Assets/Unium".split ' '
39+
git.stdout.on 'data', (data) -> console.log data.toString().trim()
40+
git.stderr.on 'data', (data) -> console.error data.toString().trim()

0 commit comments

Comments
 (0)