ende 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/build/build.css +112 -0
- data/build/build.js +36465 -0
- data/component.json +11 -15
- data/components/chaijs/assertion-error/1.0.0/component.json +18 -0
- data/components/chaijs/chai/1.9.1/.gitignore +22 -0
- data/components/chaijs/chai/1.9.1/.mailmap +1 -0
- data/components/chaijs/chai/1.9.1/.npmignore +14 -0
- data/components/chaijs/chai/1.9.1/.travis.yml +14 -0
- data/components/chaijs/chai/1.9.1/CONTRIBUTING.md +173 -0
- data/components/chaijs/chai/1.9.1/History.md +895 -0
- data/components/chaijs/chai/1.9.1/Makefile +93 -0
- data/components/chaijs/chai/1.9.1/README.md +99 -0
- data/components/chaijs/chai/1.9.1/ReleaseNotes.md +482 -0
- data/components/chaijs/chai/1.9.1/bower.json +27 -0
- data/components/chaijs/chai/1.9.1/chai.js +4782 -0
- data/components/chaijs/chai/1.9.1/component.json +50 -0
- data/components/chaijs/chai/1.9.1/karma.conf.js +28 -0
- data/components/chaijs/chai/1.9.1/karma.sauce.js +41 -0
- data/components/chaijs/chai/1.9.1/lib/chai/assertion.js +130 -0
- data/components/chaijs/chai/1.9.1/lib/chai/config.js +50 -0
- data/components/chaijs/chai/1.9.1/lib/chai/core/assertions.js +1314 -0
- data/components/chaijs/chai/1.9.1/lib/chai/interface/assert.js +1056 -0
- data/components/chaijs/chai/1.9.1/lib/chai/interface/expect.js +12 -0
- data/components/chaijs/chai/1.9.1/lib/chai/interface/should.js +78 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/addChainableMethod.js +111 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/addMethod.js +43 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/addProperty.js +40 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/flag.js +32 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getActual.js +18 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getEnumerableProperties.js +25 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getMessage.js +49 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getName.js +20 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getPathValue.js +102 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/getProperties.js +35 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/index.js +114 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/objDisplay.js +49 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteChainableMethod.js +53 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteMethod.js +51 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteProperty.js +54 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/test.js +26 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/transferFlags.js +44 -0
- data/components/chaijs/chai/1.9.1/lib/chai/utils/type.js +45 -0
- data/components/chaijs/chai/1.9.1/lib/chai.js +87 -0
- data/components/chaijs/chai/1.9.1/package.json +42 -0
- data/components/chaijs/chai/1.9.1/sauce.browsers.js +128 -0
- data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_block.sh +7 -0
- data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh +53 -0
- data/components/chaijs/chai/1.9.1/test/assert.js +638 -0
- data/components/chaijs/chai/1.9.1/test/bootstrap/index.js +22 -0
- data/components/chaijs/chai/1.9.1/test/bootstrap/karma.js +22 -0
- data/components/chaijs/chai/1.9.1/test/configuration.js +133 -0
- data/components/chaijs/chai/1.9.1/test/display/errors.js +14 -0
- data/components/chaijs/chai/1.9.1/test/display/message.js +47 -0
- data/components/chaijs/chai/1.9.1/test/expect.js +814 -0
- data/components/chaijs/chai/1.9.1/test/globalShould.js +15 -0
- data/components/chaijs/chai/1.9.1/test/plugins.js +24 -0
- data/components/chaijs/chai/1.9.1/test/should.js +744 -0
- data/components/chaijs/chai/1.9.1/test/utilities.js +309 -0
- data/components/chaijs/deep-eql/0.1.3/component.json +20 -0
- data/components/chaijs/deep-eql/0.1.3/lib/eql.js +257 -0
- data/components/chaijs/type-detect/0.1.1/component.json +18 -0
- data/components/chaijs/type-detect/0.1.1/lib/type.js +142 -0
- data/{vendor/components/indefinido-indemma/components/component-bind → components/component/bind/0.0.1}/component.json +1 -1
- data/{vendor/components/component-classes → components/component/classes/1.1.2}/component.json +1 -1
- data/components/component/classes/1.2.1/component.json +19 -0
- data/components/component/classes/1.2.1/index.js +184 -0
- data/{vendor/components/component-css → components/component/css/0.0.2}/component.json +2 -2
- data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/component.json +2 -2
- data/components/component/dialog/0.2.0/component.json +35 -0
- data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/index.js +74 -40
- data/components/component/dialog/0.2.0/template.html +9 -0
- data/{vendor/components/component-dom → components/component/dom/0.7.1}/component.json +6 -4
- data/{vendor/components/component-domify → components/component/domify/1.0.0}/component.json +6 -4
- data/components/component/domify/1.2.2/component.json +22 -0
- data/components/component/domify/1.2.2/index.js +87 -0
- data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/component.json +1 -1
- data/{vendor/components/component-event → components/component/event/0.1.0}/component.json +3 -3
- data/components/component/event/0.1.0/index.js +40 -0
- data/components/component/event/0.1.3/component.json +13 -0
- data/{vendor/components/component-event → components/component/event/0.1.3}/index.js +3 -5
- data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/component.json +1 -1
- data/{vendor/components/indefinido-indemma/components/component-jquery → components/component/jquery/1.9.1}/component.json +1 -1
- data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/component.json +6 -4
- data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/component.json +1 -1
- data/{vendor/components/component-query → components/component/query/0.0.1}/component.json +6 -4
- data/components/component/query/0.0.3/component.json +23 -0
- data/components/component/query/0.0.3/index.js +21 -0
- data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/component.json +4 -3
- data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/index.js +26 -2
- data/{vendor/components/component-sort → components/component/sort/0.0.3}/component.json +2 -2
- data/{vendor/components/component-trim → components/component/trim/0.0.1}/component.json +1 -1
- data/{vendor/components/indefinido-indemma/components/component-type → components/component/type/1.0.0}/component.json +4 -2
- data/{vendor/components/component-value → components/component/value/1.1.0}/component.json +6 -4
- data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/component.json +2 -3
- data/{vendor/components/indefinido-indemma/components/indefinido-advisable → components/indefinido/advisable/master}/component.json +2 -2
- data/components/indefinido/indemma/master/History.md +0 -0
- data/components/indefinido/indemma/master/build/build.js +26288 -0
- data/components/indefinido/indemma/master/build/development.js +22200 -0
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/build/release.js +264 -273
- data/components/indefinido/indemma/master/build/test.js +22200 -0
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/component.json +6 -6
- data/components/indefinido/indemma/master/components/chaijs-assertion-error/index.js +110 -0
- data/components/indefinido/indemma/master/components/chaijs-chai/index.js +1 -0
- data/components/indefinido/indemma/master/components/chaijs-chai/lib/chai/utils/inspect.js +320 -0
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/associable.js +2 -14
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/rest.js +2 -7
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/restfulable.js +9 -33
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/scopable.js +45 -16
- data/components/indefinido/indemma/master/lib/record/validatable.js +1100 -0
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/associable_spec.js +2 -3
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/scopable_spec.js +53 -83
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/cpf_spec.js +6 -5
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/associable.coffee +0 -6
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/persistable.coffee +0 -2
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/queryable.coffee +2 -1
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/resource.coffee +2 -3
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/rest.coffee +1 -7
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/restfulable.coffee +8 -34
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/scopable.coffee +31 -32
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validatable.coffee +1 -12
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/associable_spec.coffee +2 -3
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/scopable_spec.coffee +43 -76
- data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/cpf_spec.coffee +4 -3
- data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/component.json +2 -2
- data/{vendor/components/paulmillr-es6-shim → components/paulmillr/es6-shim/0.10.1}/component.json +11 -4
- data/components/paulmillr/es6-shim/0.10.1/es6-shim.js +1833 -0
- data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/component.json +3 -3
- data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/component.json +3 -3
- data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +14 -14
- data/lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee +1 -1
- data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +3 -3
- data/lib/assets/javascripts/aura/extensions/stamps/stampit.js +568 -242
- data/lib/assets/javascripts/aura/extensions/widget/#composable.js.coffee# +135 -0
- data/lib/assets/javascripts/aura/extensions/widget/composable.js.coffee +2 -2
- data/lib/assets/javascripts/config/load_components.js.coffee +10 -10
- data/lib/assets/javascripts/ende.js.coffee +21 -18
- data/lib/assets/javascripts/widgets/support/adapters/olark.js +1 -4
- data/lib/assets/javascripts/widgets/viewer/main.js.coffee +8 -4
- data/lib/assets/javascripts/widgets/viewer/plugins/scopable.js.coffee +6 -7
- data/lib/ende/version.rb +1 -1
- data/vendor/assets/components/build.css +4 -3
- data/vendor/assets/components/ende_build.js +29772 -21943
- metadata +284 -217
- data/vendor/components/KapIT-observe-utils/component.json +0 -16
- data/vendor/components/KapIT-observe-utils/lib/observe-utils.js +0 -780
- data/vendor/components/component-dialog/component.json +0 -23
- data/vendor/components/component-dialog/template.js +0 -1
- data/vendor/components/indefinido-indemma/build/development.js +0 -343
- data/vendor/components/indefinido-indemma/build/test.js +0 -343
- data/vendor/components/indefinido-indemma/lib/record/validatable.js +0 -224
- data/vendor/components/indefinido-observable/component.json +0 -24
- data/vendor/components/indefinido-observable/index.js +0 -1
- data/vendor/components/indefinido-observable/lib/adapters/rivets.js +0 -28
- data/vendor/components/indefinido-observable/lib/observable.js +0 -390
- data/vendor/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -92
- data/vendor/components/indefinido-observable/vendor/shims/accessors.js +0 -248
- data/vendor/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -8
- data/vendor/components/indefinido-observable/vendor/shims/object.create.js +0 -77
- data/vendor/components/paulmillr-es6-shim/es6-shim.js +0 -996
- /data/{vendor/components/indefinido-indemma/components/chaijs-assertion-error → components/chaijs/assertion-error/1.0.0}/index.js +0 -0
- /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/index.js +0 -0
- /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/lib/chai/utils/inspect.js +0 -0
- /data/{vendor/components/indefinido-indemma/History.md → components/chaijs/chai/1.9.1/test/auth/.gitkeep} +0 -0
- /data/{vendor/components/component-bind → components/component/bind/0.0.1}/index.js +0 -0
- /data/{vendor/components/component-classes → components/component/classes/1.1.2}/index.js +0 -0
- /data/{vendor/components/component-css → components/component/css/0.0.2}/index.js +0 -0
- /data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/index.js +0 -0
- /data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/dialog.css +0 -0
- /data/{vendor/components/component-dom → components/component/dom/0.7.1}/index.js +0 -0
- /data/{vendor/components/component-domify → components/component/domify/1.0.0}/index.js +0 -0
- /data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/index.js +0 -0
- /data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/index.js +0 -0
- /data/{vendor/components/component-jquery → components/component/jquery/1.9.1}/index.js +0 -0
- /data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/index.js +0 -0
- /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/index.js +0 -0
- /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/overlay.css +0 -0
- /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/template.js +0 -0
- /data/{vendor/components/component-query → components/component/query/0.0.1}/index.js +0 -0
- /data/{vendor/components/component-sort → components/component/sort/0.0.3}/index.js +0 -0
- /data/{vendor/components/component-trim → components/component/trim/0.0.1}/index.js +0 -0
- /data/{vendor/components/component-type → components/component/type/1.0.0}/index.js +0 -0
- /data/{vendor/components/component-value → components/component/value/1.1.0}/index.js +0 -0
- /data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/modernizr.js +0 -0
- /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/index.js +0 -0
- /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/lib/advisable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.gitignore +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-gemset +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-version +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Gemfile +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Guardfile +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Readme.md +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-assertion-error/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/assertion.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/core/assertions.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/assert.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/expect.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/should.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addChainableMethod.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addMethod.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addProperty.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/eql.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/flag.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getActual.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getEnumerableProperties.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getMessage.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getName.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getPathValue.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getProperties.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/index.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/objDisplay.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteMethod.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteProperty.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/test.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/transferFlags.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/type.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai.js +0 -0
- /data/{vendor → components/indefinido/indemma/master}/components/component-bind/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-bind/index.js +0 -0
- /data/{vendor → components/indefinido/indemma/master}/components/component-jquery/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-jquery/index.js +0 -0
- /data/{vendor → components/indefinido/indemma/master}/components/component-type/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-type/index.js +0 -0
- /data/{vendor → components/indefinido/indemma/master}/components/indefinido-advisable/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/index.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/lib/advisable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/components/cjohansen-sinon/sinon.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/index.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/adapters/rivets.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/observable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/object.create.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/kapit-observe-utils/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/es6-shim.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/component.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/dist/assimilate.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/index.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/karma.conf.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/extensions/rivets.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/errors.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/maid.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/persistable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/queryable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/resource.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/storable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/translationable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/associated.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/confirmation.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/cpf.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/presence.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/remote.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/type.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/validatorable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/package.json +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/persistable_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/queryable_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/resource_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/rest_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/restfulable_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/storable_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/translationable.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validatable_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/associated_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/confirmation_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/presence_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/remote_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/type_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record_spec.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/spec_helper.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/support/value_objects/phone.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/extensions/rivets.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/errors.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/maid.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/storable.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/translationable.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/associated.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/confirmation.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/cpf.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/presence.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/remote.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/type.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/validatorable.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/persistable_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/queryable_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/resource_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/rest_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/restfulable_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/storable_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/translationable.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validatable_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/associated_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/confirmation_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/presence_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/remote_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/type_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record_spec.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/spec_helper.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/support/value_objects/phone.coffee +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/object/mixin.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/owl/pluralize.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/sinon.js +0 -0
- /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/stampit.js +0 -0
- /data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/dist/rivets.js +0 -0
- /data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/dist/assimilate.js +0 -0
- /data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/index.js +0 -0
data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/component.json
RENAMED
@@ -1,8 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "indemma",
|
3
|
-
"repo": "indefinido/indemma",
|
4
3
|
"description": "Indemma (mind picture = memory), client side ES5 observable REST model",
|
5
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.9",
|
6
5
|
"keywords": [],
|
7
6
|
"dependencies": {
|
8
7
|
"pluma/assimilate": "0.3.0",
|
@@ -10,8 +9,8 @@
|
|
10
9
|
"component/bind": "*",
|
11
10
|
"component/jquery": "*",
|
12
11
|
"indefinido/observable": "*",
|
13
|
-
|
14
|
-
"
|
12
|
+
"indefinido/advisable": "*",
|
13
|
+
"chaijs/chai": "*"
|
15
14
|
},
|
16
15
|
"development": {},
|
17
16
|
"license": "WTFPL",
|
@@ -20,7 +19,6 @@
|
|
20
19
|
"vendor/stampit.js",
|
21
20
|
"vendor/sinon.js",
|
22
21
|
"vendor/owl/pluralize.js",
|
23
|
-
|
24
22
|
"lib/record.js",
|
25
23
|
"lib/record/associable.js",
|
26
24
|
"lib/record/persistable.js",
|
@@ -41,5 +39,7 @@
|
|
41
39
|
"lib/record/validations/cpf.js",
|
42
40
|
"lib/record/validatable.js",
|
43
41
|
"lib/extensions/rivets.js"
|
44
|
-
]
|
42
|
+
],
|
43
|
+
"repository": "indefinido/indemma",
|
44
|
+
"repo": "indefinido/indemma"
|
45
45
|
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
/*!
|
2
|
+
* assertion-error
|
3
|
+
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
|
4
|
+
* MIT Licensed
|
5
|
+
*/
|
6
|
+
|
7
|
+
/*!
|
8
|
+
* Return a function that will copy properties from
|
9
|
+
* one object to another excluding any originally
|
10
|
+
* listed. Returned function will create a new `{}`.
|
11
|
+
*
|
12
|
+
* @param {String} excluded properties ...
|
13
|
+
* @return {Function}
|
14
|
+
*/
|
15
|
+
|
16
|
+
function exclude () {
|
17
|
+
var excludes = [].slice.call(arguments);
|
18
|
+
|
19
|
+
function excludeProps (res, obj) {
|
20
|
+
Object.keys(obj).forEach(function (key) {
|
21
|
+
if (!~excludes.indexOf(key)) res[key] = obj[key];
|
22
|
+
});
|
23
|
+
}
|
24
|
+
|
25
|
+
return function extendExclude () {
|
26
|
+
var args = [].slice.call(arguments)
|
27
|
+
, i = 0
|
28
|
+
, res = {};
|
29
|
+
|
30
|
+
for (; i < args.length; i++) {
|
31
|
+
excludeProps(res, args[i]);
|
32
|
+
}
|
33
|
+
|
34
|
+
return res;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
|
38
|
+
/*!
|
39
|
+
* Primary Exports
|
40
|
+
*/
|
41
|
+
|
42
|
+
module.exports = AssertionError;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* ### AssertionError
|
46
|
+
*
|
47
|
+
* An extension of the JavaScript `Error` constructor for
|
48
|
+
* assertion and validation scenarios.
|
49
|
+
*
|
50
|
+
* @param {String} message
|
51
|
+
* @param {Object} properties to include (optional)
|
52
|
+
* @param {callee} start stack function (optional)
|
53
|
+
*/
|
54
|
+
|
55
|
+
function AssertionError (message, _props, ssf) {
|
56
|
+
var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')
|
57
|
+
, props = extend(_props || {});
|
58
|
+
|
59
|
+
// default values
|
60
|
+
this.message = message || 'Unspecified AssertionError';
|
61
|
+
this.showDiff = false;
|
62
|
+
|
63
|
+
// copy from properties
|
64
|
+
for (var key in props) {
|
65
|
+
this[key] = props[key];
|
66
|
+
}
|
67
|
+
|
68
|
+
// capture stack trace
|
69
|
+
ssf = ssf || arguments.callee;
|
70
|
+
if (ssf && Error.captureStackTrace) {
|
71
|
+
Error.captureStackTrace(this, ssf);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
/*!
|
76
|
+
* Inherit from Error.prototype
|
77
|
+
*/
|
78
|
+
|
79
|
+
AssertionError.prototype = Object.create(Error.prototype);
|
80
|
+
|
81
|
+
/*!
|
82
|
+
* Statically set name
|
83
|
+
*/
|
84
|
+
|
85
|
+
AssertionError.prototype.name = 'AssertionError';
|
86
|
+
|
87
|
+
/*!
|
88
|
+
* Ensure correct constructor
|
89
|
+
*/
|
90
|
+
|
91
|
+
AssertionError.prototype.constructor = AssertionError;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Allow errors to be converted to JSON for static transfer.
|
95
|
+
*
|
96
|
+
* @param {Boolean} include stack (default: `true`)
|
97
|
+
* @return {Object} object that can be `JSON.stringify`
|
98
|
+
*/
|
99
|
+
|
100
|
+
AssertionError.prototype.toJSON = function (stack) {
|
101
|
+
var extend = exclude('constructor', 'toJSON', 'stack')
|
102
|
+
, props = extend({ name: this.name }, this);
|
103
|
+
|
104
|
+
// include stack if exists and not turned off
|
105
|
+
if (false !== stack && this.stack) {
|
106
|
+
props.stack = this.stack;
|
107
|
+
}
|
108
|
+
|
109
|
+
return props;
|
110
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
module.exports = require('./lib/chai');
|
@@ -0,0 +1,320 @@
|
|
1
|
+
// This is (almost) directly from Node.js utils
|
2
|
+
// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
|
3
|
+
|
4
|
+
var getName = require('./getName');
|
5
|
+
var getProperties = require('./getProperties');
|
6
|
+
var getEnumerableProperties = require('./getEnumerableProperties');
|
7
|
+
|
8
|
+
module.exports = inspect;
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Echos the value of a value. Trys to print the value out
|
12
|
+
* in the best way possible given the different types.
|
13
|
+
*
|
14
|
+
* @param {Object} obj The object to print out.
|
15
|
+
* @param {Boolean} showHidden Flag that shows hidden (not enumerable)
|
16
|
+
* properties of objects.
|
17
|
+
* @param {Number} depth Depth in which to descend in object. Default is 2.
|
18
|
+
* @param {Boolean} colors Flag to turn on ANSI escape codes to color the
|
19
|
+
* output. Default is false (no coloring).
|
20
|
+
*/
|
21
|
+
function inspect(obj, showHidden, depth, colors) {
|
22
|
+
var ctx = {
|
23
|
+
showHidden: showHidden,
|
24
|
+
seen: [],
|
25
|
+
stylize: function (str) { return str; }
|
26
|
+
};
|
27
|
+
return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));
|
28
|
+
}
|
29
|
+
|
30
|
+
// https://gist.github.com/1044128/
|
31
|
+
var getOuterHTML = function(element) {
|
32
|
+
if ('outerHTML' in element) return element.outerHTML;
|
33
|
+
var ns = "http://www.w3.org/1999/xhtml";
|
34
|
+
var container = document.createElementNS(ns, '_');
|
35
|
+
var elemProto = (window.HTMLElement || window.Element).prototype;
|
36
|
+
var xmlSerializer = new XMLSerializer();
|
37
|
+
var html;
|
38
|
+
if (document.xmlVersion) {
|
39
|
+
return xmlSerializer.serializeToString(element);
|
40
|
+
} else {
|
41
|
+
container.appendChild(element.cloneNode(false));
|
42
|
+
html = container.innerHTML.replace('><', '>' + element.innerHTML + '<');
|
43
|
+
container.innerHTML = '';
|
44
|
+
return html;
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
// Returns true if object is a DOM element.
|
49
|
+
var isDOMElement = function (object) {
|
50
|
+
if (typeof HTMLElement === 'object') {
|
51
|
+
return object instanceof HTMLElement;
|
52
|
+
} else {
|
53
|
+
return object &&
|
54
|
+
typeof object === 'object' &&
|
55
|
+
object.nodeType === 1 &&
|
56
|
+
typeof object.nodeName === 'string';
|
57
|
+
}
|
58
|
+
};
|
59
|
+
|
60
|
+
function formatValue(ctx, value, recurseTimes) {
|
61
|
+
// Provide a hook for user-specified inspect functions.
|
62
|
+
// Check that value is an object with an inspect function on it
|
63
|
+
if (value && typeof value.inspect === 'function' &&
|
64
|
+
// Filter out the util module, it's inspect function is special
|
65
|
+
value.inspect !== exports.inspect &&
|
66
|
+
// Also filter out any prototype objects using the circular check.
|
67
|
+
!(value.constructor && value.constructor.prototype === value)) {
|
68
|
+
var ret = value.inspect(recurseTimes);
|
69
|
+
if (typeof ret !== 'string') {
|
70
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
71
|
+
}
|
72
|
+
return ret;
|
73
|
+
}
|
74
|
+
|
75
|
+
// Primitive types cannot have properties
|
76
|
+
var primitive = formatPrimitive(ctx, value);
|
77
|
+
if (primitive) {
|
78
|
+
return primitive;
|
79
|
+
}
|
80
|
+
|
81
|
+
// If it's DOM elem, get outer HTML.
|
82
|
+
if (isDOMElement(value)) {
|
83
|
+
return getOuterHTML(value);
|
84
|
+
}
|
85
|
+
|
86
|
+
// Look up the keys of the object.
|
87
|
+
var visibleKeys = getEnumerableProperties(value);
|
88
|
+
var keys = ctx.showHidden ? getProperties(value) : visibleKeys;
|
89
|
+
|
90
|
+
// Some type of object without properties can be shortcutted.
|
91
|
+
// In IE, errors have a single `stack` property, or if they are vanilla `Error`,
|
92
|
+
// a `stack` plus `description` property; ignore those for consistency.
|
93
|
+
if (keys.length === 0 || (isError(value) && (
|
94
|
+
(keys.length === 1 && keys[0] === 'stack') ||
|
95
|
+
(keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')
|
96
|
+
))) {
|
97
|
+
if (typeof value === 'function') {
|
98
|
+
var name = getName(value);
|
99
|
+
var nameSuffix = name ? ': ' + name : '';
|
100
|
+
return ctx.stylize('[Function' + nameSuffix + ']', 'special');
|
101
|
+
}
|
102
|
+
if (isRegExp(value)) {
|
103
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
104
|
+
}
|
105
|
+
if (isDate(value)) {
|
106
|
+
return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
|
107
|
+
}
|
108
|
+
if (isError(value)) {
|
109
|
+
return formatError(value);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
var base = '', array = false, braces = ['{', '}'];
|
114
|
+
|
115
|
+
// Make Array say that they are Array
|
116
|
+
if (isArray(value)) {
|
117
|
+
array = true;
|
118
|
+
braces = ['[', ']'];
|
119
|
+
}
|
120
|
+
|
121
|
+
// Make functions say that they are functions
|
122
|
+
if (typeof value === 'function') {
|
123
|
+
var name = getName(value);
|
124
|
+
var nameSuffix = name ? ': ' + name : '';
|
125
|
+
base = ' [Function' + nameSuffix + ']';
|
126
|
+
}
|
127
|
+
|
128
|
+
// Make RegExps say that they are RegExps
|
129
|
+
if (isRegExp(value)) {
|
130
|
+
base = ' ' + RegExp.prototype.toString.call(value);
|
131
|
+
}
|
132
|
+
|
133
|
+
// Make dates with properties first say the date
|
134
|
+
if (isDate(value)) {
|
135
|
+
base = ' ' + Date.prototype.toUTCString.call(value);
|
136
|
+
}
|
137
|
+
|
138
|
+
// Make error with message first say the error
|
139
|
+
if (isError(value)) {
|
140
|
+
return formatError(value);
|
141
|
+
}
|
142
|
+
|
143
|
+
if (keys.length === 0 && (!array || value.length == 0)) {
|
144
|
+
return braces[0] + base + braces[1];
|
145
|
+
}
|
146
|
+
|
147
|
+
if (recurseTimes < 0) {
|
148
|
+
if (isRegExp(value)) {
|
149
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
150
|
+
} else {
|
151
|
+
return ctx.stylize('[Object]', 'special');
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
ctx.seen.push(value);
|
156
|
+
|
157
|
+
var output;
|
158
|
+
if (array) {
|
159
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
160
|
+
} else {
|
161
|
+
output = keys.map(function(key) {
|
162
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
163
|
+
});
|
164
|
+
}
|
165
|
+
|
166
|
+
ctx.seen.pop();
|
167
|
+
|
168
|
+
return reduceToSingleString(output, base, braces);
|
169
|
+
}
|
170
|
+
|
171
|
+
|
172
|
+
function formatPrimitive(ctx, value) {
|
173
|
+
switch (typeof value) {
|
174
|
+
case 'undefined':
|
175
|
+
return ctx.stylize('undefined', 'undefined');
|
176
|
+
|
177
|
+
case 'string':
|
178
|
+
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
179
|
+
.replace(/'/g, "\\'")
|
180
|
+
.replace(/\\"/g, '"') + '\'';
|
181
|
+
return ctx.stylize(simple, 'string');
|
182
|
+
|
183
|
+
case 'number':
|
184
|
+
return ctx.stylize('' + value, 'number');
|
185
|
+
|
186
|
+
case 'boolean':
|
187
|
+
return ctx.stylize('' + value, 'boolean');
|
188
|
+
}
|
189
|
+
// For some reason typeof null is "object", so special case here.
|
190
|
+
if (value === null) {
|
191
|
+
return ctx.stylize('null', 'null');
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
function formatError(value) {
|
197
|
+
return '[' + Error.prototype.toString.call(value) + ']';
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
202
|
+
var output = [];
|
203
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
204
|
+
if (Object.prototype.hasOwnProperty.call(value, String(i))) {
|
205
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
206
|
+
String(i), true));
|
207
|
+
} else {
|
208
|
+
output.push('');
|
209
|
+
}
|
210
|
+
}
|
211
|
+
keys.forEach(function(key) {
|
212
|
+
if (!key.match(/^\d+$/)) {
|
213
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
214
|
+
key, true));
|
215
|
+
}
|
216
|
+
});
|
217
|
+
return output;
|
218
|
+
}
|
219
|
+
|
220
|
+
|
221
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
222
|
+
var name, str;
|
223
|
+
if (value.__lookupGetter__) {
|
224
|
+
if (value.__lookupGetter__(key)) {
|
225
|
+
if (value.__lookupSetter__(key)) {
|
226
|
+
str = ctx.stylize('[Getter/Setter]', 'special');
|
227
|
+
} else {
|
228
|
+
str = ctx.stylize('[Getter]', 'special');
|
229
|
+
}
|
230
|
+
} else {
|
231
|
+
if (value.__lookupSetter__(key)) {
|
232
|
+
str = ctx.stylize('[Setter]', 'special');
|
233
|
+
}
|
234
|
+
}
|
235
|
+
}
|
236
|
+
if (visibleKeys.indexOf(key) < 0) {
|
237
|
+
name = '[' + key + ']';
|
238
|
+
}
|
239
|
+
if (!str) {
|
240
|
+
if (ctx.seen.indexOf(value[key]) < 0) {
|
241
|
+
if (recurseTimes === null) {
|
242
|
+
str = formatValue(ctx, value[key], null);
|
243
|
+
} else {
|
244
|
+
str = formatValue(ctx, value[key], recurseTimes - 1);
|
245
|
+
}
|
246
|
+
if (str.indexOf('\n') > -1) {
|
247
|
+
if (array) {
|
248
|
+
str = str.split('\n').map(function(line) {
|
249
|
+
return ' ' + line;
|
250
|
+
}).join('\n').substr(2);
|
251
|
+
} else {
|
252
|
+
str = '\n' + str.split('\n').map(function(line) {
|
253
|
+
return ' ' + line;
|
254
|
+
}).join('\n');
|
255
|
+
}
|
256
|
+
}
|
257
|
+
} else {
|
258
|
+
str = ctx.stylize('[Circular]', 'special');
|
259
|
+
}
|
260
|
+
}
|
261
|
+
if (typeof name === 'undefined') {
|
262
|
+
if (array && key.match(/^\d+$/)) {
|
263
|
+
return str;
|
264
|
+
}
|
265
|
+
name = JSON.stringify('' + key);
|
266
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
267
|
+
name = name.substr(1, name.length - 2);
|
268
|
+
name = ctx.stylize(name, 'name');
|
269
|
+
} else {
|
270
|
+
name = name.replace(/'/g, "\\'")
|
271
|
+
.replace(/\\"/g, '"')
|
272
|
+
.replace(/(^"|"$)/g, "'");
|
273
|
+
name = ctx.stylize(name, 'string');
|
274
|
+
}
|
275
|
+
}
|
276
|
+
|
277
|
+
return name + ': ' + str;
|
278
|
+
}
|
279
|
+
|
280
|
+
|
281
|
+
function reduceToSingleString(output, base, braces) {
|
282
|
+
var numLinesEst = 0;
|
283
|
+
var length = output.reduce(function(prev, cur) {
|
284
|
+
numLinesEst++;
|
285
|
+
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
286
|
+
return prev + cur.length + 1;
|
287
|
+
}, 0);
|
288
|
+
|
289
|
+
if (length > 60) {
|
290
|
+
return braces[0] +
|
291
|
+
(base === '' ? '' : base + '\n ') +
|
292
|
+
' ' +
|
293
|
+
output.join(',\n ') +
|
294
|
+
' ' +
|
295
|
+
braces[1];
|
296
|
+
}
|
297
|
+
|
298
|
+
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
299
|
+
}
|
300
|
+
|
301
|
+
function isArray(ar) {
|
302
|
+
return Array.isArray(ar) ||
|
303
|
+
(typeof ar === 'object' && objectToString(ar) === '[object Array]');
|
304
|
+
}
|
305
|
+
|
306
|
+
function isRegExp(re) {
|
307
|
+
return typeof re === 'object' && objectToString(re) === '[object RegExp]';
|
308
|
+
}
|
309
|
+
|
310
|
+
function isDate(d) {
|
311
|
+
return typeof d === 'object' && objectToString(d) === '[object Date]';
|
312
|
+
}
|
313
|
+
|
314
|
+
function isError(e) {
|
315
|
+
return typeof e === 'object' && objectToString(e) === '[object Error]';
|
316
|
+
}
|
317
|
+
|
318
|
+
function objectToString(o) {
|
319
|
+
return Object.prototype.toString.call(o);
|
320
|
+
}
|
@@ -52,8 +52,7 @@ plural = {
|
|
52
52
|
},
|
53
53
|
push: function() {
|
54
54
|
console.warn("" + this.resource + ".push is deprecated and will be removed, please use add instead");
|
55
|
-
Array.prototype.push.apply(this, arguments);
|
56
|
-
return arguments[0];
|
55
|
+
return Array.prototype.push.apply(this, arguments);
|
57
56
|
},
|
58
57
|
length: 0,
|
59
58
|
json: function(methods, omissions) {
|
@@ -65,18 +64,7 @@ plural = {
|
|
65
64
|
_results.push(record.json(methods, omissions));
|
66
65
|
}
|
67
66
|
return _results;
|
68
|
-
}
|
69
|
-
find: function(id) {
|
70
|
-
var resource, _i, _len;
|
71
|
-
|
72
|
-
for (_i = 0, _len = this.length; _i < _len; _i++) {
|
73
|
-
resource = this[_i];
|
74
|
-
if (resource._id === id) {
|
75
|
-
return resource;
|
76
|
-
}
|
77
|
-
}
|
78
|
-
},
|
79
|
-
filter: Array.prototype.filter || (typeof _ !== "undefined" && _ !== null ? _.filter : void 0)
|
67
|
+
}
|
80
68
|
};
|
81
69
|
|
82
70
|
singular = {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var $,
|
1
|
+
var $, request;
|
2
2
|
|
3
3
|
$ = require('jquery');
|
4
4
|
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
17
17
|
}
|
18
18
|
};
|
19
19
|
|
20
|
-
|
20
|
+
request = function(method, url, data) {
|
21
21
|
var param_name;
|
22
22
|
|
23
23
|
param_name = this.resource.param_name || this.resource.toString();
|
@@ -29,11 +29,6 @@ data_for = function(data) {
|
|
29
29
|
delete data[param_name]['id'];
|
30
30
|
delete data[param_name]['_id'];
|
31
31
|
}
|
32
|
-
return data;
|
33
|
-
};
|
34
|
-
|
35
|
-
request = function(method, url, data) {
|
36
|
-
data = data_for.call(this, data);
|
37
32
|
return $.ajax({
|
38
33
|
url: url,
|
39
34
|
data: data,
|
@@ -85,11 +85,7 @@ restful = {
|
|
85
85
|
data = {};
|
86
86
|
}
|
87
87
|
old_route = this.route;
|
88
|
-
default_route =
|
89
|
-
if (this.resource.scope != null) {
|
90
|
-
default_route += this.resource.scope + '/';
|
91
|
-
}
|
92
|
-
default_route += this.resource.singular ? this.resource.name : model.pluralize(this.resource.name);
|
88
|
+
default_route = "/" + (model.pluralize(this.resource.name));
|
93
89
|
if (default_route !== this.route) {
|
94
90
|
this.route = default_route;
|
95
91
|
}
|
@@ -145,7 +141,7 @@ restful = {
|
|
145
141
|
return promise;
|
146
142
|
},
|
147
143
|
assign_attributes: function(attributes) {
|
148
|
-
var association, association_attributes, association_name, associations_attributes, attribute, message, name, singular_resource, _i, _j, _k, _l, _len, _len1, _len2, _len3,
|
144
|
+
var association, association_attributes, association_name, associations_attributes, attribute, message, name, singular_resource, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _results;
|
149
145
|
|
150
146
|
_ref = model[this.resource.toString()].has_many;
|
151
147
|
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
@@ -189,16 +185,6 @@ restful = {
|
|
189
185
|
this[association_name] = this["build_" + association_name](association_attributes);
|
190
186
|
}
|
191
187
|
}
|
192
|
-
_ref3 = model[this.resource.toString()].belongs_to;
|
193
|
-
for (_m = 0, _len4 = _ref3.length; _m < _len4; _m++) {
|
194
|
-
association_name = _ref3[_m];
|
195
|
-
association_attributes = (_ref4 = (_ref5 = attributes[association_name]) != null ? typeof _ref5.json === "function" ? _ref5.json() : void 0 : void 0) != null ? _ref4 : attributes[association_name];
|
196
|
-
delete attributes[association_name];
|
197
|
-
delete attributes[association_name + "_attributes"];
|
198
|
-
if (association_attributes) {
|
199
|
-
this[association_name] = this["build_" + association_name](association_attributes);
|
200
|
-
}
|
201
|
-
}
|
202
188
|
_results = [];
|
203
189
|
for (name in attributes) {
|
204
190
|
attribute = attributes[name];
|
@@ -353,11 +339,11 @@ restful = {
|
|
353
339
|
return JSON.stringify(serialized);
|
354
340
|
}
|
355
341
|
},
|
356
|
-
json: function(
|
357
|
-
var definition, json,
|
342
|
+
json: function(methods) {
|
343
|
+
var definition, json, name, nature, nested, value;
|
358
344
|
|
359
|
-
if (
|
360
|
-
|
345
|
+
if (methods == null) {
|
346
|
+
methods = {};
|
361
347
|
}
|
362
348
|
json = {};
|
363
349
|
definition = model[this.resource.toString()];
|
@@ -383,15 +369,15 @@ restful = {
|
|
383
369
|
console.warn("json: Tryied to serialize nested attribute '" + name + "' without serialization method!");
|
384
370
|
continue;
|
385
371
|
}
|
386
|
-
json["" + name + "_attributes"] = value.json(
|
372
|
+
json["" + name + "_attributes"] = value.json(methods[name]);
|
387
373
|
} else if ((value.toJSON != null) || (value.json != null)) {
|
388
374
|
if (value.resource) {
|
389
375
|
continue;
|
390
376
|
}
|
391
377
|
if (value.json != null) {
|
392
|
-
json[name] = value.json(
|
378
|
+
json[name] = value.json(methods[name]);
|
393
379
|
} else {
|
394
|
-
json[name] = value.toJSON(
|
380
|
+
json[name] = value.toJSON(methods[name]);
|
395
381
|
}
|
396
382
|
} else {
|
397
383
|
continue;
|
@@ -401,16 +387,6 @@ restful = {
|
|
401
387
|
}
|
402
388
|
}
|
403
389
|
json = observable.unobserve(json);
|
404
|
-
_ref1 = (_ref = options.methods) != null ? _ref : {};
|
405
|
-
for (name in _ref1) {
|
406
|
-
value = _ref1[name];
|
407
|
-
method = this[name];
|
408
|
-
if (typeof method === 'function') {
|
409
|
-
json[name] = method();
|
410
|
-
} else {
|
411
|
-
json[name] = method;
|
412
|
-
}
|
413
|
-
}
|
414
390
|
delete json.dirty;
|
415
391
|
delete json.resource;
|
416
392
|
delete json.route;
|