Skip to content

Commit

Permalink
Merge pull request #1 from massiveinteractive/master
Browse files Browse the repository at this point in the history
Bring my fork up-to-date
  • Loading branch information
jasononeil committed Dec 25, 2012
2 parents 7b0fcee + afa394b commit 4473ed4
Show file tree
Hide file tree
Showing 51 changed files with 339 additions and 214 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
.svn
.svn
haxe/tmp/
report/
bin/
.DS_Store
.mcover
/mlib.sublime-workspace
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2011 Massive Interactive. All rights reserved.
Copyright 2012 Massive Interactive. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
Expand Down
29 changes: 0 additions & 29 deletions build.hxml

This file was deleted.

34 changes: 34 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
set -e

mkdir -p bin

#build tool
echo ' build tool src'
cd tool
haxe build.hxml
cd ../

#neko mlib.n license

#update allClasses imports
neko mlib.n allClasses

#compile libraries
echo ' build haxe src'
cd haxe
haxe build.hxml

echo ' build neko src'
cd ../neko
haxe build.hxml

cd ../

#run tests
bash test.sh

#package up and install over current version
neko mlib.n install

#neko mlib.n submit
5 changes: 3 additions & 2 deletions haxe/.munit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version=0.2.0.116
version=0.9.5.2
src=test
bin=../bin
report=../report/haxe
hxml=test.hxml
hxml=test.hxml
classPaths=src
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/AllClasses.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/Exception.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/log/ILogClient.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/log/Log.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/log/LogClient.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/util/ReflectUtil.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/util/RegExpUtil.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion haxe/src/massive/haxe/util/TemplateUtil.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
8 changes: 4 additions & 4 deletions haxe/test.hxml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Flash 9+
-main TestMain
-lib munit
-cp test
-cp src
-lib munit
-swf9 ../bin/haxe_test.swf

--next

#Flash 8
-main TestMain
-lib munit
-cp test
-cp src
-lib munit
-swf ../bin/haxe8_test.swf

--next

# JavaScript
-main TestMain
-lib munit
-cp test
-cp src
-lib munit
-js ../bin/haxe_test.js

--next

# Neko
-main TestMain
-lib munit
-cp test
-cp src
-lib munit
-neko ../bin/haxe_test.n
112 changes: 71 additions & 41 deletions haxe/test/TestMain.hx
Original file line number Diff line number Diff line change
@@ -1,55 +1,85 @@
/*
Copyright (c) 2012 Massive Interactive
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

import massive.munit.client.PrintClient;
import massive.munit.client.RichPrintClient;
import massive.munit.client.HTTPClient;
import massive.munit.client.JUnitReportClient;
import massive.munit.client.SummaryReportClient;
import massive.munit.TestRunner;

#if js
import js.Lib;
import js.Dom;
#end


/**
* Auto generated Test Application.
* Auto generated Test Application.
* Refer to munit command line tool for more information (haxelib run munit)
*/
class TestMain
{
static function main(){ new TestMain(); }

public function new()
{
var suites = new Array<Class<massive.munit.TestSuite>>();
suites.push(TestSuite);

#if MCOVER
var client = new mcover.coverage.munit.client.MCoverPrintClient();
var httpClient = new HTTPClient(new mcover.coverage.munit.client.MCoverSummaryReportClient());
#else
var client = new RichPrintClient();
var httpClient = new HTTPClient(new SummaryReportClient());
#end

var runner:TestRunner = new TestRunner(client);
runner.addResultClient(httpClient);
//runner.addResultClient(new HTTPClient(new JUnitReportClient()));

runner.completionHandler = completionHandler;
runner.run(suites);
}

class TestMain
{
static function main(){ new TestMain();}

public function new()
{
var suites = new Array<Class<massive.munit.TestSuite>>();
suites.push(TestSuite);

var runner:TestRunner = new TestRunner(new HTTPClient(new JUnitReportClient(), "http://localhost:2000"));
runner.addResultClient(new PrintClient());
runner.completionHandler = completionHandler;
runner.run(suites);
}

/*
updates the background color and closes the current browser
for flash and html targets (useful for continous integration servers)
*/
private function completionHandler(successful:Bool):Void
{
try
{
#if flash
flash.external.ExternalInterface.call("testResult", successful);
#elseif flash9
flash.external.ExternalInterface.call("testResult", successful);
#elseif js
js.Lib.eval("testResult(" + successful + ");");
#elseif neko
neko.Sys.exit(0);
#end
}
// if run from outside browser can get error which we can ignore
catch (e:Dynamic)
{
}
}
}
/*
updates the background color and closes the current browser
for flash and html targets (useful for continous integration servers)
*/
function completionHandler(successful:Bool):Void
{
try
{
#if flash
flash.external.ExternalInterface.call("testResult", successful);
#elseif js
js.Lib.eval("testResult(" + successful + ");");
#elseif neko
neko.Sys.exit(0);
#end
}
// if run from outside browser can get error which we can ignore
catch (e:Dynamic)
{
}
}
}
8 changes: 5 additions & 3 deletions haxelib.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<project name="mlib" url="https://github.com/massiveinteractive/MassiveLib" license="BSD">
<user name="massive"/>
<tag v="cross" />
<tag v="neko" />
<description>Massive Interactive public haXe libraries containing utilities and tools for developing simple command line driven neko and haxelib tools.</description>
<version name="0.3.0.2">Small internal change to HaxeWrapper to compile targets individually</version>
<tag v="sys" />
<tag v="haxelib" />
<tag v="massive" />
<description>Lightwieght framework for implementing command line driven haxelib (and neko) tools, and for automating the packaging/management of Haxelib libraries.</description>
<version name="0.4.3">Fix for HaxeWrapper and hxcpp errors (bug in nekovm)</version>
</project>
Binary file modified mlib.n
Binary file not shown.
8 changes: 8 additions & 0 deletions mlib.sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders":
[
{
"path": "/"
}
]
}
5 changes: 3 additions & 2 deletions neko/.munit
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version=0.2.0.116
version=0.9.5.2
src=test
bin=../bin
report=../report/neko
hxml=test.hxml
hxml=test.hxml
classPaths=src
2 changes: 1 addition & 1 deletion neko/src/massive/neko/AllClasses.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion neko/src/massive/neko/cmd/Command.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion neko/src/massive/neko/cmd/CommandLineRunner.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down
10 changes: 8 additions & 2 deletions neko/src/massive/neko/cmd/Console.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down Expand Up @@ -188,7 +188,13 @@ class Console
public function prompt(promptMsg:String, rpad:Int=0):String
{
neko.Lib.print(StringTools.rpad(promptMsg + " ", " ", rpad) + ": ");
var str:String = neko.io.File.stdin().readLine();

#if haxe_209
var str:String = Sys.stdin().readLine();
#else
var str:String = neko.io.File.stdin().readLine();
#end

if(str.length == 0)
{
str = null;
Expand Down
2 changes: 1 addition & 1 deletion neko/src/massive/neko/cmd/ICommand.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****
* Copyright 2011 Massive Interactive. All rights reserved.
* Copyright 2012 Massive Interactive. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
Expand Down

0 comments on commit 4473ed4

Please sign in to comment.