1680 Commits

Author SHA1 Message Date
David Glasser
070d6f7ca9 collection.update() and .remove() may only use IDs as selectors when sending RPCs.
ie, they can use arbitrary selectors on the server and in client stubs, but not
in other client contexts. This is to prevent clients from executing arbitrary
selectors against the DB.

Because of this, the update and remove allow/deny callbacks can only ever get
one doc, so switch them from getting an array to just getting the doc (like
insert).
2013-03-13 04:52:59 -07:00
David Glasser
322699e420 Test for e03d354. 2013-03-12 18:18:33 -07:00
Naomi Seyfer
9d03ddaf86 aaand removed the everpresent debugger call 2013-03-12 18:07:36 -07:00
Naomi Seyfer
e03d35460d Account for the case where a query might have been stopped before recompute
In minimongo, sometimes we precompute a list of queries that need recomputation,
and then recompute them.  When this happens, we call callbacks that sometimes end
up stopping the query, which removes it from the list of queries on the collection.

Without checking for this case, it casued an exception.
2013-03-12 18:04:41 -07:00
Naomi Seyfer
67d8f829a2 Make transforms on collections always nonreactive 2013-03-12 13:36:45 -07:00
Nick Martin
abe3ee9cbe Merge remote-tracking branch 'origin/deps-radical' into devel 2013-03-12 10:39:03 -07:00
David Glasser
0d3be81357 spark: apply transform in initial render.
parties example: add displayName using transform instead of keeping it as a
separate function. This allows us to drop a few helpers, too.
2013-03-11 23:08:54 -07:00
Nick Martin
b27dd1b8d2 Fix race condition in test. Multiple tests running at once could cause a failure. 2013-03-11 22:54:07 -07:00
Nick Martin
65840c1152 Merge remote-tracking branch 'origin/pr/753' into devel 2013-03-11 22:45:38 -07:00
Nick Martin
e0d1a29633 Merge branch 'appcache' into devel
Conflicts:
	History.md
2013-03-11 22:35:24 -07:00
David Glasser
5f9eba5f79 Clean up selector.js old-browser workarounds.
Instead of checking $Uint8ArrayPolyfill directly, keep that as an internal
detail of ejson and use EJSON.isBinary.

Consistently avoid treating $Uint8ArrayPolyfill objects as arrays throughout the
selector compiler.
2013-03-11 21:09:59 -07:00
Nick Martin
68474b25ae Merge branch 'meetup' into devel 2013-03-11 21:03:59 -07:00
Nick Martin
429aa690a4 Tweak the height of the popup box. Meetup varies the height of their box based on which permissions are requested. 2013-03-11 20:52:52 -07:00
David Glasser
02959efba8 Don't apply transform for server-side observeChanges (eg publishes). 2013-03-11 20:28:09 -07:00
David Glasser
c44d169628 Fix test race condition in EJSON tests.
When running the client versions of the tests, the client will send EJSON to the
server containing the Dog type, so the server needs to have already executed
EJSON.addType. Putting the call in a test is too late.
2013-03-11 20:13:28 -07:00
David Glasser
2a1f48bb7f Aha, here's where the transform is :) 2013-03-11 20:01:57 -07:00
David Glasser
94883aef0e Fix model test concurrency issues.
(Worth seeing how hard it would be to refactor this file to use separate
collections per run...)
2013-03-11 19:52:22 -07:00
Naomi Seyfer
f484f4e433 stop getting the transform from the wrong place on the server in getTransform 2013-03-11 18:17:07 -07:00
James Gill
bf0b8f961f Now accept multiple event handlers.
Also including tests.
With this, you can define two events off of, say,
'click #myButton', and both will be triggered by a
click event.
2013-03-11 17:38:13 -07:00
James Gill
17c21705a7 Spark.attachEvents can handle arrays of callbacks. 2013-03-11 17:09:29 -07:00
Naomi Seyfer
1653c091e7 Change the names from factory to transform 2013-03-11 15:49:17 -07:00
James Gill
5eaf672c15 Adding (failing) tests for multiple event handlers. 2013-03-11 15:27:34 -07:00
David Greenspan
96d05d741f Deps.Variable => Deps.Dependency 2013-03-11 12:37:25 -07:00
David Greenspan
463c6c1b0b Merge branch 'devel' into deps-radical 2013-03-11 12:19:21 -07:00
David Greenspan
a18a92e65f Deps.run => Deps.autorun 2013-03-11 12:17:39 -07:00
David Greenspan
8f3b0a279f final glasser review 2013-03-11 12:06:50 -07:00
Matt DeBergalis
4cd49f0d5f add requestPermissions support to accounts-meetup 2013-03-10 15:23:52 -07:00
Matt DeBergalis
71f54afccd accounts-meetup package 2013-03-10 15:10:22 -07:00
Naomi Seyfer
00eedc6598 Allow and deny rules with factories 2013-03-09 18:03:10 -08:00
Naomi Seyfer
2b4fb43bda Merge branch 'devel' into models 2013-03-09 11:57:34 -08:00
Naomi Seyfer
aa663f9fc7 Underscore 1.4.4 was making tests run much slower than 1.4.2 ever did.
Until we figure out some solution to this (or switch to lo-dash), I'm going to
remove 1.4.4 so I can get work done on top of devel.

