process_engine 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +37 -0
- data/app/assets/bower_components/process_engine/Snap.svg/CONTRIBUTING +3 -0
- data/app/assets/bower_components/process_engine/Snap.svg/Gruntfile.js +59 -0
- data/app/assets/bower_components/process_engine/Snap.svg/LICENSE +202 -0
- data/app/assets/bower_components/process_engine/Snap.svg/NOTICE +190 -0
- data/app/assets/bower_components/process_engine/Snap.svg/README.md +62 -0
- data/app/assets/bower_components/process_engine/Snap.svg/bower.json +25 -0
- data/app/assets/bower_components/process_engine/Snap.svg/component.json +13 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg-min.js +20 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg.js +7653 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/dr.css +144 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/main.css +508 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/prism.css +168 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/css/topcoat-desktop-light.css +3700 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.svg +242 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.eot +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.svg +243 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.ttf +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.woff +0 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/stylesheet.css +57 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search.svg +11 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search_dark.svg +16 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/js/prism.js +9 -0
- data/app/assets/bower_components/process_engine/Snap.svg/doc/reference.html +13633 -0
- data/app/assets/bower_components/process_engine/Snap.svg/dr.json +33 -0
- data/app/assets/bower_components/process_engine/Snap.svg/history.md +31 -0
- data/app/assets/bower_components/process_engine/Snap.svg/package.json +22 -0
- data/app/assets/bower_components/process_engine/Snap.svg/template.dot +157 -0
- data/app/assets/bower_components/process_engine/Snap.svg/test.html +75 -0
- data/app/assets/bower_components/process_engine/bpmn-js/LICENSE +22 -0
- data/app/assets/bower_components/process_engine/bpmn-js/README.md +46 -0
- data/app/assets/bower_components/process_engine/bpmn-js/bower.json +28 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css +40 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg +21 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.woff +0 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/diagram-js.css +355 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js +21552 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.min.js +8 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js +13542 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.min.js +5 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js +13294 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js.map +1 -0
- data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.min.js +5 -0
- data/app/assets/bower_components/process_engine/hammerjs/CHANGELOG.md +30 -0
- data/app/assets/bower_components/process_engine/hammerjs/CONTRIBUTING.md +41 -0
- data/app/assets/bower_components/process_engine/hammerjs/Gruntfile.coffee +123 -0
- data/app/assets/bower_components/process_engine/hammerjs/LICENSE.md +21 -0
- data/app/assets/bower_components/process_engine/hammerjs/README.md +6 -0
- data/app/assets/bower_components/process_engine/hammerjs/bower.json +9 -0
- data/app/assets/bower_components/process_engine/hammerjs/component.json +8 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.js +2463 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.min.js +7 -0
- data/app/assets/bower_components/process_engine/hammerjs/hammer.min.map +1 -0
- data/app/assets/bower_components/process_engine/hammerjs/package.json +50 -0
- data/app/assets/bower_components/process_engine/jquery/MIT-LICENSE.txt +21 -0
- data/app/assets/bower_components/process_engine/jquery/bower.json +27 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.js +9205 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.map +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/jsonp.js +89 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/load.js +75 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/parseJSON.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/parseXML.js +28 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/script.js +64 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/var/nonce.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/var/rquery.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax/xhr.js +136 -0
- data/app/assets/bower_components/process_engine/jquery/src/ajax.js +786 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/attr.js +141 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/classes.js +158 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/prop.js +94 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/support.js +35 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes/val.js +161 -0
- data/app/assets/bower_components/process_engine/jquery/src/attributes.js +11 -0
- data/app/assets/bower_components/process_engine/jquery/src/callbacks.js +205 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/access.js +60 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/init.js +123 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/parseHTML.js +39 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/ready.js +97 -0
- data/app/assets/bower_components/process_engine/jquery/src/core/var/rsingleTag.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/core.js +497 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/addGetHookIf.js +22 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/curCSS.js +57 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/defaultDisplay.js +70 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/support.js +96 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/swap.js +28 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/cssExpand.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/getStyles.js +12 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/isHidden.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/rmargin.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/css/var/rnumnonpx.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/css.js +450 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/Data.js +181 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/accepts.js +20 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/var/data_priv.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/data/var/data_user.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/data.js +178 -0
- data/app/assets/bower_components/process_engine/jquery/src/deferred.js +149 -0
- data/app/assets/bower_components/process_engine/jquery/src/deprecated.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/dimensions.js +50 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects/Tween.js +114 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects/animatedSelector.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/effects.js +648 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/ajax.js +13 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/alias.js +39 -0
- data/app/assets/bower_components/process_engine/jquery/src/event/support.js +9 -0
- data/app/assets/bower_components/process_engine/jquery/src/event.js +868 -0
- data/app/assets/bower_components/process_engine/jquery/src/exports/amd.js +24 -0
- data/app/assets/bower_components/process_engine/jquery/src/exports/global.js +32 -0
- data/app/assets/bower_components/process_engine/jquery/src/intro.js +44 -0
- data/app/assets/bower_components/process_engine/jquery/src/jquery.js +37 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/_evalUrl.js +18 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/support.js +32 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation/var/rcheckableType.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/manipulation.js +580 -0
- data/app/assets/bower_components/process_engine/jquery/src/offset.js +207 -0
- data/app/assets/bower_components/process_engine/jquery/src/outro.js +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/queue/delay.js +22 -0
- data/app/assets/bower_components/process_engine/jquery/src/queue.js +142 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector-native.js +172 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector-sizzle.js +14 -0
- data/app/assets/bower_components/process_engine/jquery/src/selector.js +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/serialize.js +111 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.js +2067 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.map +1 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing/findFilter.js +100 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing/var/rneedsContext.js +6 -0
- data/app/assets/bower_components/process_engine/jquery/src/traversing.js +199 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/arr.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/class2type.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/concat.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/hasOwn.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/indexOf.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/pnum.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/push.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/rnotwhite.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/slice.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/strundefined.js +3 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/support.js +4 -0
- data/app/assets/bower_components/process_engine/jquery/src/var/toString.js +5 -0
- data/app/assets/bower_components/process_engine/jquery/src/wrap.js +79 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/ChangeLog.md +141 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/LICENSE.txt +20 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/README.md +85 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/bower.json +17 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.js +221 -0
- data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.min.js +8 -0
- data/app/assets/bower_components/process_engine/lodash/LICENSE.txt +22 -0
- data/app/assets/bower_components/process_engine/lodash/bower.json +23 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.js +7157 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.min.js +61 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.js +6785 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.min.js +56 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.js +4979 -0
- data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.min.js +39 -0
- data/app/assets/bower_components/process_engine/sax/AUTHORS +10 -0
- data/app/assets/bower_components/process_engine/sax/LICENSE +32 -0
- data/app/assets/bower_components/process_engine/sax/LICENSE-W3C.html +188 -0
- data/app/assets/bower_components/process_engine/sax/README.md +216 -0
- data/app/assets/bower_components/process_engine/sax/component.json +12 -0
- data/app/assets/bower_components/process_engine/sax/examples/big-not-pretty.xml +8002 -0
- data/app/assets/bower_components/process_engine/sax/examples/example.js +29 -0
- data/app/assets/bower_components/process_engine/sax/examples/get-products.js +58 -0
- data/app/assets/bower_components/process_engine/sax/examples/hello-world.js +4 -0
- data/app/assets/bower_components/process_engine/sax/examples/not-pretty.xml +8 -0
- data/app/assets/bower_components/process_engine/sax/examples/pretty-print.js +74 -0
- data/app/assets/bower_components/process_engine/sax/examples/shopping.xml +2 -0
- data/app/assets/bower_components/process_engine/sax/examples/strict.dtd +870 -0
- data/app/assets/bower_components/process_engine/sax/examples/test.html +15 -0
- data/app/assets/bower_components/process_engine/sax/examples/test.xml +1254 -0
- data/app/assets/bower_components/process_engine/sax/lib/sax.js +1410 -0
- data/app/assets/bower_components/process_engine/sax/package.json +12 -0
- data/app/assets/bower_components/process_engine/sax/test/attribute-name.js +33 -0
- data/app/assets/bower_components/process_engine/sax/test/attribute-no-space.js +75 -0
- data/app/assets/bower_components/process_engine/sax/test/buffer-overrun.js +26 -0
- data/app/assets/bower_components/process_engine/sax/test/case.js +50 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-chunked.js +11 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-end-split.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-fake-end.js +28 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata-multiple.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/cdata.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/cyrillic.js +8 -0
- data/app/assets/bower_components/process_engine/sax/test/duplicate-attribute.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/emoji.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/end_empty_stream.js +5 -0
- data/app/assets/bower_components/process_engine/sax/test/entities.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/entity-mega.js +16 -0
- data/app/assets/bower_components/process_engine/sax/test/flush.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/index.js +86 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-23.js +43 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-30.js +24 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-35.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-47.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-49.js +31 -0
- data/app/assets/bower_components/process_engine/sax/test/issue-84.js +13 -0
- data/app/assets/bower_components/process_engine/sax/test/parser-position.js +28 -0
- data/app/assets/bower_components/process_engine/sax/test/script-close-better.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/script.js +12 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-child-strict.js +44 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-child.js +44 -0
- data/app/assets/bower_components/process_engine/sax/test/self-closing-tag.js +25 -0
- data/app/assets/bower_components/process_engine/sax/test/stray-ending.js +17 -0
- data/app/assets/bower_components/process_engine/sax/test/trailing-attribute-no-value.js +10 -0
- data/app/assets/bower_components/process_engine/sax/test/trailing-non-whitespace.js +18 -0
- data/app/assets/bower_components/process_engine/sax/test/unclosed-root.js +11 -0
- data/app/assets/bower_components/process_engine/sax/test/unquoted.js +18 -0
- data/app/assets/bower_components/process_engine/sax/test/utf8-split.js +32 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-as-tag-name.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-issue-41.js +68 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-rebinding.js +63 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-strict.js +74 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound-element.js +33 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound.js +15 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-ns.js +31 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix.js +21 -0
- data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-redefine.js +41 -0
- data/app/assets/javascripts/process_engine/application.js +65 -0
- data/app/assets/stylesheets/process_engine/application.css +39 -0
- data/app/controllers/process_engine/application_controller.rb +28 -0
- data/app/controllers/process_engine/process_definitions_controller.rb +63 -0
- data/app/controllers/process_engine/process_instances_controller.rb +42 -0
- data/app/controllers/process_engine/process_tasks_controller.rb +23 -0
- data/app/helpers/process_engine/application_helper.rb +4 -0
- data/app/models/process_engine/consumer/consumer_task.rb +15 -0
- data/app/models/process_engine/error/false_task_state.rb +2 -0
- data/app/models/process_engine/listener/base.rb +49 -0
- data/app/models/process_engine/node_data_injection.rb +22 -0
- data/app/models/process_engine/parser/complex_gateway.rb +21 -0
- data/app/models/process_engine/parser/end_event.rb +23 -0
- data/app/models/process_engine/parser/exclusive_gateway.rb +25 -0
- data/app/models/process_engine/parser/extension/condition_expression.rb +39 -0
- data/app/models/process_engine/parser/extension/execution_listener.rb +15 -0
- data/app/models/process_engine/parser/extension/form_field.rb +50 -0
- data/app/models/process_engine/parser/extension/input_output.rb +28 -0
- data/app/models/process_engine/parser/extension/listener.rb +43 -0
- data/app/models/process_engine/parser/extension/property.rb +20 -0
- data/app/models/process_engine/parser/extension/task_listener.rb +15 -0
- data/app/models/process_engine/parser/extension/transitional_parameter.rb +53 -0
- data/app/models/process_engine/parser/inclusive_gateway.rb +25 -0
- data/app/models/process_engine/parser/parallel_gateway.rb +19 -0
- data/app/models/process_engine/parser/script_task.rb +37 -0
- data/app/models/process_engine/parser/sequence_flow.rb +36 -0
- data/app/models/process_engine/parser/start_event.rb +27 -0
- data/app/models/process_engine/parser/user_task.rb +36 -0
- data/app/models/process_engine/parser/xml_node.rb +125 -0
- data/app/models/process_engine/process_definition.rb +50 -0
- data/app/models/process_engine/process_instance.rb +72 -0
- data/app/models/process_engine/process_query.rb +52 -0
- data/app/models/process_engine/process_schema.rb +30 -0
- data/app/models/process_engine/process_task.rb +70 -0
- data/app/models/process_engine/schema/interceptor/exclusive_gateway.rb +39 -0
- data/app/models/process_engine/schema/node.rb +48 -0
- data/app/models/process_engine/schema/node_extension.rb +79 -0
- data/app/models/process_engine/schema/transition.rb +22 -0
- data/app/views/layouts/process_engine/application.html.erb +14 -0
- data/app/views/process_engine/layouts/_menu.html.haml +6 -0
- data/app/views/process_engine/layouts/application.html.haml +11 -0
- data/app/views/process_engine/process_definitions/_form.html.haml +6 -0
- data/app/views/process_engine/process_definitions/edit.html.haml +3 -0
- data/app/views/process_engine/process_definitions/index.html.haml +26 -0
- data/app/views/process_engine/process_definitions/new.html.haml +3 -0
- data/app/views/process_engine/process_definitions/show.html.haml +51 -0
- data/app/views/process_engine/process_instances/_form.html.haml +5 -0
- data/app/views/process_engine/process_instances/edit.html.haml +3 -0
- data/app/views/process_engine/process_instances/index.html.haml +29 -0
- data/app/views/process_engine/process_instances/show.html.haml +38 -0
- data/app/views/process_engine/process_tasks/index.html.haml +44 -0
- data/app/views/process_engine/share/_bpmn_canvas.html.haml +7 -0
- data/config/initializers/bower_rails.rb +16 -0
- data/config/initializers/simple_form.rb +166 -0
- data/config/initializers/simple_form_bootstrap.rb +135 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/routes.rb +18 -0
- data/db/migrate/20150313063311_create_process_engine_process_definitions.rb +14 -0
- data/db/migrate/20150313063508_create_process_engine_process_instances.rb +15 -0
- data/db/migrate/20150313063633_create_process_engine_process_tasks.rb +30 -0
- data/lib/process_engine/engine.rb +12 -0
- data/lib/process_engine/version.rb +3 -0
- data/lib/process_engine.rb +8 -0
- data/lib/tasks/process_engine_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +85 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/schema.rb +66 -0
- data/test/dummy/log/development.log +9722 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/8afee1847b645742b0d2535a7c32f4f22e7926ec/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sass/b5911aa594334efca1023d6f01abce0758e9648a/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/014d8413350c7d85a5429f5e2c9ac911 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0cbd667d0fbf9e0e6f60b5ebf2f95fa3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0f7ba040a442530a6d4a5bc8307769c1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0fca2cc9aa38138660d8c7d492cf81e4 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0ff24903c54f534941fbc96ff862e475 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/11100f87277a2892323fe5581af75a7b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/18a34084783e8b7f9bc871bc64b13eed +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1a3821ce28e0196075ed0830fcb45f38 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1cf94b9a49ee68cb0f4065d48e9cbaf3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/21a6373d6c40614fd05be57194c68248 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/26276ae8df51c046f3adc0b50a1521ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2eea4a8f4854d438cd03cb23a89b6d8c +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3993bcd8bae4771e550d8fc91d1debbc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3ccc4edae36a9c4bd70fc330c9c83dc9 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3e391b0f37505fffc40ba9ffa13330a2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/42e258b77f5dd532dfb9344a2d766de6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/43a5910cb7a330ece5856c0e9099efa2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4e65ec1149f01e749e1e372861210d4d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/501160bcee63ae68449a5a5eb78b6d41 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/517beb0bf366ec3c8649da9ac8a8a01e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/525a556b1eaacfa041722e1250d9859a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/56edbae38e4e0ff9f4b4fc576ae3d746 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5b04f4a7058d92f88f89f2248bcc16b0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5c3c69f7c2520b57620931c150032d7e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5d1f8f2111e14084ebf711412c9230d2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5f9833d6835900c56d0e76a1b2924cc2 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/67c653cc36eb639f7a7af5159e9f9de3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/704b33432a5ba417bcd5962ad999c671 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7301f83e8e67f30be13546a794a553ef +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7482c8f712712a79937caf41413bca15 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/761cb171e67ddca71e8b9c74f0220457 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e23bd4385e166267961b6d936363042 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/7e5100f290c9ba0d4c026e43b58d0d79 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/80743880e8d46958e9839ff9408c3113 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8b8941aae968854bafb4638a86cad77b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9c292f3b6b577a92970303c351e1d4a1 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a3435b13cfa60fb7469a19703350bda7 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a6ce1b2837383f1e8b62b7f1ddcc6820 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/a7e90acc68ba69b7cd5c0a7005467c4b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/be4d00fb7bf467b370f0fda7e453ec68 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c4fbf44e63e40cbbf825fe750374728f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c593bacb8d3f003125f91763a7b36b10 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c5ae3bc69f7b1e1fdb51a667c9f3cdd6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cc843b336460771bf75c97cf0935301b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ce3b6127737ed36f7b62a54acec06b3e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d58931b13c55c146d21475e532b126ba +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc6bbdc1e385c7bb2743011e9c2a7407 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dd7270e11b484ae10f601e1dd014445a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de86beefc60e0cd84dd1525af863e64d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e0953e6e4a6c208e350f7f25d85bdce8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ec3b479833be43bf164a3deb119c3aee +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef2cb0afc9a61a3d5819b4dfc84720ad +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f0511bbd6f6cd5530acddebb6d7e7044 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7009bba030498129042e0c542d4f264 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/fixtures/process_engine/process_definitions.yml +17 -0
- data/test/fixtures/process_engine/process_instances.yml +11 -0
- data/test/fixtures/process_engine/process_tasks.yml +11 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/models/process_engine/process_definition_test.rb +9 -0
- data/test/models/process_engine/process_instance_test.rb +9 -0
- data/test/models/process_engine/process_task_test.rb +9 -0
- data/test/process_engine_test.rb +7 -0
- data/test/test_helper.rb +19 -0
- metadata +740 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sax",
|
|
3
|
+
"description": "An evented streaming XML parser in JavaScript",
|
|
4
|
+
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
|
|
5
|
+
"version": "0.6.0",
|
|
6
|
+
"main": "lib/sax.js",
|
|
7
|
+
"license": "BSD",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"test": "node test/index.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": "git://github.com/isaacs/sax-js.git"
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require(__dirname).test(
|
|
2
|
+
{ xml: "<root length='12345'></root>"
|
|
3
|
+
, expect: [
|
|
4
|
+
["attribute", {
|
|
5
|
+
name: "length"
|
|
6
|
+
, value: "12345"
|
|
7
|
+
, prefix: ""
|
|
8
|
+
, local: "length"
|
|
9
|
+
, uri: ""
|
|
10
|
+
}]
|
|
11
|
+
, ["opentag", {
|
|
12
|
+
name: "root"
|
|
13
|
+
, prefix: ""
|
|
14
|
+
, local: "root"
|
|
15
|
+
, uri: ""
|
|
16
|
+
, attributes: {
|
|
17
|
+
length: {
|
|
18
|
+
name: "length"
|
|
19
|
+
, value: "12345"
|
|
20
|
+
, prefix: ""
|
|
21
|
+
, local: "length"
|
|
22
|
+
, uri: ""
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
, ns: {}
|
|
26
|
+
, isSelfClosing: false
|
|
27
|
+
}]
|
|
28
|
+
, ["closetag", "root"]
|
|
29
|
+
]
|
|
30
|
+
, strict: true
|
|
31
|
+
, opt: { xmlns: true }
|
|
32
|
+
}
|
|
33
|
+
)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// non-strict: no error
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : '<root attr1="first"attr2="second"/>'
|
|
4
|
+
|
|
5
|
+
, expect :
|
|
6
|
+
[ [ "attribute", { name: 'attr1', value: 'first' } ]
|
|
7
|
+
, [ "attribute", { name: 'attr2', value: 'second' } ]
|
|
8
|
+
, [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ]
|
|
9
|
+
, [ "closetag", "root" ]
|
|
10
|
+
]
|
|
11
|
+
, strict : false
|
|
12
|
+
, opt : { lowercase: true }
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
// strict: should give an error, but still parse
|
|
17
|
+
require(__dirname).test
|
|
18
|
+
( { xml : '<root attr1="first"attr2="second"/>'
|
|
19
|
+
|
|
20
|
+
, expect :
|
|
21
|
+
[ [ "attribute", { name: 'attr1', value: 'first' } ]
|
|
22
|
+
, [ "error", "No whitespace between attributes\nLine: 0\nColumn: 20\nChar: a" ]
|
|
23
|
+
, [ "attribute", { name: 'attr2', value: 'second' } ]
|
|
24
|
+
, [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ]
|
|
25
|
+
, [ "closetag", "root" ]
|
|
26
|
+
]
|
|
27
|
+
, strict : true
|
|
28
|
+
, opt : { }
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
// strict: other cases should still pass
|
|
33
|
+
require(__dirname).test
|
|
34
|
+
( { xml : '<root attr1="first" attr2="second"/>'
|
|
35
|
+
|
|
36
|
+
, expect :
|
|
37
|
+
[ [ "attribute", { name: 'attr1', value: 'first' } ]
|
|
38
|
+
, [ "attribute", { name: 'attr2', value: 'second' } ]
|
|
39
|
+
, [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ]
|
|
40
|
+
, [ "closetag", "root" ]
|
|
41
|
+
]
|
|
42
|
+
, strict : true
|
|
43
|
+
, opt : { }
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
// strict: other cases should still pass
|
|
48
|
+
require(__dirname).test
|
|
49
|
+
( { xml : '<root attr1="first"\nattr2="second"/>'
|
|
50
|
+
|
|
51
|
+
, expect :
|
|
52
|
+
[ [ "attribute", { name: 'attr1', value: 'first' } ]
|
|
53
|
+
, [ "attribute", { name: 'attr2', value: 'second' } ]
|
|
54
|
+
, [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ]
|
|
55
|
+
, [ "closetag", "root" ]
|
|
56
|
+
]
|
|
57
|
+
, strict : true
|
|
58
|
+
, opt : { }
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
// strict: other cases should still pass
|
|
63
|
+
require(__dirname).test
|
|
64
|
+
( { xml : '<root attr1="first" attr2="second"/>'
|
|
65
|
+
|
|
66
|
+
, expect :
|
|
67
|
+
[ [ "attribute", { name: 'attr1', value: 'first' } ]
|
|
68
|
+
, [ "attribute", { name: 'attr2', value: 'second' } ]
|
|
69
|
+
, [ "opentag", { name: "root", attributes: {attr1: 'first', attr2: 'second'}, isSelfClosing: true } ]
|
|
70
|
+
, [ "closetag", "root" ]
|
|
71
|
+
]
|
|
72
|
+
, strict : true
|
|
73
|
+
, opt : { }
|
|
74
|
+
}
|
|
75
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// set this really low so that I don't have to put 64 MB of xml in here.
|
|
2
|
+
var sax = require("../lib/sax")
|
|
3
|
+
var bl = sax.MAX_BUFFER_LENGTH
|
|
4
|
+
sax.MAX_BUFFER_LENGTH = 5;
|
|
5
|
+
|
|
6
|
+
require(__dirname).test({
|
|
7
|
+
expect : [
|
|
8
|
+
["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "],
|
|
9
|
+
["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "],
|
|
10
|
+
["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "],
|
|
11
|
+
["opentag", {
|
|
12
|
+
"name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
13
|
+
"attributes": {},
|
|
14
|
+
"isSelfClosing": false
|
|
15
|
+
}],
|
|
16
|
+
["text", "yo"],
|
|
17
|
+
["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"]
|
|
18
|
+
]
|
|
19
|
+
}).write("<abcdefghijklmn")
|
|
20
|
+
.write("opqrstuvwxyzABC")
|
|
21
|
+
.write("DEFGHIJKLMNOPQR")
|
|
22
|
+
.write("STUVWXYZ>")
|
|
23
|
+
.write("yo")
|
|
24
|
+
.write("</abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ>")
|
|
25
|
+
.close();
|
|
26
|
+
sax.MAX_BUFFER_LENGTH = bl
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// default to uppercase
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml :
|
|
4
|
+
"<span class=\"test\" hello=\"world\"></span>"
|
|
5
|
+
, expect :
|
|
6
|
+
[ [ "attribute", { name: "CLASS", value: "test" } ]
|
|
7
|
+
, [ "attribute", { name: "HELLO", value: "world" } ]
|
|
8
|
+
, [ "opentag", { name: "SPAN",
|
|
9
|
+
attributes: { CLASS: "test", HELLO: "world" },
|
|
10
|
+
isSelfClosing: false } ]
|
|
11
|
+
, [ "closetag", "SPAN" ]
|
|
12
|
+
]
|
|
13
|
+
, strict : false
|
|
14
|
+
, opt : {}
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
// lowercase option : lowercase tag/attribute names
|
|
19
|
+
require(__dirname).test
|
|
20
|
+
( { xml :
|
|
21
|
+
"<span class=\"test\" hello=\"world\"></span>"
|
|
22
|
+
, expect :
|
|
23
|
+
[ [ "attribute", { name: "class", value: "test" } ]
|
|
24
|
+
, [ "attribute", { name: "hello", value: "world" } ]
|
|
25
|
+
, [ "opentag", { name: "span",
|
|
26
|
+
attributes: { class: "test", hello: "world" },
|
|
27
|
+
isSelfClosing: false } ]
|
|
28
|
+
, [ "closetag", "span" ]
|
|
29
|
+
]
|
|
30
|
+
, strict : false
|
|
31
|
+
, opt : {lowercase:true}
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
// backward compatibility with old lowercasetags opt
|
|
36
|
+
require(__dirname).test
|
|
37
|
+
( { xml :
|
|
38
|
+
"<span class=\"test\" hello=\"world\"></span>"
|
|
39
|
+
, expect :
|
|
40
|
+
[ [ "attribute", { name: "class", value: "test" } ]
|
|
41
|
+
, [ "attribute", { name: "hello", value: "world" } ]
|
|
42
|
+
, [ "opentag", { name: "span",
|
|
43
|
+
attributes: { class: "test", hello: "world" },
|
|
44
|
+
isSelfClosing: false } ]
|
|
45
|
+
, [ "closetag", "span" ]
|
|
46
|
+
]
|
|
47
|
+
, strict : false
|
|
48
|
+
, opt : {lowercasetags:true}
|
|
49
|
+
}
|
|
50
|
+
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
require(__dirname).test({
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
5
|
+
["opencdata", undefined],
|
|
6
|
+
["cdata", " this is character data "],
|
|
7
|
+
["closecdata", undefined],
|
|
8
|
+
["closetag", "R"]
|
|
9
|
+
]
|
|
10
|
+
}).write("<r><![CDATA[ this is ").write("character data ").write("]]></r>").close();
|
|
11
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
require(__dirname).test({
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
5
|
+
["opencdata", undefined],
|
|
6
|
+
["cdata", " this is "],
|
|
7
|
+
["closecdata", undefined],
|
|
8
|
+
["closetag", "R"]
|
|
9
|
+
]
|
|
10
|
+
})
|
|
11
|
+
.write("<r><![CDATA[ this is ]")
|
|
12
|
+
.write("]>")
|
|
13
|
+
.write("</r>")
|
|
14
|
+
.close();
|
|
15
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
var p = require(__dirname).test({
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
5
|
+
["opencdata", undefined],
|
|
6
|
+
["cdata", "[[[[[[[[]]]]]]]]"],
|
|
7
|
+
["closecdata", undefined],
|
|
8
|
+
["closetag", "R"]
|
|
9
|
+
]
|
|
10
|
+
})
|
|
11
|
+
var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
|
|
12
|
+
for (var i = 0; i < x.length ; i ++) {
|
|
13
|
+
p.write(x.charAt(i))
|
|
14
|
+
}
|
|
15
|
+
p.close();
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var p2 = require(__dirname).test({
|
|
19
|
+
expect : [
|
|
20
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
21
|
+
["opencdata", undefined],
|
|
22
|
+
["cdata", "[[[[[[[[]]]]]]]]"],
|
|
23
|
+
["closecdata", undefined],
|
|
24
|
+
["closetag", "R"]
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
|
|
28
|
+
p2.write(x).close();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
require(__dirname).test({
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
5
|
+
["opencdata", undefined],
|
|
6
|
+
["cdata", " this is "],
|
|
7
|
+
["closecdata", undefined],
|
|
8
|
+
["opencdata", undefined],
|
|
9
|
+
["cdata", "character data "],
|
|
10
|
+
["closecdata", undefined],
|
|
11
|
+
["closetag", "R"]
|
|
12
|
+
]
|
|
13
|
+
}).write("<r><![CDATA[ this is ]]>").write("<![CDA").write("T").write("A[")
|
|
14
|
+
.write("character data ").write("]]></r>").close();
|
|
15
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require(__dirname).test({
|
|
2
|
+
xml : "<r><![CDATA[ this is character data ]]></r>",
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "R","attributes": {}, "isSelfClosing": false}],
|
|
5
|
+
["opencdata", undefined],
|
|
6
|
+
["cdata", " this is character data "],
|
|
7
|
+
["closecdata", undefined],
|
|
8
|
+
["closetag", "R"]
|
|
9
|
+
]
|
|
10
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require(__dirname).test
|
|
2
|
+
( { xml :
|
|
3
|
+
"<span id=\"hello\" id=\"there\"></span>"
|
|
4
|
+
, expect :
|
|
5
|
+
[ [ "attribute", { name: "ID", value: "hello" } ]
|
|
6
|
+
, [ "opentag", { name: "SPAN",
|
|
7
|
+
attributes: { ID: "hello" }, isSelfClosing: false } ]
|
|
8
|
+
, [ "closetag", "SPAN" ]
|
|
9
|
+
]
|
|
10
|
+
, strict : false
|
|
11
|
+
, opt : {}
|
|
12
|
+
}
|
|
13
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// split high-order numeric attributes into surrogate pairs
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : '<a>🔥</a>'
|
|
4
|
+
, expect :
|
|
5
|
+
[ [ 'opentag', { name: 'A', attributes: {}, isSelfClosing: false } ]
|
|
6
|
+
, [ 'text', '\ud83d\udd25' ]
|
|
7
|
+
, [ 'closetag', 'A' ]
|
|
8
|
+
]
|
|
9
|
+
, strict : false
|
|
10
|
+
, opt : {}
|
|
11
|
+
}
|
|
12
|
+
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require(__dirname).test({
|
|
2
|
+
xml: '<r>⌋ ' +
|
|
3
|
+
'♠ © → & ' +
|
|
4
|
+
'< < < < < > ℜ ℘ €</r>',
|
|
5
|
+
expect: [
|
|
6
|
+
['opentag', {'name':'R', attributes:{}, isSelfClosing: false}],
|
|
7
|
+
['text', '⌋ ♠ © → & < < < < < > ℜ ℘ €'],
|
|
8
|
+
['closetag', 'R']
|
|
9
|
+
]
|
|
10
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var sax = require('../');
|
|
2
|
+
var xml = '<r>';
|
|
3
|
+
var text = '';
|
|
4
|
+
for (var i in sax.ENTITIES) {
|
|
5
|
+
xml += '&' + i + ';'
|
|
6
|
+
text += sax.ENTITIES[i]
|
|
7
|
+
}
|
|
8
|
+
xml += '</r>'
|
|
9
|
+
require(__dirname).test({
|
|
10
|
+
xml: xml,
|
|
11
|
+
expect: [
|
|
12
|
+
['opentag', {'name':'R', attributes:{}, isSelfClosing: false}],
|
|
13
|
+
['text', text],
|
|
14
|
+
['closetag', 'R']
|
|
15
|
+
]
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var parser = require(__dirname).test({
|
|
2
|
+
expect: [
|
|
3
|
+
['opentag', {'name':'T', attributes:{}, isSelfClosing: false}],
|
|
4
|
+
['text', 'flush'],
|
|
5
|
+
['text', 'rest'],
|
|
6
|
+
['closetag', 'T'],
|
|
7
|
+
]
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
parser.write('<T>flush');
|
|
11
|
+
parser.flush();
|
|
12
|
+
parser.write('rest</T>');
|
|
13
|
+
parser.close();
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var globalsBefore = JSON.stringify(Object.keys(global))
|
|
2
|
+
, util = require("util")
|
|
3
|
+
, assert = require("assert")
|
|
4
|
+
, fs = require("fs")
|
|
5
|
+
, path = require("path")
|
|
6
|
+
, sax = require("../lib/sax")
|
|
7
|
+
|
|
8
|
+
exports.sax = sax
|
|
9
|
+
|
|
10
|
+
// handy way to do simple unit tests
|
|
11
|
+
// if the options contains an xml string, it'll be written and the parser closed.
|
|
12
|
+
// otherwise, it's assumed that the test will write and close.
|
|
13
|
+
exports.test = function test (options) {
|
|
14
|
+
var xml = options.xml
|
|
15
|
+
, parser = sax.parser(options.strict, options.opt)
|
|
16
|
+
, expect = options.expect
|
|
17
|
+
, e = 0
|
|
18
|
+
sax.EVENTS.forEach(function (ev) {
|
|
19
|
+
parser["on" + ev] = function (n) {
|
|
20
|
+
if (process.env.DEBUG) {
|
|
21
|
+
console.error({ expect: expect[e]
|
|
22
|
+
, actual: [ev, n] })
|
|
23
|
+
}
|
|
24
|
+
if (e >= expect.length && (ev === "end" || ev === "ready")) return
|
|
25
|
+
assert.ok( e < expect.length,
|
|
26
|
+
"expectation #"+e+" "+util.inspect(expect[e])+"\n"+
|
|
27
|
+
"Unexpected event: "+ev+" "+(n ? util.inspect(n) : ""))
|
|
28
|
+
var inspected = n instanceof Error ? "\n"+ n.message : util.inspect(n)
|
|
29
|
+
assert.equal(ev, expect[e][0],
|
|
30
|
+
"expectation #"+e+"\n"+
|
|
31
|
+
"Didn't get expected event\n"+
|
|
32
|
+
"expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
|
|
33
|
+
"actual: "+ev+" "+inspected+"\n")
|
|
34
|
+
if (ev === "error") assert.equal(n.message, expect[e][1])
|
|
35
|
+
else assert.deepEqual(n, expect[e][1],
|
|
36
|
+
"expectation #"+e+"\n"+
|
|
37
|
+
"Didn't get expected argument\n"+
|
|
38
|
+
"expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
|
|
39
|
+
"actual: "+ev+" "+inspected+"\n")
|
|
40
|
+
e++
|
|
41
|
+
if (ev === "error") parser.resume()
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
if (xml) parser.write(xml).close()
|
|
45
|
+
return parser
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (module === require.main) {
|
|
49
|
+
var running = true
|
|
50
|
+
, failures = 0
|
|
51
|
+
|
|
52
|
+
function fail (file, er) {
|
|
53
|
+
util.error("Failed: "+file)
|
|
54
|
+
util.error(er.stack || er.message)
|
|
55
|
+
failures ++
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
fs.readdir(__dirname, function (error, files) {
|
|
59
|
+
files = files.filter(function (file) {
|
|
60
|
+
return (/\.js$/.exec(file) && file !== 'index.js')
|
|
61
|
+
})
|
|
62
|
+
var n = files.length
|
|
63
|
+
, i = 0
|
|
64
|
+
console.log("0.." + n)
|
|
65
|
+
files.forEach(function (file) {
|
|
66
|
+
// run this test.
|
|
67
|
+
try {
|
|
68
|
+
require(path.resolve(__dirname, file))
|
|
69
|
+
var globalsAfter = JSON.stringify(Object.keys(global))
|
|
70
|
+
if (globalsAfter !== globalsBefore) {
|
|
71
|
+
var er = new Error("new globals introduced\n"+
|
|
72
|
+
"expected: "+globalsBefore+"\n"+
|
|
73
|
+
"actual: "+globalsAfter)
|
|
74
|
+
globalsBefore = globalsAfter
|
|
75
|
+
throw er
|
|
76
|
+
}
|
|
77
|
+
console.log("ok " + (++i) + " - " + file)
|
|
78
|
+
} catch (er) {
|
|
79
|
+
console.log("not ok "+ (++i) + " - " + file)
|
|
80
|
+
fail(file, er)
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
if (!failures) return console.log("#all pass")
|
|
84
|
+
else return console.error(failures + " failure" + (failures > 1 ? "s" : ""))
|
|
85
|
+
})
|
|
86
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml :
|
|
4
|
+
"<compileClassesResponse>"+
|
|
5
|
+
"<result>"+
|
|
6
|
+
"<bodyCrc>653724009</bodyCrc>"+
|
|
7
|
+
"<column>-1</column>"+
|
|
8
|
+
"<id>01pG0000002KoSUIA0</id>"+
|
|
9
|
+
"<line>-1</line>"+
|
|
10
|
+
"<name>CalendarController</name>"+
|
|
11
|
+
"<success>true</success>"+
|
|
12
|
+
"</result>"+
|
|
13
|
+
"</compileClassesResponse>"
|
|
14
|
+
|
|
15
|
+
, expect :
|
|
16
|
+
[ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {}, isSelfClosing: false } ]
|
|
17
|
+
, [ "opentag", { name : "RESULT", attributes: {}, isSelfClosing: false } ]
|
|
18
|
+
, [ "opentag", { name: "BODYCRC", attributes: {}, isSelfClosing: false } ]
|
|
19
|
+
, [ "text", "653724009" ]
|
|
20
|
+
, [ "closetag", "BODYCRC" ]
|
|
21
|
+
, [ "opentag", { name: "COLUMN", attributes: {}, isSelfClosing: false } ]
|
|
22
|
+
, [ "text", "-1" ]
|
|
23
|
+
, [ "closetag", "COLUMN" ]
|
|
24
|
+
, [ "opentag", { name: "ID", attributes: {}, isSelfClosing: false } ]
|
|
25
|
+
, [ "text", "01pG0000002KoSUIA0" ]
|
|
26
|
+
, [ "closetag", "ID" ]
|
|
27
|
+
, [ "opentag", {name: "LINE", attributes: {}, isSelfClosing: false } ]
|
|
28
|
+
, [ "text", "-1" ]
|
|
29
|
+
, [ "closetag", "LINE" ]
|
|
30
|
+
, [ "opentag", {name: "NAME", attributes: {}, isSelfClosing: false } ]
|
|
31
|
+
, [ "text", "CalendarController" ]
|
|
32
|
+
, [ "closetag", "NAME" ]
|
|
33
|
+
, [ "opentag", {name: "SUCCESS", attributes: {}, isSelfClosing: false } ]
|
|
34
|
+
, [ "text", "true" ]
|
|
35
|
+
, [ "closetag", "SUCCESS" ]
|
|
36
|
+
, [ "closetag", "RESULT" ]
|
|
37
|
+
, [ "closetag", "COMPILECLASSESRESPONSE" ]
|
|
38
|
+
]
|
|
39
|
+
, strict : false
|
|
40
|
+
, opt : {}
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// https://github.com/isaacs/sax-js/issues/33
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : "<xml>\n"+
|
|
4
|
+
"<!-- \n"+
|
|
5
|
+
" comment with a single dash- in it\n"+
|
|
6
|
+
"-->\n"+
|
|
7
|
+
"<data/>\n"+
|
|
8
|
+
"</xml>"
|
|
9
|
+
|
|
10
|
+
, expect :
|
|
11
|
+
[ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
|
|
12
|
+
, [ "text", "\n" ]
|
|
13
|
+
, [ "comment", " \n comment with a single dash- in it\n" ]
|
|
14
|
+
, [ "text", "\n" ]
|
|
15
|
+
, [ "opentag", { name: "data", attributes: {}, isSelfClosing: true } ]
|
|
16
|
+
, [ "closetag", "data" ]
|
|
17
|
+
, [ "text", "\n" ]
|
|
18
|
+
, [ "closetag", "xml" ]
|
|
19
|
+
]
|
|
20
|
+
, strict : true
|
|
21
|
+
, opt : {}
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// https://github.com/isaacs/sax-js/issues/35
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : "<xml>

\n"+
|
|
4
|
+
"</xml>"
|
|
5
|
+
|
|
6
|
+
, expect :
|
|
7
|
+
[ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
|
|
8
|
+
, [ "text", "\r\r\n" ]
|
|
9
|
+
, [ "closetag", "xml" ]
|
|
10
|
+
]
|
|
11
|
+
, strict : true
|
|
12
|
+
, opt : {}
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// https://github.com/isaacs/sax-js/issues/47
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : '<a href="query.svc?x=1&y=2&z=3"/>'
|
|
4
|
+
, expect : [
|
|
5
|
+
[ "attribute", { name:'HREF', value:"query.svc?x=1&y=2&z=3"} ],
|
|
6
|
+
[ "opentag", { name: "A", attributes: { HREF:"query.svc?x=1&y=2&z=3"}, isSelfClosing: true } ],
|
|
7
|
+
[ "closetag", "A" ]
|
|
8
|
+
]
|
|
9
|
+
, opt : {}
|
|
10
|
+
}
|
|
11
|
+
)
|
|
12
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// https://github.com/isaacs/sax-js/issues/49
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : "<xml><script>hello world</script></xml>"
|
|
4
|
+
, expect :
|
|
5
|
+
[ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
|
|
6
|
+
, [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ]
|
|
7
|
+
, [ "text", "hello world" ]
|
|
8
|
+
, [ "closetag", "script" ]
|
|
9
|
+
, [ "closetag", "xml" ]
|
|
10
|
+
]
|
|
11
|
+
, strict : false
|
|
12
|
+
, opt : { lowercasetags: true, noscript: true }
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
require(__dirname).test
|
|
17
|
+
( { xml : "<xml><script><![CDATA[hello world]]></script></xml>"
|
|
18
|
+
, expect :
|
|
19
|
+
[ [ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
|
|
20
|
+
, [ "opentag", { name: "script", attributes: {}, isSelfClosing: false } ]
|
|
21
|
+
, [ "opencdata", undefined ]
|
|
22
|
+
, [ "cdata", "hello world" ]
|
|
23
|
+
, [ "closecdata", undefined ]
|
|
24
|
+
, [ "closetag", "script" ]
|
|
25
|
+
, [ "closetag", "xml" ]
|
|
26
|
+
]
|
|
27
|
+
, strict : false
|
|
28
|
+
, opt : { lowercasetags: true, noscript: true }
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// https://github.com/isaacs/sax-js/issues/49
|
|
2
|
+
require(__dirname).test
|
|
3
|
+
( { xml : "<?has unbalanced \"quotes?><xml>body</xml>"
|
|
4
|
+
, expect :
|
|
5
|
+
[ [ "processinginstruction", { name: "has", body: "unbalanced \"quotes" } ],
|
|
6
|
+
[ "opentag", { name: "xml", attributes: {}, isSelfClosing: false } ]
|
|
7
|
+
, [ "text", "body" ]
|
|
8
|
+
, [ "closetag", "xml" ]
|
|
9
|
+
]
|
|
10
|
+
, strict : false
|
|
11
|
+
, opt : { lowercasetags: true, noscript: true }
|
|
12
|
+
}
|
|
13
|
+
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var sax = require("../lib/sax"),
|
|
2
|
+
assert = require("assert")
|
|
3
|
+
|
|
4
|
+
function testPosition(chunks, expectedEvents) {
|
|
5
|
+
var parser = sax.parser();
|
|
6
|
+
expectedEvents.forEach(function(expectation) {
|
|
7
|
+
parser['on' + expectation[0]] = function() {
|
|
8
|
+
for (var prop in expectation[1]) {
|
|
9
|
+
assert.equal(parser[prop], expectation[1][prop]);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
chunks.forEach(function(chunk) {
|
|
14
|
+
parser.write(chunk);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
testPosition(['<div>abcdefgh</div>'],
|
|
19
|
+
[ ['opentag', { position: 5, startTagPosition: 1 }]
|
|
20
|
+
, ['text', { position: 19, startTagPosition: 14 }]
|
|
21
|
+
, ['closetag', { position: 19, startTagPosition: 14 }]
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
testPosition(['<div>abcde','fgh</div>'],
|
|
25
|
+
[ ['opentag', { position: 5, startTagPosition: 1 }]
|
|
26
|
+
, ['text', { position: 19, startTagPosition: 14 }]
|
|
27
|
+
, ['closetag', { position: 19, startTagPosition: 14 }]
|
|
28
|
+
]);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require(__dirname).test({
|
|
2
|
+
xml : "<html><head><script>'<div>foo</div></'</script></head></html>",
|
|
3
|
+
expect : [
|
|
4
|
+
["opentag", {"name": "HTML","attributes": {}, isSelfClosing: false}],
|
|
5
|
+
["opentag", {"name": "HEAD","attributes": {}, isSelfClosing: false}],
|
|
6
|
+
["opentag", {"name": "SCRIPT","attributes": {}, isSelfClosing: false}],
|
|
7
|
+
["script", "'<div>foo</div></'"],
|
|
8
|
+
["closetag", "SCRIPT"],
|
|
9
|
+
["closetag", "HEAD"],
|
|
10
|
+
["closetag", "HTML"]
|
|
11
|
+
]
|
|
12
|
+
});
|