Commit Graph

2478 Commits

Author SHA1 Message Date
Naomi Seyfer
0077bbbb65 Refactoring ordered_dict to reuse linked-list code 2013-02-05 16:27:59 -08:00
David Glasser
d62c8b53a4 Merge branch 'devel' into ddp-pre1
Conflicts:
	packages/livedata/livedata_connection_tests.js
          (needed to fix new test to work with new DDP messages)
2013-02-05 16:16:11 -08:00
Naomi Seyfer
d3d267d95b Deleted dead code from wordplay 2013-02-05 16:15:51 -08:00
David Glasser
5177e0ba1f Don't drop quiescence state on initial connect.
We may have already run a stub before getting 'connected'! (Wordplay does this.)

(The same fix, without test, was already committed to ddp-pre1.)
2013-02-05 16:12:24 -08:00
Naomi Seyfer
2c9017f162 Remove suppression check from observe converters; rename them.
At Glasser's urging
2013-02-05 16:09:38 -08:00
David Glasser
656e74d657 Don't drop quiescence state on initial connect.
We may have already run a stub before getting 'connected'! (Wordplay does this.)
2013-02-05 15:52:02 -08:00
Nick Martin
02ae0734d0 Upgrade jquery-layout to 1.3.0RC. The jquery-latest site recommends it over 1.2.0 despite the RC designation. Fixes #556. 2013-02-05 15:37:52 -08:00
Naomi Seyfer
8b737a7e39 Finish switching over to new observe API in core packages and tests. 2013-02-05 14:26:32 -08:00
David Glasser
cde1f010ae Remove old XXX comment about $elemMatch needing tests. 2013-02-05 12:07:48 -08:00
David Glasser
dd459e10a3 Improve a test (now that its comment is inaccurate). 2013-02-04 18:18:40 -08:00
David Glasser
c476668110 Merge branch 'ddp-pre1-selector-compiler-rewrite' into ddp-pre1
Incorportate the selector compiler rewrite (from devel), making necessary
adjustments based on ddp-pre1's changes.
2013-02-04 18:17:29 -08:00
David Glasser
55a90e1a70 Adapt selector-compiler to ddp-pre1.
Make sure that direct ID comparisons use EJSON.equals.

Now all tests pass.
2013-02-04 18:13:50 -08:00
Tim Haines
a067818553 Adjust accounts-twitter to use Twitter's id_str instead of id 2013-02-04 18:11:03 -08:00
David Glasser
4c2bc76c7e EJSON: Remove serializeForEval method, no longer needed with new selector
compiler.
2013-02-04 17:47:06 -08:00
David Glasser
eaff6f3b00 Merge branch 'devel' into ddp-pre1-selector-compiler-rewrite
Note: some tests fail. Will be resolved before merging to ddp-pre1.

Conflicts:
	packages/minimongo/selector.js
2013-02-04 17:46:22 -08:00
Naomi Seyfer
1ca1f565d1 Partially change observe API to new one
Code now calls addedAt, etc. on ordered observes.
Not yet changed to autodetect observe orderedness by method names.

Tests pass.  Have not changed examples yet, nor docs.
2013-02-04 17:03:29 -08:00
David Glasser
baceda9d65 Merge branch 'selector-compiler-rewrite' into devel
This is a complete rewrite of the Minimongo selector and sort compiler to no
longer use eval, started by @Ed-von-Schleck and finished by @glasser. It makes
the code more readable and no longer requires all queryable types to be
serializable in an eval-able way; the latter will be useful once the in-process
EJSON work on the ddp-pre1 branch is ready.

(It also makes selector compilation faster, though selector evaluation appears
to be very slightly slower.)
2013-02-04 16:42:47 -08:00
David Glasser
3bdf41add1 Rewrite sort compiler to avoid eval, too! 2013-02-04 16:42:18 -08:00
Naomi Seyfer
a866689c6a Escaping in EJSON only goes one level 2013-02-04 16:12:49 -08:00
Naomi Seyfer
d92628020f Refactor Spark to use observeChanges instead of observe
It uses an orderedDict instead of an array, and also this new version happens to
not do a ton of splices, which might help with performance in cases for really
large numbers of items.  Anyway, introduced a dependency on LocalCollection;
will break that soon.
2013-02-04 14:42:45 -08:00
David Glasser
0567a730b1 Rewrite selector compiler against with a "compile to specific function"
approach.
2013-02-04 14:32:12 -08:00
David Glasser
2692192547 Some modifications to Ed-von-Schleck's selector compiler patch:
- Improve regex match against array.
- Improve matching of explicit deep nulls.
- Instead of doing a high-level "catch TypeError", do more explicit
  type checks.
- Clone the selector (since we're going to save a reference in our
  closure).
2013-02-04 14:32:12 -08:00
Christian Schramm
012e1947be Replaced _compileSelector logic with non-eval'd code.
Implement $elemMatch.

