1
0
Fork 0
Commit Graph

717 Commits (4383d15c5a375b7e189888aa22f198557997db47)

Author SHA1 Message Date
Mike Gerwitz 9b3ca7a90a Server: Fix botched logging of metadata promise error
* src/server/Server.js (_monitorMetadataPromise): Fix/remove invalid
  references.
2017-08-10 09:52:07 -04:00
Mike Gerwitz c1b6f796fe Add `quote' Data API type
* src/dapi/DataApiFactory.js (_createDataApi): Add support for
  `quote'.
* src/dapi/http/HttpDataApi.js (__construct): New `enctype' argument.
  (_encodeData, _encodeKeys): Remove former, rename latter to former.
  (encodeData, _urlEncode): Encode based on enctype and method.
  (*): Strict mode, es6 style.
2017-08-10 09:52:07 -04:00
Mike Gerwitz d31e12193a Add ResponseApply
* src/dapi/format/ResponseApply.js: Add trait.
* test/dapi/format/ResponseApplyTest.js: Test it.
2017-08-10 09:52:07 -04:00
Mike Gerwitz e2845b72ec RestrictedDataApi#request: Make virtual
This is a bug (as this prohibits mixin overrides).

* src/dapi/RestrictedDataApi.js (#request): Make method virtual.
2017-08-10 09:52:07 -04:00
Mike Gerwitz 020ca01458 HttpDataApi: Only serialize JSON on POST
* src/dapi/http/HttpDataApi.js (_encodeKeys): JSON.stringify on POST.
* test/dapi/http/HttpDataApiTest.js: Update tests accordingly.
  Add POST test.
2017-08-10 09:52:07 -04:00
Mike Gerwitz ae9c293518 DataApi: Update docblock and strict mode
This just updates the file a bit and provides a more specific
docblock (as used in HttpDataApi).

* src/dapi/DataApi.js: strict mode and var=>const.
  (request): Docblock update for params.
2017-08-10 09:52:07 -04:00
Mike Gerwitz 47cb736387 Add QuoteDataApi 2017-08-10 09:52:03 -04:00
Mike Gerwitz 4b04360b0d DummyDataApi: Add test class.
* test/dapi/DummyDataApi.js: Add class.
2017-08-07 11:34:22 -04:00
Mike Gerwitz 4522525260 DataApi#request data param docblock correction
* src/dapi/DataApi.js (#request): Correct docblock for `data' param.
2017-08-04 11:45:24 -04:00
Mike Gerwitz b204ef652d Version 1.2.{3=>4} version bump 2017-07-31 10:32:17 -04:00
Mike Gerwitz 39d4e20e92 Add temporary ITableDialog for ColumnLink workaround
I'm still waiting to release GNU ease.js 0.2.9 because I still (after
months) am trying to secure a copyright waiver from my employer.  The
bugs affecting this were fixed back in December!

This works around the issue of traits extending named classes, and
some internal issues with extending constructors defined by the system
for traits.

https://mikegerwitz.com/projects/easejs/commit/?id=e93f3a70f9a699f1577df6ce3ba9201b2ea97542

So, this commit is temporary; revert after 0.2.9.

