Repository: polygene-java Updated Branches: refs/heads/develop 0fc84c742 -> 4a2d64432
Fix in Command Line App handling. Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/4a2d6443 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/4a2d6443 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/4a2d6443 Branch: refs/heads/develop Commit: 4a2d6443202d97dacb29595dd79bbc9e45e8b657 Parents: 0fc84c7 Author: niclas <[email protected]> Authored: Thu Apr 13 14:10:42 2017 +0800 Committer: niclas <[email protected]> Committed: Thu Apr 13 14:10:42 2017 +0800 ---------------------------------------------------------------------- .../app/templates/CommandLineApplication/app.js | 13 +++++++------ .../app/templates/UserInterfaceLayer/bootstrap.tmpl | 2 +- tools/generator-polygene/test/generator_test.js | 16 ++++++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4a2d6443/tools/generator-polygene/app/templates/CommandLineApplication/app.js ---------------------------------------------------------------------- diff --git a/tools/generator-polygene/app/templates/CommandLineApplication/app.js b/tools/generator-polygene/app/templates/CommandLineApplication/app.js index 83648f6..0274517 100644 --- a/tools/generator-polygene/app/templates/CommandLineApplication/app.js +++ b/tools/generator-polygene/app/templates/CommandLineApplication/app.js @@ -1,14 +1,15 @@ + module.exports = { write: function (p) { - copyLayer("Configuration"); - copyLayer("Infrastructure"); - copyLayer("Domain"); - copyLayer("UserInterface"); + copyLayer(p, "Configuration"); + copyLayer(p, "Infrastructure"); + copyLayer(p, "Domain"); + copyLayer(p, "UserInterface"); } }; -function copyLayer(layerName) { +function copyLayer(p, layerName) { var layer = require(__dirname + '/../' + layerName + 'Layer/layer.js'); - layer.write(polygene); + layer.write(p); } http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4a2d6443/tools/generator-polygene/app/templates/UserInterfaceLayer/bootstrap.tmpl ---------------------------------------------------------------------- diff --git a/tools/generator-polygene/app/templates/UserInterfaceLayer/bootstrap.tmpl b/tools/generator-polygene/app/templates/UserInterfaceLayer/bootstrap.tmpl index dbbbb1b..8d2a72e 100644 --- a/tools/generator-polygene/app/templates/UserInterfaceLayer/bootstrap.tmpl +++ b/tools/generator-polygene/app/templates/UserInterfaceLayer/bootstrap.tmpl @@ -33,7 +33,7 @@ public class UserInterfaceLayer extends LayeredLayerAssembler public LayerAssembly assemble( LayerAssembly layer ) throws AssemblyException { -<% if( polygene.applicationtype === 'Rest API' ) { %> +<% if( polygene.applicationtype === 'Command Line' ) { %> createModule( layer, CommandLineModule.class ); <% } -%> return layer; http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4a2d6443/tools/generator-polygene/test/generator_test.js ---------------------------------------------------------------------- diff --git a/tools/generator-polygene/test/generator_test.js b/tools/generator-polygene/test/generator_test.js index 5ca6e8b..bc556f2 100644 --- a/tools/generator-polygene/test/generator_test.js +++ b/tools/generator-polygene/test/generator_test.js @@ -62,28 +62,32 @@ var featuresset = [ ['security'] ]; +appTypes.forEach(function (appType) { + test(appType, "Memory", "Rdf", "JavaxJson", "Memcache", "Codahale", "[]"); +}); + entityStores.forEach(function (entityStore) { - test(entityStore, "Rdf", "JavaxJson", "Memcache", "Codahale", "[]"); + test("Rest API", entityStore, "Rdf", "JavaxJson", "Memcache", "Codahale", "[]"); }); indexings.forEach(function (indexing) { - test("Memory", indexing, "JavaxJson", "Memcache", "Codahale", "[]"); + test("Rest API", "Memory", indexing, "JavaxJson", "Memcache", "Codahale", "[]"); }); serializations.forEach(function (serialization) { - test("Memory", "Rdf", serialization, "Memcache", "Codahale", "[]"); + test("Rest API", "Memory", "Rdf", serialization, "Memcache", "Codahale", "[]"); }); cachings.forEach(function (caching) { - test("Memory", "Rdf", "JavaxJson", caching, "Codahale", "[]"); + test("Rest API", "Memory", "Rdf", "JavaxJson", caching, "Codahale", "[]"); }); metricses.forEach(function (metrics) { - test("Memory", "Rdf", "JavaxJson", "Memcache", metrics, "[]"); + test("Rest API", "Memory", "Rdf", "JavaxJson", "Memcache", metrics, "[]"); }); featuresset.forEach(function (feature) { - test("Memory", "Rdf", "JavaxJson", "Memcache", "Codahale", feature); + test("Rest API", "Memory", "Rdf", "JavaxJson", "Memcache", "Codahale", feature); }); // All Tests !!!!
