BUG: fix up broken envMeas validations (#86)

This commit is contained in:
Matthew Ryan Dillon 2018-04-22 06:48:00 -07:00 committed by GitHub
parent 9d9e67868f
commit 437be4fb13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 226 deletions

View file

@ -19,7 +19,7 @@ export default Component.extend({
let changesets = {};
changesets['new'] = [];
changesets['delete'] = [];
changesets['hasMany'] = [];
changesets['hasMany'] = {};
changesets['model'] = new Changeset(model,
lookupValidator(validations['collection']),
validations['collection']);

View file

@ -4,6 +4,7 @@
validations=(hash
collection=CollectionValidations
collectionSpecies=CollectionSpeciesValidations
envMeasurements=CollectionMeasurementValidations
datasheet=DatasheetValidations)
options=options
hasMany=hasMany

View file

@ -6,7 +6,7 @@ import {
export default {
dateMeasured: validatePresence(true),
timeMeasured: validatePresence(true),
waterTemp: validateNumber({ allowBlank: true, integer: false, positive: false }),
airTemp: validateNumber({ allowBlank: true, integer: false, positive: false }),
waterTempC: validateNumber({ allowBlank: true, integer: false, positive: false }),
airTempC: validateNumber({ allowBlank: true, integer: false, positive: false }),
collection: validatePresence(true),
}

258
package-lock.json generated
View file

@ -3288,231 +3288,38 @@
}
},
"ember-changeset": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ember-changeset/-/ember-changeset-1.3.0.tgz",
"integrity": "sha1-rkywauit1FUKRjYyY81ZWLUiuaY=",
"version": "1.5.0-beta.0",
"resolved": "https://registry.npmjs.org/ember-changeset/-/ember-changeset-1.5.0-beta.0.tgz",
"integrity": "sha1-enfucnkntR+2Smqh/M8ofBP9VrU=",
"dev": true,
"requires": {
"ember-cli-babel": "5.2.4"
},
"dependencies": {
"babel-core": {
"version": "5.8.38",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-5.8.38.tgz",
"integrity": "sha1-H8ruedfmG3ULALjlT238nQr4ZVg=",
"dev": true,
"requires": {
"babel-plugin-constant-folding": "1.0.1",
"babel-plugin-dead-code-elimination": "1.0.2",
"babel-plugin-eval": "1.0.1",
"babel-plugin-inline-environment-variables": "1.0.1",
"babel-plugin-jscript": "1.0.4",
"babel-plugin-member-expression-literals": "1.0.1",
"babel-plugin-property-literals": "1.0.1",
"babel-plugin-proto-to-assign": "1.0.4",
"babel-plugin-react-constant-elements": "1.0.3",
"babel-plugin-react-display-name": "1.0.3",
"babel-plugin-remove-console": "1.0.1",
"babel-plugin-remove-debugger": "1.0.1",
"babel-plugin-runtime": "1.0.7",
"babel-plugin-undeclared-variables-check": "1.0.2",
"babel-plugin-undefined-to-void": "1.1.6",
"babylon": "5.8.38",
"bluebird": "2.11.0",
"chalk": "1.1.3",
"convert-source-map": "1.5.1",
"core-js": "1.2.7",
"debug": "2.6.9",
"detect-indent": "3.0.1",
"esutils": "2.0.2",
"fs-readdir-recursive": "0.1.2",
"globals": "6.4.1",
"home-or-tmp": "1.0.0",
"is-integer": "1.0.7",
"js-tokens": "1.0.1",
"json5": "0.4.0",
"lodash": "3.10.1",
"minimatch": "2.0.10",
"output-file-sync": "1.1.2",
"path-exists": "1.0.0",
"path-is-absolute": "1.0.1",
"private": "0.1.8",
"regenerator": "0.8.40",
"regexpu": "1.3.0",
"repeating": "1.1.3",
"resolve": "1.5.0",
"shebang-regex": "1.0.0",
"slash": "1.0.0",
"source-map": "0.5.7",
"source-map-support": "0.2.10",
"to-fast-properties": "1.0.3",
"trim-right": "1.0.1",
"try-resolve": "1.0.1"
}
},
"babylon": {
"version": "5.8.38",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz",
"integrity": "sha1-7JsSCxG/bM1Bc6GL8hfmC3mFn/0=",
"dev": true
},
"broccoli-babel-transpiler": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/broccoli-babel-transpiler/-/broccoli-babel-transpiler-5.7.3.tgz",
"integrity": "sha512-MnNWRoijJ+/yfaxNQ7zyd74i+Z1AQxZTDrkc9/eeSOVfcsUPVbItyvrhHAY8BVG9VCHCqBVLW9lDNj2dg/pRDg==",
"dev": true,
"requires": {
"babel-core": "5.8.38",
"broccoli-funnel": "1.2.0",
"broccoli-merge-trees": "1.2.4",
"broccoli-persistent-filter": "1.4.3",
"clone": "0.2.0",
"hash-for-dep": "1.2.3",
"heimdalljs-logger": "0.1.9",
"json-stable-stringify": "1.0.1",
"rsvp": "3.6.2",
"workerpool": "2.3.0"
},
"dependencies": {
"clone": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
"integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=",
"dev": true
}
}
},
"core-js": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
"integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=",
"dev": true
},
"detect-indent": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-3.0.1.tgz",
"integrity": "sha1-ncXl3bzu+DJXZLlFGwK8bVQIT3U=",
"dev": true,
"requires": {
"get-stdin": "4.0.1",
"minimist": "1.2.0",
"repeating": "1.1.3"
}
},
"ember-cli-babel": {
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/ember-cli-babel/-/ember-cli-babel-5.2.4.tgz",
"integrity": "sha1-XOT0awjtb20h6Hhhn7aJcZ1ujhM=",
"dev": true,
"requires": {
"broccoli-babel-transpiler": "5.7.3",
"broccoli-funnel": "1.2.0",
"clone": "2.1.1",
"ember-cli-version-checker": "1.3.1",
"resolve": "1.5.0"
}
},
"ember-cli-version-checker": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ember-cli-version-checker/-/ember-cli-version-checker-1.3.1.tgz",
"integrity": "sha1-C8LRNMgwFC2mS/lieg7e0QthrnI=",
"dev": true,
"requires": {
"semver": "5.5.0"
}
},
"globals": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/globals/-/globals-6.4.1.tgz",
"integrity": "sha1-hJgDKzttHMge68X3lpDY/in6v08=",
"dev": true
},
"home-or-tmp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-1.0.0.tgz",
"integrity": "sha1-S58eQIAMPlDGwn94FnavzOcfOYU=",
"dev": true,
"requires": {
"os-tmpdir": "1.0.2",
"user-home": "1.1.1"
}
},
"js-tokens": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-1.0.1.tgz",
"integrity": "sha1-zENaXIuUrRWst5gxQPyAGCyJrq4=",
"dev": true
},
"json5": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-0.4.0.tgz",
"integrity": "sha1-BUNS5MTIDIbAkjh31EneF2pzLI0=",
"dev": true
},
"lodash": {
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
"integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
"dev": true
},
"minimatch": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
"integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
"dev": true,
"requires": {
"brace-expansion": "1.1.8"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
"repeating": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-1.1.3.tgz",
"integrity": "sha1-PUEUIYh3U3SU+X93+Xhfq4EPpKw=",
"dev": true,
"requires": {
"is-finite": "1.0.2"
}
},
"source-map-support": {
"version": "0.2.10",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.10.tgz",
"integrity": "sha1-6lo5AKHByyUJagrozFwrSxDe09w=",
"dev": true,
"requires": {
"source-map": "0.1.32"
},
"dependencies": {
"source-map": {
"version": "0.1.32",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz",
"integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=",
"dev": true,
"requires": {
"amdefine": "1.0.1"
}
}
}
}
"ember-cli-babel": "6.11.0",
"ember-deep-set": "0.1.3"
}
},
"ember-changeset-validations": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/ember-changeset-validations/-/ember-changeset-validations-1.2.8.tgz",
"integrity": "sha512-OJ9MpveBS77g60OSJQ812HnaIapzfzezBUI2/kjQ+Xo0fmPMUstlt1ylcejjy0BZ9V3KNRMGUbeBLBNm0BMp+Q==",
"version": "1.2.11",
"resolved": "https://registry.npmjs.org/ember-changeset-validations/-/ember-changeset-validations-1.2.11.tgz",
"integrity": "sha1-t2nDVX9C+uBTmIafOQQgDiGgBdc=",
"dev": true,
"requires": {
"ember-changeset": "1.3.0",
"ember-changeset": "1.4.2-beta.1",
"ember-cli-babel": "6.11.0",
"ember-cli-htmlbars": "1.3.4",
"ember-validators": "1.0.4"
"ember-get-config": "0.2.4",
"ember-validators": "1.1.1"
},
"dependencies": {
"ember-changeset": {
"version": "1.4.2-beta.1",
"resolved": "https://registry.npmjs.org/ember-changeset/-/ember-changeset-1.4.2-beta.1.tgz",
"integrity": "sha1-xtdQo+ZoL0oH8B0iHqzYkLIuclA=",
"dev": true,
"requires": {
"ember-cli-babel": "6.11.0",
"ember-deep-set": "0.1.3"
}
},
"ember-cli-htmlbars": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/ember-cli-htmlbars/-/ember-cli-htmlbars-1.3.4.tgz",
@ -4788,6 +4595,15 @@
}
}
},
"ember-deep-set": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ember-deep-set/-/ember-deep-set-0.1.3.tgz",
"integrity": "sha1-hS288YlBnTPlevck/y1tj0BNe3M=",
"dev": true,
"requires": {
"ember-cli-babel": "6.11.0"
}
},
"ember-element-resize-detector": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/ember-element-resize-detector/-/ember-element-resize-detector-0.1.5.tgz",
@ -6209,9 +6025,9 @@
}
},
"ember-require-module": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ember-require-module/-/ember-require-module-0.1.3.tgz",
"integrity": "sha1-+C9gVSFCF5FS0o7Jfr112WfK4dw=",
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/ember-require-module/-/ember-require-module-0.2.0.tgz",
"integrity": "sha512-groO9qBniJPjG1Z/wMZAYvZxhUR86iL+9wSncTDM7kL+WtdgbrcUXwazStIQOv3GeuqJ9rVt1gWKXvHlfWXUMg==",
"dev": true,
"requires": {
"ember-cli-babel": "6.11.0"
@ -6503,13 +6319,13 @@
}
},
"ember-validators": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/ember-validators/-/ember-validators-1.0.4.tgz",
"integrity": "sha1-fYnCURlFxSvSDFOE5xUTj5AhM7s=",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ember-validators/-/ember-validators-1.1.1.tgz",
"integrity": "sha1-NLBvfEveTlfDDLnfxlZmR8HBQME=",
"dev": true,
"requires": {
"ember-cli-babel": "6.11.0",
"ember-require-module": "0.1.3"
"ember-require-module": "0.2.0"
}
},
"ember-weakmap": {

View file

@ -17,8 +17,8 @@
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-changeset": "1.3.0",
"ember-changeset-validations": "1.2.8",
"ember-changeset": "1.5.0-beta.0",
"ember-changeset-validations": "1.2.11",
"ember-cli": "^2.16.2",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.6.0",