* src/ui/dialog/ITableDialog.js: Add interface (temporarily).
* src/ui/dialog/ColumnLink.js: Use it.
2017-07-31 10:26:24 -04:00
Mike Gerwitz f4a34fc369 Version bump 1.2.{2=>3} 2017-07-25 16:07:25 -04:00
Mike Gerwitz 5bd6920588 ProcessManager: SIGHUP reinit method call fix
* src/server/rater/ProcessManager.js (init): Fix re-init method
  call (still referenced `exports'; has since been refactored into a
  class).
2017-07-25 16:06:41 -04:00
Mike Gerwitz 85640ca44b v1.2.{1=>2} version bump 2017-07-21 15:23:44 -04:00
Mike Gerwitz 229a356a9a Do not convert non-truthy dapi return values to empty string
* src/dapi/DataApiManager.js (getDataExpansion): Explicit undefined
  check before triggering default (empty string).
* test/dapi/DataApiManagerTest.js: Add associated test cases.
2017-07-21 15:20:55 -04:00
Mike Gerwitz 1d8d382b4d Add missing test for previous commit
Oops.

* test/server/quote/ProgramQuoteCleanerTest.js: Add missing test for
  empty program.meta.
2017-07-14 15:19:35 -04:00
Mike Gerwitz f45198a3ff v1.2.{0=>1} version bump 2017-07-14 15:08:25 -04:00
Mike Gerwitz deeb5648b0 ProgramQuoteCleaner: Handle case of missing meta field data
* src/server/quote/ProgramQuoteCleaner.js (_fixMeta): `program.meta'
  does not exist on programs compiled previous to the proguic update.
2017-07-14 15:07:08 -04:00
Mike Gerwitz eb429323a4 Version bump 1.{1.2=>2.0}
* configure.ac: Update version.
2017-07-13 16:00:16 -04:00
Mike Gerwitz 22507c488a Metadata merging 2017-07-13 15:58:50 -04:00
Mike Gerwitz 2eacd310b2 Process metadata and provide to rate process
Prefixes with "meta:".

* src/server/Server.js (initQuote): Initialze metadata to empty.
* src/server/daemon/controller.js (createQuote): Add metabucket.
* src/server/db/MongoServerDao.js (saveQuote): Add additional
  documentation to docblock.  Save all metadata if no bucket data
  provided (which indicates a full quote save).  This happens on
  version change.
* src/server/rater/ProcessManager.js (_genData): Add method to merge
  metadata into bucket data with "meta:" prefix.
  (byId): Use merged data.
2017-07-10 10:09:24 -04:00
Mike Gerwitz 22c3a21cdf ServerSideQuote: Add metabucket
* src/server/quote/ServerSideQuote.js (_metabucket): Add field.
  (getMetabucket, setMetabucket, setMetadata): Add methods.
2017-07-10 10:09:24 -04:00
Mike Gerwitz 37f84b7da8 Initialize metadata on quote version change
Consequently, on quote load as well.

* src/server/quote/ProgramQuoteCleaner.js (_fixMeta): New method.
  (clean): Use it.
2017-07-10 10:09:22 -04:00
Mike Gerwitz e963761d22 DataProcessor {type=>param} docblock correction
I seem to like messing trivial things up.

* src/server/request/DataProcessor.js (constructor): Docblock fix.
2017-07-06 15:06:57 -04:00
Mike Gerwitz 4d22107a57 Create ProcessManager out of rater/service
* src/server/daemon/Daemon.js (__construct): Reference new class.
* src/server/rater/ProcessManager.js: Add class (extracted from
  service).
* src/server/rater/service.js: Refactored into ProcessManager.
2017-07-06 15:06:57 -04:00
Mike Gerwitz 00f457d3d8 DataProcessor code formatting fix (= alignment)
Was bugging the hell out of me.

* src/server/request/DataProcessor.js (constructor): Align `='s.
2017-07-06 15:06:57 -04:00
Mike Gerwitz 7e4d872db2 Rating s/thread/process/ terminology fix
It never was a thread; it's always been a process.

* src/server/rater/thread.js: Renamed.
* src/server/rater/process.js: Renamed from thread.js.
* src/server/rater/service.js: s/thread/process/.
2017-07-06 15:06:55 -04:00
Mike Gerwitz d961a16420 Shorten "unlock quote" string
A bit arbitrary, but it contains text that's coupled to the layout of
the UI, and it usually pushes the button down off of the bar.

* src/client/Client.js (_showLockedNotification): Remove end of
  "unlock quote" string.
2017-07-05 16:01:15 -04:00
Mike Gerwitz 81a829549c Remove accidentally committed console.log on script filename
* src/server/daemon/scripts.js: Remove console.log.
2017-07-05 11:40:27 -04:00
Mike Gerwitz 5456f32446 Version bump 1.1.{1=>2}
* configure.ac: Update revision number.
2017-06-29 16:23:10 -04:00
Mike Gerwitz c20fbbeded Rename {Rating=>Calc}Worksheet
The class was renamed, but not the file.  Whoops.

* src/ui/worksheet/CalcWorksheet.js: Rename from RatingWorksheet.js.
* src/ui/worksheet/RatingWorksheet.js: Remove file.
2017-06-29 16:21:48 -04:00
Mike Gerwitz c0d0f4b463 Revert CapturedUserResponse temporarily
This reverts CapturedUserResponse to the state it was in prior to
being extracted into liza.  The issue was supposed to have been
resolved by now, but I haven't wanted to make an ease.js release until
the company that bought the company I work for signs the copyright
waiver.  Which has been slow-going, to say the least.

The problem is that it is not recognizing a named trait extending a
class as a parameterized trait (it's not seeing __mixin).

* src/server/request/CapturedUserResponse.js: Use interface.
* src/server/request/IProtUserResponse.js: Add temporary interface.
2017-06-29 15:57:22 -04:00
Mike Gerwitz e1458ce955 Version 1.1.{0=>1} bump 2017-06-29 14:19:19 -04:00
Mike Gerwitz 0401860377 Cast value to string before validating
* src/validate/BucketDataValidator.js (_forEach): Cast data to string
  before passing to formatter, which expects a string.
2017-06-29 14:18:01 -04:00
Mike Gerwitz 37cb6716de 1.{0=>1}.0 version bump 2017-06-29 11:01:23 -04:00
Mike Gerwitz 18cd46c87b doc/Makefile.am (liza_TEXINFOS): Add missing license.texi 2017-06-29 11:01:23 -04:00
Mike Gerwitz 35af4bdf19 Server-side Data API support
The Data API stuff is pretty well coupled to the concept of a UI, and
the code is a mess that was just extracted from Program.js, so this
isn't the prettiest implementation.  I hope that we'll have more time
for it in the somewhat-near future, since this is going to be core to
all server-side network requests for data.
2017-06-29 10:50:02 -04:00
Mike Gerwitz 0c24e3d280 Populate document metadata using Data APIs
What a cluster.

This was a lot of work to work around existing, bad APIs; there is no
time to refactor at the moment; this already took much longer than
expected.
2017-06-28 16:33:24 -04:00
Mike Gerwitz 65ab92f701 Add SpoofedNodeHttpImpl
Session spoofing is needed for making authenticated requests.
2017-06-28 15:51:18 -04:00
Mike Gerwitz d47d77bb5e Add server.meta.DapiMetaSource
Encapsulates the nasty.

* src/server/meta/DapiMetaSource.js: Add class.
* test/server/meta/DapiMetaSourceTest.js: Add test case.
2017-06-28 14:56:28 -04:00
Mike Gerwitz b3f8ed96dd Fix typo in RestrictedDataApi error
* src/dapi/RestrictedDataApi.js (_requestParamCheck): Unknown param
  error typo fix.
2017-06-28 14:56:28 -04:00
Mike Gerwitz 95c28d4db4 Extract Server construction into DocumentServer
* src/server/DocumentServer.js: Add facade.
* src/server/daemon/controller.js: Use it.
2017-06-28 14:56:26 -04:00
Mike Gerwitz 07b5d2f1b6 doc: Began server documentation
* server.texi: Add file.
2017-06-22 13:07:30 -04:00
Mike Gerwitz 630af0a062 Add ability to provide origin to NodeHttpImpl
* src/dapi/http/NodeHttpImpl.js (_parseUrl): Add method.
  (__construct): Add argument.
  (requestData): Use it.

* test/dapi/http/NodeHttpImplTest.js: Add tests.
2017-06-21 13:55:15 -04:00
Mike Gerwitz c231983f34 doc: Add @jsmethod macro
* doc/macros.texi (@jsmethod): Add macro.
2017-06-21 13:20:56 -04:00
Mike Gerwitz f870ca964c doc: Add @todo
* doc/macros.texi (@todo): Add macro.
2017-06-21 13:20:40 -04:00
Mike Gerwitz 5c99243cdc doc: Add beginning of dapi documentation
* doc/Makefile.am (liza_TEXINFOS) [dapi.texi]: Include file.
* doc/dapi.texi: Add file.
* doc/design.texi: Add mention in list and reference chapter.
* doc/liza.texi: Reference chapter.
2017-06-21 10:52:46 -04:00
Mike Gerwitz be0121d8cb doc: Add @progxmlref, @dapi, @procguic{,x}ref, @proguicrefsuffix
* doc/macros.texi (@progxmlref, @dapi, @progcuicref, @proguicxref
  @proguicrefsuffix): Add macros.
2017-06-21 10:52:46 -04:00
Mike Gerwitz f873da0928 doc: Add @srcrefjs macros
* doc/macros.texi (srcrefjs): Add macros when src is both available and not
2017-06-21 10:52:46 -04:00
Mike Gerwitz 83b5f1ab74 doc: Update @helpwanted text
* doc/macros.texi (helpwanted): Adjust phrasing to account for some existing text.
2017-06-21 10:52:46 -04:00