GPII-91: Removed node_modules. Updated package.json so we do not need to keep track of udpates any more. #77

Merged
merged 34 commits into from Mar 13, 2013

Projects

None yet

2 participants

@yzen
Member
yzen commented Mar 6, 2013

No description provided.

yzen added some commits Mar 6, 2013
@yzen yzen Merge branch 'GPII-77' into GPII-91 e091572
@yzen yzen GPII-91: Fixed merge conflict. 846c8d7
@yzen yzen GPII-76: Reverting commented out context.window. a6bcc5c
@yzen yzen GPII-91: Fixed merge conflict. 86721c0
@yzen yzen GPII-76: Fixed lifecycle manager tests. 5019795
@yzen yzen GPII-76: Fixed match maker tests. 05ac22d
@yzen yzen GPII-76: Updated ontology tests. 39d27cc
@yzen yzen GPII-76: Fixed transformer tests. 0bca164
@yzen yzen GPII-76: Fixed xml setting handlers tests. 715808d
@yzen yzen NOJIRA: Properly resolving jQuery in node (XMLSettignsHandler). 573cec9
@yzen yzen GPII-76: passing browser/node renderer grade tests. cef1ed9
@yzen yzen GPII-76: Updated infusion node module. 6dfa083
@yzen yzen GPII-76: fixing a bug with request handler handle method called in fi…
…nal init. Instead calling it onAttach so the handler itself could then be timely removed
344f02c
@yzen yzen GPII-91: Fixed merge conflict. e5429d1
@yzen yzen GPII-76: Updating gpii.app to the new awesome framework. 2582a46
@yzen yzen GPII-76: Slightly updated XML settings handler tests. 5b9a01d
@yzen yzen NOJIRA: Committing a XML settings handler tests in the stage that sho…
…w a failure of json to xml conversion.
ea94270
@yzen yzen NOJIRA: updated xml settings handlers tests with escaped backslashes.…
… Updated xml-mapping from yzen's branch.
8020c1f
@yzen yzen NOJIRA: Updated xml-mapping , test still fails, needs to be updated d949da8
@yzen yzen NOJIRA: Fixed XMLSettingsHandler tests. 4711199
@yzen yzen GPII-91: fixed merge conflicts. bb52f39
@yzen yzen NOJIRA: Updating to the latest xml-mapping that incorporates the attr…
…ibute name fixes.
e98a75d
@yzen yzen GPII-91: Resolved merge interference, all mentions of gpii.renderer. 9b3df2f
@yzen yzen GPII-91: Removed all node_modules. Updated package json eb2b3cc
@yzen yzen GPII-91: Added readme and gitignore for universal. 5a75813
@yzen yzen GPII-91: updated readme. 429a4d9
@yzen yzen Merge branch 'master' into GPII-91 6743183
@yzen yzen GPII-91: Updated package.json to contain SHA for infusion and jqUnit …
…dependencies.
7b03c39
@yzen yzen GPII-91: Removed static middleware for now. b4d1a5d
@amb26 amb26 commented on an outdated diff Mar 7, 2013
+ gpii = fluid.registerNamespace("gpii");
+ // Now you should have access to both fluid
+ // and gpii namespace.
+
+Testing
+-------
+
+There are currently 2 different sets of tests: the ones that run in the browser
+and the ones that can run in node.
+
+Running browser tests:
+open `{universal}/tests/web/html/all-tests.html` in your preferred browser:
+
+Running node tests:
+
+ node tests/all-tets.js
@amb26
amb26 Mar 7, 2013 Member

Typo here

@amb26 amb26 commented on an outdated diff Mar 7, 2013
...les/lifecycleManager/test/js/LifecycleManagerTests.js
@@ -14,12 +14,12 @@ https://github.com/gpii/universal/LICENSE.txt
// Declare dependencies
/*global require, fluid, jqUnit, gpii, start*/
+var fluid = fluid || require("infusion");
+var gpii = fluid.registerNamespace("gpii");
@amb26
amb26 Mar 7, 2013 Member

Logically, this (gpii global name) should go inside the closure - just in case we ever plan to apply versioning to the gpii namespace as well. Currently the "logical or trick" only works at global scope, but we hope to replace this back with "require" some day