(Commits squashed together by glasser, and some now-dead code removed.)
2013-02-04 14:32:12 -08:00
David Glasser
90afe9e9d5 New onError callback to Meteor.subscribe.
This callback receives any terminating error from a subscription. Currently this
can only be because the subscription is unknown, but soon subscriptions will be
able to send other errors.

Also, adjust the semantics of ready callbacks in a reactive context to only call
the latest instance of the callback rather than all callbacks.
2013-02-04 13:20:21 -08:00
Nick Martin
420e50996b Merge pull request #659 from timhaines/update-twitter-api-to-v.1.1
Use Twitter API v1.1 to verify_credentials
2013-02-02 16:46:55 -08:00
Tim Haines
6b8ca56a41 Use Twitter API v1.1 to verify_credentials 2013-02-02 15:57:28 -08:00
Kevin Miller
8faeb1e303 Fixed link to stack overflow in docs. 2013-02-01 23:53:32 -08:00
David Glasser
78b5ee5e7d When a stream is force-disconnected, don't restart its heartbeat timer.
Accomplish this in two ways:
  - Explicitly making sure not to restart the timer on disconnected streams.
  - Run the "restart heartbeat" code before processing incoming messages,
    not after, since even the "failed" message that caused a disconnect
    was running the "restart heartbeat" code.
2013-02-01 17:43:44 -08:00
Naomi Seyfer
39fa69e90c Fixed infinite recursion due to missing _suppress_inital 2013-02-01 16:44:05 -08:00
Naomi Seyfer
e1aa360b98 Merge branch 'devel' into ddp-pre1
Now don't require _id to be unset on insert anymore.

Some error handling around duplicate _id

Conflicts:
	packages/minimongo/minimongo.js
	packages/mongo-livedata/collection.js
	packages/mongo-livedata/mongo_livedata_tests.js
2013-02-01 16:10:18 -08:00
Naomi Seyfer
d76562f0fb Docuentation for allowing _id to be spec by the user 2013-02-01 15:24:45 -08:00
Naomi Seyfer
031d4dc103 Stop requiring _id to be specified by the insert() code.
Now users can put _id into their documents prior to insert, and insert() will
respect that.  This is useful if you want to write any Meteor Method that inserts
documents -- it allows you to have the same ID on both client and server, so you
don't get flicker when the server document wins
2013-02-01 15:24:45 -08:00
Nick Martin
6c849f72a2 Merge branch 'pr-615' into devel 2013-02-01 15:22:33 -08:00
Nick Martin
fb3aafc794 Rework text a bit. 2013-02-01 15:22:01 -08:00
Miles Matthias
b013c573ea Adding documentation explaining Collections in the introductory Data section, fixes #149. 2013-02-01 15:07:51 -08:00
Nick Martin
514bf73807 Move serverId to __meteor_runtime_config__. This prevents a race condition where the server restarts between when the client loads app.html and when it makes a DDP connection. Fixes #653. Thanks @awwx! 2013-02-01 12:21:08 -08:00
Naomi Seyfer
4599e03133 observeChanges for invalidating instead of observe 2013-02-01 11:45:53 -08:00
Nick Martin
df93f65bb3 Merge branch 'pr-628' into devel 2013-02-01 11:21:17 -08:00
Nick Martin
48010de100 Comment on app.manifest exclusion. 2013-02-01 11:20:22 -08:00
Andrew Wilcox
0fcb503fa4 also exclude app.manifest from returning app_html 2013-02-01 11:15:59 -08:00
Naomi Seyfer
3d2573ecab Glasser comments on ordered_dict 2013-01-31 14:21:40 -08:00
Naomi Seyfer
5b4cf240f0 This time actually changing the right ordered_dict 2013-01-31 14:10:54 -08:00
Naomi Seyfer
dc33617804 Writing prose about code; mostly ordereddict 2013-01-31 14:08:22 -08:00
Naomi Seyfer
39f4b5edc2 Fixing the giant comment in diff.js to be descriptive again 2013-01-31 13:54:14 -08:00
Naomi Seyfer
455fcaa14d clean up the diffing code to be simpler logic 2013-01-31 13:48:39 -08:00
David Glasser
d2f1744c87 Merge branch 'devel' into ddp-pre1 2013-01-31 13:34:10 -08:00
Naomi Seyfer
4b9d41e1a1 Stage one in removing the code for old-style observes
Mostly things are now based in observeChanges.  There are still probably
a few places to remove old observe from.
2013-01-31 13:26:35 -08:00
Nick Martin
d71e31b5b5 Make inFiber help pass arguments through. This fixes with_password in meteor deploy/logs/mongo. 2013-01-31 12:24:42 -08:00
David Glasser
0e8e2ff95a Merge branch 'devel' into ddp-pre1 2013-01-31 11:59:20 -08:00
David Glasser
6616d9aac6 Make new less test less sensitive to browser zoom.
Apparently a 1px border may not have a 1px computed value if your browser is
zoomed (it may be fractional).
2013-01-31 11:59:01 -08:00