1
0
Fork 0
Data collection, validation, and processing framework for JavaScript [archive]
 
 
 
 
 
 
Go to file
Mike Gerwitz 68649dfd9b [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls
This mixes in support for non-terminating nulls.  It would have been
nice to handle that in a separate commit for clarity, but the
refactoring came as a consequence of trying to provide a working
implementation.

Various inconsistencies and subtle bugs in unlikely situations have
been fixed by this, including modifying objects passed as arguments to
various methods, and inconsistent handling of diff data.

Changes are more consistently recognized.  Perhaps the most noticeable
consequence is that moving between steps no longer prompts to discard
changes---previously calculated values would trigger the dirty flag on
steps even if the user didn't actually change anything.  I (and
others) have wanted this fixed for many years.

This is a very dense commit that touches a core part of the
system.  Hopefully the Changelog below helps.

* src/bucket/Bucket.js
  (setValues): [BC-BREAK] Remove parameters `merge_index' and
    `merge_null' parameters.
* src/bucket/DelayedStagingBucket.js
  (setValues): [BC-BREAK] Remove `merge_index' and `merge_null
    parameters.  Remove distinction between `merge_index' and non-.
* src/bucket/QuoteDataBucket.js
  (setValues): [BC-BREAK] Remove `merge_index' and `merge_null
    parameters.  Remove respective arguments from `_mergeData' call.
  (_mergeData): Remove same parameters.  Remove handling of
    `merge_index' and `merge_null'.
  (overwriteValues): Append `null' to each vector.
* src/bucket/StagingBucket.js
  (_initState): Use `Object.create' instead of explicit prototype
    instantiation (functionally equivalent).
  (merge): Minor comment correction.
  (_hasChanged): Rename to `_parseChanges'.
  (_parseChanges): Rename from `_hasChanged'.  Remove `merge_index'
    parameter.  Generate new object rather than mutation original
    data (prevent dangerous and subtle bugs from side-effects).  Clone
    each vector rather than modifying/referencing directly (this was
    previously done during merge).  Remove `merge_index'
    distinction.  Handle non-terminating `null' values.
  (setValues): [BC-BREAK] Remove `merge_index' and `merge_null'
    parameters.  Use new object generated by `_parseChanges'.  Remove
    cloning of each vector (`_parseChanges' now does that).  Remove
    `merge_index' distinction.
  (overwriteValues): Remove argument to `setValues' call.
  (getFilledDiff): [BC-BREAK] Use `_staged' rather than `_curdata'.
  (commit): Remove second and third arguments of call to `setValues'
    of underlying bucket.
* src/client/Client.js
  (_initStepUi): Remove second argument of calls to quote `setData'.
* src/client/quote/ClientQuote.js
  (setData): [BC-BREAK] Remove `merge_nulls' parameter.  Remove second
    and third arguments of call to staging bucket `setValues'.  Add
    comment indicating a long-standing problem with committing the
    staging bucket contents before save has succeeded.
* src/server/request/DataProcessor.js
  (processDiff): Remove `permit_null' argument of `sanitizeDiff'
    call.
  (sanitizeDiff): Remove `permit_null' parameter.  Hard-code filter
    call's `permit_null' argument to `true'.
  (_determineDapiFields): Properly handle `null's (ignore) rather than
    inadvertently converting them into the string "null".
* test/bucket/StagingBucketTest.js: Modify test cases
    accordingly.  Add tests to verify that updates and diffs operate
    as expected, especially support for non-terminating `null's.
  (createStubBucket): Use `QuoteDataBucket'.  Ideally remove this
    coupling in the future, but this is a more realistic test case for
    the time being.
* test/server/request/DataProcessorTest.js: Update test to account for
    hard-coded `given_null' argument.
2017-09-06 09:03:45 -04:00
bin Add bin/server to invoke server using configure'd node 2017-08-29 14:56:13 -04:00
build-aux Generate version number from git state 2017-08-15 15:18:21 -04:00
conf [BC BREAK] bin/server.js and associated changes 2017-08-29 14:56:10 -04:00
doc doc: Fix bin/server reference under Server 2017-08-31 11:04:41 -04:00
src [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls 2017-09-06 09:03:45 -04:00
test [DEV-2692] [BC-BREAK] Bucket stability and consistency fixes and non-term nulls 2017-09-06 09:03:45 -04:00
tools LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
.gitignore Add bin/server to invoke server using configure'd node 2017-08-29 14:56:13 -04:00
.gitlab-ci.yml Only publish GitLab pages for tags 2017-08-23 14:29:51 -04:00
COPYING Placeholder README.md and license 2014-01-16 11:44:02 -05:00
COPYING.AGPL Near-complete liberation of liza 2017-06-08 14:38:28 -04:00
Makefile.am Add missing bin/server.js to distribution 2017-09-01 16:11:22 -04:00
README.hacking LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
README.md README.md: Add all compiled doc formats 2017-08-23 15:35:03 -04:00
autogen.sh LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
configure.ac configure.ac: Fix bin/server chmod (apply only to bin/server) 2017-09-01 15:38:13 -04:00
index.js LoVullo Associates => R-T Specialty 2017-06-08 14:48:43 -04:00
npm-shrinkwrap.json Add lock files for npm and yarn 2017-06-08 14:57:49 -04:00
package.json.in package.json: postinstall ./configure 2017-09-01 16:20:20 -04:00
yarn.lock Add missing mongodb dependency 2017-06-20 14:17:03 -04:00

README.md

Liza Data Collection Framework

Liza is a data collection, validation, and processing framework for JavaScript.

About

The Liza Data Collection Framework—"Liza" for short—is an effort to clean up, formalize, and expand upon a framework that was developed at RT Specialty / LoVullo for collecting, validating, and processing large amounts of user input for insurance quoting.

Configuring

If your distribution does not contain a `configure' file in the project root, then you likely have the sources as committed to the project repository; you may generate the script by issuing the following command:

  $ ./autogen.sh

You may then see ./configure --help for more information.

Documentation

Compiled documentation for the latest release is available via our GitLab mirror, which uses the same build pipeline as we do on our internal GitLab instance. Available formats are:

License

Liza is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The liza server is licensed differently: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The full licenses are available in COPYING and COPYING.AGPL.