Skip to content

Commit 6639fb5

Browse files
Erwan CarriouErwan Carriou
authored andcommitted
- fix bug on pop/push method of MonocoArray class
- update grunt tasks - add unit tests
1 parent a012085 commit 6639fb5

File tree

12 files changed

+347
-256
lines changed

12 files changed

+347
-256
lines changed

Gruntfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,11 @@ module.exports = function (grunt) {
371371
'jsbeautifier',
372372
'jshint',
373373
'test',
374+
'browserify:monocoDebug',
374375
'browserify:monoco',
375376
'uglify',
376377
'concat:licence',
377-
'karma:monoco'
378+
'karma:monoco',
379+
'yuidoc'
378380
]);
379381
};

build/monoco-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.js

Lines changed: 77 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.json

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -767,174 +767,174 @@
767767
"core": true,
768768
"useCoreAPI": true
769769
},
770-
"133d51ca9616b49": {
771-
"_id": "133d51ca9616b49",
770+
"1a3b81478110c87": {
771+
"_id": "1a3b81478110c87",
772772
"component": "Monoco",
773773
"state": "error",
774774
"action": "function error(data) { console.error('monoco: ' + data.message, data.error); }",
775775
"core": true
776776
},
777-
"11e251ccef1f7f6": {
778-
"_id": "11e251ccef1f7f6",
777+
"144171313516b11": {
778+
"_id": "144171313516b11",
779779
"component": "Monoco",
780780
"state": "system",
781781
"action": "function system(name) { var System = null, system = {}, systemId = '', result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = this.require('MonocoSystem'); system = new System(conf); } else { result = $db.MonocoSystem.find({ 'master': true }); if (result.length) { systemId = result[0]._id; system = $component.get(systemId); } } return system;}",
782782
"core": true,
783783
"useCoreAPI": true
784784
},
785-
"1675911cdc1102d": {
786-
"_id": "1675911cdc1102d",
785+
"156291226319489": {
786+
"_id": "156291226319489",
787787
"component": "Monoco",
788788
"state": "warning",
789789
"action": "function warning(message) { console.warn('monoco: ' + message); }",
790790
"core": true
791791
},
792-
"1a419120fb149dc": {
793-
"_id": "1a419120fb149dc",
792+
"1507f1e2891eb5a": {
793+
"_id": "1507f1e2891eb5a",
794794
"component": "MonocoChannel",
795795
"state": "listen",
796796
"action": "function listen(event, action) { $channel.listen(event, action); }",
797797
"core": true,
798798
"useCoreAPI": true
799799
},
800-
"1098e1156616850": {
801-
"_id": "1098e1156616850",
800+
"162431120217c28": {
801+
"_id": "162431120217c28",
802802
"component": "MonocoChannel",
803803
"state": "send",
804804
"action": "function send(message) { return $channel.send(message); }",
805805
"core": true,
806806
"useCoreAPI": true
807807
},
808-
"1bc47124fc11bfb": {
809-
"_id": "1bc47124fc11bfb",
808+
"1282d1d6ab1cefe": {
809+
"_id": "1282d1d6ab1cefe",
810810
"component": "MonocoClassInfo",
811811
"state": "collection",
812812
"action": "function collection(name) { var result = {}; if (this.metamodel()[name] === 'collection') { result = this.model()[name]; } return result; }",
813813
"core": true
814814
},
815-
"1416b17e5815995": {
816-
"_id": "1416b17e5815995",
815+
"11c18186cf18544": {
816+
"_id": "11c18186cf18544",
817817
"component": "MonocoClassInfo",
818818
"state": "collections",
819819
"action": "function collections() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'collection') { result.push(item); } } return result; }",
820820
"core": true
821821
},
822-
"167af1eb4918291": {
823-
"_id": "167af1eb4918291",
822+
"1805a1bd42127cb": {
823+
"_id": "1805a1bd42127cb",
824824
"component": "MonocoClassInfo",
825825
"state": "event",
826826
"action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }",
827827
"core": true
828828
},
829-
"1f18b1371211f2b": {
830-
"_id": "1f18b1371211f2b",
829+
"195b0192c813f84": {
830+
"_id": "195b0192c813f84",
831831
"component": "MonocoClassInfo",
832832
"state": "events",
833833
"action": "function events() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'event') { result.push(item); } } return result; }",
834834
"core": true
835835
},
836-
"1cba613c961c79e": {
837-
"_id": "1cba613c961c79e",
836+
"1d5f11f906140ec": {
837+
"_id": "1d5f11f906140ec",
838838
"component": "MonocoClassInfo",
839839
"state": "method",
840840
"action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }",
841841
"core": true
842842
},
843-
"185c21b42a10f35": {
844-
"_id": "185c21b42a10f35",
843+
"152db134151a60f": {
844+
"_id": "152db134151a60f",
845845
"component": "MonocoClassInfo",
846846
"state": "methods",
847847
"action": "function methods() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'method') { result.push(item); } } return result; }",
848848
"core": true
849849
},
850-
"1a851141ee12c1c": {
851-
"_id": "1a851141ee12c1c",
850+
"123341f1011a231": {
851+
"_id": "123341f1011a231",
852852
"component": "MonocoClassInfo",
853853
"state": "properties",
854854
"action": "function properties() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'property') { result.push(item); } } return result; }",
855855
"core": true
856856
},
857-
"18cfe1ea8a14b99": {
858-
"_id": "18cfe1ea8a14b99",
857+
"14ec311a1c1be92": {
858+
"_id": "14ec311a1c1be92",
859859
"component": "MonocoClassInfo",
860860
"state": "property",
861861
"action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }",
862862
"core": true
863863
},
864-
"1555e17fb21d83f": {
865-
"_id": "1555e17fb21d83f",
864+
"1ba991581b11342": {
865+
"_id": "1ba991581b11342",
866866
"component": "MonocoComponent",
867867
"state": "destroy",
868868
"action": "function destroy() { $component.destroy(this.id()); }",
869869
"core": true,
870870
"useCoreAPI": true
871871
},
872-
"18c7910524115cf": {
873-
"_id": "18c7910524115cf",
872+
"1b293174111e33b": {
873+
"_id": "1b293174111e33b",
874874
"component": "MonocoComponent",
875875
"state": "off",
876876
"action": "function off(state, behaviorId) { var args = [], i = 0, length = 0; length = arguments.length; for (i = 0; i < length - 7; i++) { args.push(arguments[i]); } if ($workflow.checkParams({\"component\": this, \"methodName\": \"off\", \"args\": args})) { if ($metamodel.isValidState(state, this.constructor.name)) {$behavior.remove({\"behaviorId\": behaviorId, \"componentId\": this.id(), \"state\": state}); } else { $helper.getMonoco().warning({ \"message\":\"invoke 'off' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\"}); } } }",
877877
"core": true,
878878
"useCoreAPI": true
879879
},
880-
"1adde179321fa6c": {
881-
"_id": "1adde179321fa6c",
880+
"196b711bb210678": {
881+
"_id": "196b711bb210678",
882882
"component": "MonocoComponent",
883883
"state": "require",
884884
"action": "function require(id) { return $component.get(id); }",
885885
"core": true,
886886
"useCoreAPI": true
887887
},
888-
"1f8b61fcc818520": {
889-
"_id": "1f8b61fcc818520",
888+
"1c33118e5e13a0a": {
889+
"_id": "1c33118e5e13a0a",
890890
"component": "MonocoDatabase",
891891
"state": "collections",
892892
"action": "function collections() { var result = {}, collectionName = ''; for (collectionName in $db.store) { if ($db.store.hasOwnProperty(collectionName) && collectionName.indexOf('Monoco') !== 0) { result[collectionName] = $db[collectionName]; } } return result;}",
893893
"core": true,
894894
"useCoreAPI": true
895895
},
896-
"1979b193d915e7e": {
897-
"_id": "1979b193d915e7e",
896+
"1eb7c1ae2a1e592": {
897+
"_id": "1eb7c1ae2a1e592",
898898
"component": "MonocoDatabase",
899899
"state": "subsystem",
900900
"action": "function subsystem(params) { return $db.subsystem(params); }",
901901
"core": true,
902902
"useCoreAPI": true
903903
},
904-
"1e8f71e0ef1c483": {
905-
"_id": "1e8f71e0ef1c483",
904+
"1aae11664318408": {
905+
"_id": "1aae11664318408",
906906
"component": "MonocoDatabase",
907907
"state": "system",
908908
"action": "function system(system) { return $db.system(system); }",
909909
"core": true,
910910
"useCoreAPI": true
911911
},
912-
"1095a1b7e513360": {
913-
"_id": "1095a1b7e513360",
912+
"15b8b1617b12621": {
913+
"_id": "15b8b1617b12621",
914914
"component": "MonocoMetamodel",
915915
"state": "create",
916916
"action": "function create() { $metamodel.create(); }",
917917
"core": true,
918918
"useCoreAPI": true
919919
},
920-
"14aa6161391ba69": {
921-
"_id": "14aa6161391ba69",
920+
"1b4af109f018651": {
921+
"_id": "1b4af109f018651",
922922
"component": "MonocoMetamodel",
923923
"state": "schema",
924924
"action": "function schema(schema) { $metamodel.schema(schema); }",
925925
"core": true,
926926
"useCoreAPI": true
927927
},
928-
"1dbe41c15d14c8c": {
929-
"_id": "1dbe41c15d14c8c",
928+
"15e761aa291f2df": {
929+
"_id": "15e761aa291f2df",
930930
"component": "MonocoMetamodel",
931931
"state": "type",
932932
"action": "function type(type) { $metamodel.type(type); }",
933933
"core": true,
934934
"useCoreAPI": true
935935
},
936-
"10af61768e150dc": {
937-
"_id": "10af61768e150dc",
936+
"10ef017ca81d7d2": {
937+
"_id": "10ef017ca81d7d2",
938938
"component": "MonocoSystem",
939939
"state": "sync",
940940
"action": "function sync() { var system = JSON.parse($db.system()); this.schemas(system.schemas); this.types(system.types); this.behaviors(system.behaviors); this.components(system.components); }",

0 commit comments

Comments
 (0)