Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DEV-5657] Check for TLD in email addressesJoseph Frazer2019-09-121-0/+63
| | | | | The DocuSign service rejects email addresses without a TLD, even though they are valid.
* Copyright range updateMike Gerwitz2019-08-3013-13/+13
| | | | | All files now have the same range, beginning from the conception of this project.
* LoVullo Associates => R-T SpecialtyMike Gerwitz2017-06-0813-13/+13
| | | | | | | | | | Copyright notices updated. More casual references to "LoVullo Associates" replaced with "RT Specialty / Lovullo", which will be "RT Specialty Buffalo" in the future. Or "RT Specialty", depending on how this is rolled out. Or "Ryan Specialty Group". Who knows. "R-T Specialty, LLC." is the legal name, which includes the dash. Not to be confused with a certain television network.
* ValidStateMonitor: Consider scalar diff to affect all indexesMike Gerwitz2017-03-171-0/+43
| | | | | | | | | | | Classifications often yield scalar results. Since those results are used directly in the diff, we have the situation where the expected diff format (an array) is not provided. Consistent with the rest of the system, we should consider a scalar to affect every index. * src/validate/ValidStateMonitor.js (_checkCauseFix): Consider scalar diffs to affect every index when checking for fixes. * test/validate/ValidStateMonitorTest.js: Add test.
* ValidStateMonitorTest: remove accidental `debugger'Mike Gerwitz2017-02-221-1/+0
| | | | | | Didn't mean for this to be committed. * test/validate/ValidStateMonitorTest.js: Remove `debugger'.
* DataValidator: properly chain queueMike Gerwitz2017-02-211-18/+20
| | | | | | | | | This was not properly chain the promises---it was always chaining on the original _pending (so, the first request) and never clearing _pending after that point. * src/validate/DataValidator.js (_onceReady): Properly chain. * test/validate/DataValidatorTest.js: Updated test. Don't ask.
* DataValidator: Hold concurrent requestsMike Gerwitz2017-02-171-0/+36
| | | | | | | | | | | | | Since we maintain state (as a kluge for the time being to integrate with the rest of the system), we need to be careful to protect against concurrent requests that might mess with it before the original request is complete. * src/validate/DataValidator.js (validate, updateFailures): Hold concurrent requests. (_onceReady): Add method. * test/validate/DataValidatorTest.js: Add tests.
* Revert "DataValidator: Always clear store state"Mike Gerwitz2017-02-161-37/+0
| | | | | | | This breaks everything. :x This reverts commit e0c2e4dc861d523c40b2d35a242e48b8b7c99662, reversing changes made to e610372c8443ba5c5e73ed0791e642d82772d5cd.
* DataValidatorTest: Extract boilerplate instantiation (cleanup)Mike Gerwitz2017-02-161-51/+46
| | | | | | | | Tidy up a little bit; this thing is a mess and hard to work with. * test/validate/DataValidatorTest (createStubs): Add function. Use it.
* Add missing #updateFailures testMike Gerwitz2017-02-161-0/+52
| | | | | | Not sure how this was missing...! * test/validate/DataValidatorTest.js: Add test.
* DataValidator: Queue validations when incompleteMike Gerwitz2017-02-161-0/+65
| | | | | | | | | * src/validate/DataValidator.js (validate): If a validation is ongoing, queue requests. * test/validate/DataValidatorTest.js: Add test. DEV-2299
* DataValidator: Always clear store stateMike Gerwitz2017-02-131-0/+39
| | | | | | | | | | | | | In practice, not clearing the store and allowing it to use previous state has the effect of instantly "fixing" failures if there happens to be more than one validation call. This was a log of debugging for a one-line change. * src/validate/DataValidator.js (_populateStore): Always clear store. * test/validate/DataValidatorTest.js: Add test. DEV-2299
* DataValidator, ValidStateMonitor: Add #clearFailures argumentMike Gerwitz2017-02-082-5/+56
| | | | | | | | | | | | | | This allows clearing only the specified failures. * src/validate/ValidStateMonitor.js (clearFailures): Add `fields' argument. Make method more concise. (_fixFailure): Handle clearing `_failures' record. * src/validate/DataValidator.js (clearFailures): Add `fields' argument. * test/validate/ValidStateMonitorTest.js: Add test. * test/validate/DataValidatorTest.js: Add test.
* DataValidator, ValidStateMonitor: Add #clearFailuresMike Gerwitz2017-02-022-0/+53
| | | | | | | | * src/validate/DataValidator.js (clearFailures): Add public method. * test/validate/DataValidatorTest.js: Add #clearFailures test. * src/validate/ValidStateMonitor.js (clearFailures): Add public method. * test/validate/ValidStateMonitorTest.js: Add #clearFailures test.
* DataValidator: accept classification resultsMike Gerwitz2017-01-301-8/+66
| | | | | | | | | | | | | * src/validate/DataValidator.js (validate): New `classes' parameter. API BC break from previous commits. (populateStore, updateFailures): Generalize methods. * test/validate/DataValidatorTest.js: Add associated test. Refactor existing tests to adhere to new API/expectations. DEV-2206
* ValidStateMonitor: handle empty diff on past failureMike Gerwitz2017-01-301-0/+19
| | | | | | | | | | | | See the description in the test case. This is a bug fix. * src/validate/ValidStateMonitor.js (_checkCauseFix): Do not consider an empty diff on a past failure to be a fix. * test/validate/ValidStateMonitorTest.js: Add test. DEV-2296
* Integrate Store into DataValidator, ValidStateMonitorMike Gerwitz2017-01-292-262/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ValidStateMonitor now uses a Store in place of the original primitive object-based diff format. The original format is translated by DataValidator. The code is in a transitional state, and considering the amount of time we spend on various areas of this project, will likely stay this way for a while. * src/validate/DataValidator.js (__construct): Accept Store factory parameter. (_store_factory): Add field. (_createStores): Add method. (_validate): Handle Store. (updateFailures): Add method. (_populateStore): Add method. * test/validate/DataValidatorTest.js: Add tests. * src/validate/ValidStateMonitor.js (update): Enforce Store diff. Wait to process failures until fixes are calculated. (_checkFailureFix): Handle asynchronous, Promise-based diff. (_checkCauseFix): Extract logic from _checkCauseFix. * test/validate/ValidStateMonitorTest.js: Modify test cases to be Promise-based and handle async calls where appropriate. That was a friggin' expensive mess. DEV-2296
* Add DataValidatorMike Gerwitz2017-01-271-0/+183
| | | | | | | | | | This extracts some gross code from Client in the rating-fw repo, which is responsible for gluing change validations together. * src/validate/DataValidator.js: Add class. * test/validate/DataValidatorTest.js: Add test case. DEV-2296
* ValidStateMonitor#update return PromiseMike Gerwitz2017-01-271-52/+96
| | | | | | | | | | Stepping stone to async. fix checks. * src/validate/ValidStateMonitor.js (update, detectFixes, _checkFailureFix): Return Promise. * test/validate/ValidStateMonitorTest.js: Update to use promises. DEV-2296
* Replace Currency formatter with StringFormatMike Gerwitz2016-12-012-60/+115
| | | | | | | | | | This is a much more general solution. * src/validate/formatter/Currency.js: Remove trait. * test/validate/formatter/CurrencyTest.js: Remove test case. * src/validate/formatter/StringFormat.js: Add trait. * test/validate/formatter/StringFormatTest.js: Add test case.
* Validate correct Number formatMike Gerwitz2016-12-011-0/+8
| | | | | | | * src/validate/formatter/Number.js (parse): Validate number format. * test/validate/formatter/NumberTest.js: Modify accordingly.
* Add scale to Number formatterMike Gerwitz2016-12-011-0/+43
| | | | | | | | | | * src/validate/formatter/Number.js (__mixin): Add mixin ctor. (parse): Handle scale. (styleNumber): Handle scale. (scale, split): Add methods. * test/validate/formatter/NumberTest.js: Modified accordingly.
* Add Currency formatterMike Gerwitz2016-11-281-0/+60
| | | | | * src/validate/formatter/Currency.js: Add trait. * test/validate/formatter/CurrencyTest.js: Add test case.
* Add MultiDimension formatterMike Gerwitz2016-06-281-0/+109
| | | | | * src/validate/formatter/MultiDimension.js: Added * test/validate/formatter/MultiDimensionTest.js: Added
* Add accept/reject stylerMike Gerwitz2016-06-281-0/+93
| | | | | * src/validate/formatter/AcceptReject.js: Added. * test/validate/formatter/AcceptRejectTest.js: Added.
* Add Limit formatterMike Gerwitz2016-06-271-0/+68
| | | | | * src/validate/formatter/insurance/Limit.js: Added * test/validate/formatter/insurance/LimitTest.js: Added
* Add Number formatterMike Gerwitz2016-06-271-0/+50
| | | | | * src/validate/formatter/Number.js: Added * test/validate/formatter/NumberTest.js: Added
* Add MultiDelimited formatter traitMike Gerwitz2016-06-271-0/+71
| | | | | | | | This will simplify, through composition, a number of other validator-formatters. * src/validate/formatter/MultiDelimited.js: Added * test/validate/formatter/MultiDelimitedTest.js: Added
* UnorderedList{Formatter=>} now a traitMike Gerwitz2016-06-241-5/+16
| | | | | | | | | | | This adds a great deal of flexibility through composition via trait stacking. * src/validate/formatter/UnorderedList.js: Renamed from UnorderedListFormatter; now a trait. * test/validate/formatter/UnorderedListTest.js: Renamed from UnorderedListFormatterTest and adjusted to instantiate trait.
* Add mixin testing to common vformat functionsMike Gerwitz2016-06-231-1/+46
| | | | * test/validate/formatter/common.js (testMixin): Added.
* Add EchoFormatterMike Gerwitz2016-06-231-0/+65
| | | | | * src/validate/formatter/EchoFormatter.js: Added. * test/validate/formatter/EchoFormatterTest.js: Added.
* Liberated UnorderedListFormatterMike Gerwitz2016-06-231-0/+141
| | | | | | | | These have been refacored from the original: rather than abusing what is now the PatternFormatter, it is now its own class. * src/validate/formatter/UnorderedListFormatter.js: Added. * test/validate/formatter/UnorderedListFormatterTest.js: Added.
* Liberate common validator-formatter test functionMike Gerwitz2016-06-231-0/+95
| | | | | | | This has been modified from the original to use Chai instead of the `assert' module. * test/validate/formatter/common.js: Added.
* VFormat => PatternFormatter with added interfaceMike Gerwitz2016-06-221-4/+13
| | | | | | | * src/validate/ValidatorFormatter.js: Interface added. * src/validate/formatter/PatternFormatter.js: Renamed from ../VFormat.js. * test/validate/formatter/PatternFormatterTest.js: Renamed from ../VFormatTest.js.
* Liberate VFormatMike Gerwitz2016-06-221-0/+115
| | | | | | | This will likely undergo some refactoring. * src/validate/VFormat.js: Added. * test/validate/VFormatTest.js: Added.
* ValidStateMonitor: merge subsequent failures before fixesMike Gerwitz2016-04-281-0/+44
| | | | | | | | | * src/validate/ValidStateMonitor.js (mergeFailures): Another error on a field that previously failed will no longer overwrite the previous failure, which caused issue when the causes changed (leaving fields potentially unfixed). * test/validate/ValidStateMonitorTest.js: Respective tests added.
* Add Failure#mergeMike Gerwitz2016-04-281-0/+40
| | | | | * src/validate/Failure.js (merge): Added * test/validate/FailureTest.js: Respective tests added
* Support multiple validation failure causesMike Gerwitz2016-04-212-14/+61
| | | | | | | | | | | * src/validate/Failure.js (__construct): Takes an array of causes. (getCauses): Now returns an array of causes. * src/validate/ValidStateMonitor.js: Recognize fixes on array of causes. * test/validate/FailureTest.js: Updated * test/validate/ValidStateMonitorTest.js: Updated
* Consider field failure cause when checking fixesMike Gerwitz2016-04-201-0/+60
| | | | | | | This maintains BC with the old string-based system. * src/validate/ValidStateMonitor.js (_getCause): Added. (detectFixes): Consider failure cause if available when checking for fixes.
* Ensure that Failure objects will work transparently in ValidStateMonitorMike Gerwitz2016-04-201-32/+70
| | | | | | | This is to facilitate a transition to Failure without a BC break. * test/validate/ValidStateMonitorTest.js: Ensure that replacing messages with Failure will continue to operate as expected.
* Add validation FailureMike Gerwitz2016-04-201-0/+118
| | | | | * src/validate/Failure.js: Added * test/validate/FailureTtest.js: Added
* No failure event if failures have not changed in ValidStateMonitorMike Gerwitz2016-04-191-0/+16
| | | | | | | * src/validate/ValidStateMonitor.js (mergeFailures): Return count of new failures * test/validate/ValidStateMonitorTest.js: Respective test added
* Add ValidStateMonitorMike Gerwitz2016-04-121-0/+228
The intent is to ultimately replace ClientFieldValidator with this and individual validators that interact with it. * src/validate/ValidStateMonitor.js: Added * test/validate/ValidStateMonitorTest.js: Added