Revert "upgrade package underscore too"

This reverts commit 7022916fb4.
2013-03-09 11:43:01 -08:00
Naomi Seyfer
a4cbb0d8ef a stab at factories in allow and deny 2013-03-08 22:41:24 -08:00
Naomi Seyfer
184438d9a7 fixed small things nim found 2013-03-08 19:01:08 -08:00
Naomi Seyfer
6b35610d22 actually use the factory instead of printing it 2013-03-08 18:28:26 -08:00
Naomi Seyfer
b38579fd13 more testing to make sure factories happen in observes 2013-03-08 17:24:03 -08:00
Naomi Seyfer
996fc144bf Basics of factories on collections 2013-03-08 16:33:12 -08:00
David Greenspan
c65dcb629e Merge branch 'devel' into deps-radical
Conflicts:
	packages/test-in-browser/driver.js
2013-03-08 12:44:52 -08:00
David Greenspan
717ed1f6f9 more work 2013-03-07 23:10:44 -08:00
David Greenspan
6974cfb7b4 check Deps.run arg 2013-03-07 22:01:30 -08:00
David Greenspan
9c932dadce fix sub de-dup; bunch of tests 2013-03-07 20:51:08 -08:00
David Greenspan
334f172cac radical radical Deps (needs more tests & docs) 2013-03-07 17:44:21 -08:00
Naomi Seyfer
1307b8c4a9 a step toward factories on collections 2013-03-07 16:09:18 -08:00
David Glasser
7022916fb4 upgrade package underscore too 2013-03-07 08:15:25 -08:00
David Glasser
551a31712b Tell Future.wrap where the callback is (signature changed). 2013-03-07 00:25:45 -08:00
Naomi Seyfer
0da938955c Fix EJSON.equals and EJSON.clone to use better loops; be more correct 2013-03-06 20:04:45 -08:00
David Greenspan
b38ec5513d more from glasser review 2013-03-06 19:14:01 -08:00
David Greenspan
6fb7df9f98 wrap atFlush func 2013-03-06 17:35:57 -08:00
Nick Martin
c1ece21051 Merge branch 'devel' into appcache 2013-03-06 17:06:05 -08:00
Naomi Seyfer
63869d0330 Stop keeping around so many subscriptions when we are done testing 2013-03-06 16:51:31 -08:00
Nick Martin
b2bf406e55 Only cache assets with a cache-busting parameter. Use fallback to access these when offline. 2013-03-06 16:41:56 -08:00