Skip to content

Commit

Permalink
Merge pull request #56 from gwaredd/dev
Browse files Browse the repository at this point in the history
maintenance and pytest examples
  • Loading branch information
gwaredd authored Jul 20, 2019
2 parents ce45449 + 8693ac0 commit d78faea
Show file tree
Hide file tree
Showing 35 changed files with 1,445 additions and 108 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[Ll]ibrary/
[Ll]ogs/
[Tt]emp/
[Tt]mp/
[Oo]bj/
Expand Down Expand Up @@ -53,5 +54,6 @@ node_modules
yarn-error.log
npm-error.log

# tools
checkout.bat
__pycache__
.pytest_cache
node_modules
2 changes: 1 addition & 1 deletion Assets/StreamingAssets/alacarte/index.html
Original file line number Diff line number Diff line change
@@ -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>
<!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>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/StreamingAssets/alacarte/static/js/2.c0718291.chunk.js

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Assets/StreamingAssets/alacarte/static/js/2.ff78cc1e.chunk.js

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion Assets/Unium/Unium.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static class Unium
{
public delegate void EventDelegate( object data );

public static readonly Version Version = new Version( 1, 0, 2 );
public static readonly Version Version = new Version( 1, 0, 3 );
public static Router RoutesHTTP = new Router();
public static Router RoutesSocket = new Router();
public static Root Root = new Root();
Expand Down
Binary file modified Assets/Unium/unium.pdf
Binary file not shown.
8 changes: 5 additions & 3 deletions Dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "unium development scripts",
"scripts": {
"test": "node node_modules/mocha/bin/mocha --opts ./test/mocha.opts ./test/*.coffee",
"compile": "coffee -c -b -m -o ./tmp ./scripts/"
"release": "coffee release.coffee"
},
"author": "[email protected]",
"license": "MIT",
Expand All @@ -13,13 +13,15 @@
"chai": "^4.2.0",
"chalk": "^2.4.2",
"coffeescript": "^2.4.1",
"mocha": "^6.1.4",
"fs-extra": "^8.1.0",
"glob": "^7.1.4",
"mocha": "^6.2.0",
"moment": "^2.24.0",
"npmlog": "^4.1.2",
"optimist": "^0.6.1",
"q": "^1.5.1",
"requestify": "^0.2.5",
"underscore": "^1.9.1",
"ws": "^7.1.0"
"ws": "^7.1.1"
}
}
40 changes: 40 additions & 0 deletions Dev/release.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{spawn} = require 'child_process'
fs = require 'fs-extra'
glob = require 'glob'
chalk = require 'chalk'


info = (action,object) ->
console.log chalk.green( action ), chalk.white object


bumpVersion = ->

file = '../Assets/Unium/Unium.cs'
re = /Version\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/

# read file
contents = fs.readFileSync file, 'utf8'

# bump version
match = re.exec contents
version = match[ 1..3 ].map (v) -> parseInt v
version[2]++

# replace file
contents = contents.replace re, "Version( #{ version.join ', ' } )"
fs.writeFileSync file, contents, 'utf8'

return version.join '.'


ver = bumpVersion()
info 'version', ver

info 'update', 'unium.pdf'
fs.copySync '../unium.pdf', '../Assets/Unium/unium.pdf'

info 'git', 'add files'
git = spawn 'git', "add --verbose ../Assets/Unium".split ' '
git.stdout.on 'data', (data) -> console.log data.toString().trim()
git.stderr.on 'data', (data) -> console.error data.toString().trim()
Loading

0 comments on commit d78faea

Please sign in to comment.