@amb26 amb26 commented on an outdated diff Mar 7, 2013
...s/settingsHandlers/src/js/settingsHandlerUtilities.js
+};
+
+/**
+ * Convert JSON to XML.
+ * In case options.rules is present, first tranform JSON with invert rules.
+ */
+XMLHandler.JSONtoXML = function (json, options) {
+ options = options || {};
+ // Create XML - first line is the xml-tag from options if set.
+ var xml = options["xml-tag"] || "";
+ // Get inverse transformation rules.
+ var inversedJSON;
+ if (options.rules) {
+ var inverseRules = fluid.model.transform.invertConfiguration(options.rules);
+ // Transform back.
+ inversedJSON = fluid.model.transformWithRules(json, inverseRules);
@amb26
amb26 Mar 7, 2013 Member

"inversed" is not a word - this name should read "inverted"!

@amb26 amb26 commented on an outdated diff Mar 7, 2013
...ules/settingsHandlers/test/XMLSettingsHandlerTests.js
};
- XMLHandlerTester.asyncTest("Basic Array transformations", function () {
+ XMLHandlerTester.test("Basic Array transformations", function () {
@amb26
amb26 Mar 7, 2013 Member

Replace this duplication with a loop over declarative material

@amb26
Member
amb26 commented Mar 7, 2013

Hi Yura - this pull request represents a lot of good work! Thanks also for the readable and helpful readme file. The system almost seems to work - all test cases look good - unfortunately the system itself fails. Attempting logon with this URL: http://localhost:8081/user/sammy/login
produces a particularly incomprehensible returned JSON structure:

{
"isError": true,
"message": "demultiplexValue requires a list or hash of options at path named "options", supplied function deliverer(value) {\n target[name] = value;\n }[object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object][object Object]"
}

The system then crashes due to a TypeError - this should be impossible given our efforts to improve robustness of the system - but unfortunately this is a hard failure rather than a fluid.fail. We need to adopt a production-oriented approach to these kinds of failures too. The stack trace is as follows:

00:58:17.292: Firing event onMatch of component with typename gpii.requests.request.handler and id 5usx3f4b-155 to list of 1 liste
ners
00:58:17.295: Firing event onError of component with typename gpii.requests.request and id 5usx3f4b-148 to list of 1 listeners

E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\ModelTransformations.js:256
return expandSpec.options[testVal];
^
TypeError: Cannot read property 'undefined' of undefined
at deref (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\ModelTransformations.js:
256:42)
at fluid.model.transform.valueMapper (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\ModelTransformations.js:259:23)
at Object.fluid.expandExpander (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1532:29)
at Object.fluid.expandSource (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1607:30)
at Object.fluid.makeExpandStrategy.strategy (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1656:26)
at fluid.fetchExpandChildren (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1561:25)
at Object.fluid.each (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:337
:17)
at Object.fluid.fetchExpandChildren (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1556:15)
at fluid.makeExpandStrategy.recurse (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1634:26)
at Object.fluid.expandSource (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1623:13)
at Object.fluid.makeExpandStrategy.strategy (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1656:26)
at fluid.fetchExpandChildren (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1561:25)
at Object.fluid.each (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:333
:17)
at Object.fluid.fetchExpandChildren (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1556:15)
at Object.fluid.makeExpandOptions.options.initter (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1682:40)
at Object.fluid.expand (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1700:17)
at Object.gpii.lifecycleManager.resolver.finalInit.that.resolve (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\lifecycleManager\src\LifecycleManager.js:69:26)
at Object.gpii.lifecycleManager.preInit.that.start.sessionState.localResolver (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\lifecycleManager\src\LifecycleManager.js:221:46)
at Function.gpii.lifecycleManager.executeActions (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\lifecycleManager\src\LifecycleManager.js:181:49)
at Object.1 (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\lifecycleManager\src\LifecycleManager.js:229:63)
at transformInternal (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:293
:34)
at Object.fluid.transform (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:314:17)
at Object.gpii.lifecycleManager.preInit.that.start (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\lifecycleManager\src\LifecycleManager.js:226:44)
at gpii.requests.request.handler.userLoginPreInit.that.onMatchHandler (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\flowManager\src\UserLogin.js:46:35)
at fireToListeners (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:879:6
8)
at Object.fluid.makeEventFirer.that.fire (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:954:24)
at gpii.requests.request.handler.userLoginPreInit.that.onReadyToMatchHandler (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\flowManager\src\UserLogin.js:42:37)
at gpii.wrapCallback (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\gpiiFramework\request.js:226:33)
at fluid.withEnvironment (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1407:20)
at Object.fluid.tryCatch (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\Fluid.js:138:24)
at Object.fluid.withEnvironment (E:\Source\gits\gpii\node_modules\universal\node_modules\infusion\src\webapp\framework\core\js\FluidIoC.js:1402:22)
at gpii.wrapCallback (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\gpiiFramework\request.js:223:26)
at gpii.dataSource.URL.handle.callback (E:\Source\gits\gpii\node_modules\universal\gpii\node_modules\gpiiFramework\dataSource.js:329:13)
at IncomingMessage.gpii.dataSource.URL.handle.url.req.on.options.fireOnError.isError (E:\Source\gits\gpii\node_modules\universal
\gpii\node_modules\gpiiFramework\dataSource.js:358:17)
at IncomingMessage.EventEmitter.emit (events.js:115:20)
at IncomingMessage._emitEnd (http.js:366:10)
at HTTPParser.parserOnMessageComplete as onMessageComplete
at Socket.socketOnData as ondata
at TCP.onread (net.js:402:27)

This request works fine with current GPII master. It appears that this pull request is still over-broad and includes a lot of the XMLSettingsHandler work we looked at in San Diego - is this really complete and ready to go? It appears that the changes to the Model Transformation system are still not correct. If this needs further work do thing about issuing a yet smaller pull request which just includes your node_modules work which all looks good.

Cheers,
A

@amb26 amb26 merged commit 4db091b into GPII:master Mar 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment