Commit Graph

6252 Commits

Author SHA1 Message Date
Emily Stark
70689568f6 Make final logout unconditional for logs-mongo tests release/0.7.2-rc0 2014-03-14 18:50:48 -07:00
Emily Stark
ff8abb4b04 Call logout in selftests that log in.
This avoids wracking up huge numbers of login tokens for the test
user. It would be nice to have these automatically cleaned up, but this
will do for now.
2014-03-14 18:50:48 -07:00
Emily Stark
85c7fa93e6 Add missing selftest 'var' 2014-03-14 18:50:48 -07:00
Emily Stark
4e19bf5e1d add semicolon 2014-03-14 18:50:48 -07:00
Nick Martin
ac9d47040e Credit contributors. 2014-03-14 18:00:48 -07:00
David Glasser
21e7c961b4 Use polling driver for {sort: {$natural: 1}} 2014-03-14 17:23:06 -07:00
David Glasser
76f03776b6 disallow {sort: {$natural: 1}} in minimongo 2014-03-14 17:08:44 -07:00
David Glasser
b161d3c0ec Merge branch 'limit-sort-overlap' into devel 2014-03-14 17:04:43 -07:00
David Glasser
c9c75fee84 oplog-limit: don't ignore modifiers to sort key
Previously we would ignore modifier updates to documents outside our
current buffer if they did not affect the selector but did affect the
sort key.
2014-03-14 17:04:31 -07:00
David Glasser
9e6c07c57f failing (with oplog) test for updating a sort key 2014-03-14 17:04:31 -07:00
David Glasser
22f2c6e4df expand an oplog/limit test a little
- put more info in state comments
- add a few more assertions
- stop requiring "usesOplog &&" before some helpers
2014-03-14 17:04:31 -07:00
Nick Martin
0a5800eb67 History pass 2014-03-14 16:29:24 -07:00
David Glasser
0d4b220111 Better error if non-doc passed to documentMatches 2014-03-14 12:19:44 -07:00
David Glasser
b855f2d7c5 Revert "Update docs around storing EJSON in MongoDB"
This reverts commit f91d870778.

It turns out that while we did implement "storing EJSON in MongoDB", the
technique we chose is very flaky.  Some MongoDB commands (insert,
updates that don't increase the doc size?) let you store fields with
non-starting $, and others (update that does increase the doc size?)
don't.
2014-03-13 20:41:47 -07:00
David Glasser
f91d870778 Update docs around storing EJSON in MongoDB 2014-03-13 19:46:01 -07:00
David Glasser
728ce8d251 Document one-Collection-per-collection rule 2014-03-13 17:38:20 -07:00
Dan Dascalescu
adf3f6553f Clearer docs on avoiding initial changed() calls
Explain `initializing` specifically, and move the comments closer to its
definition.
2014-03-13 17:38:20 -07:00
Dan Dascalescu
22854bee9b Some docs tweaks
- get rid of the sole use of "attribute set"
- add some links
- add missing "the"
2014-03-13 17:38:20 -07:00
Tim Haines
fcf08c966a Update Google oauth scopes. The previous ones were deprecated. 2014-03-13 17:27:36 -07:00
David Glasser
a46f5591a6 Better error for new Meteor.Collection({})
Fixes #1879.
2014-03-13 17:22:53 -07:00
Emily Stark
dd4a4f0734 remove trailing comma 2014-03-13 11:04:27 -07:00
Emily Stark
d737c06fc6 no need for loginHandlers to be global 2014-03-13 11:03:13 -07:00
Emily Stark
1f276e7ff8 Use 'self', since we have it declared 2014-03-13 10:59:19 -07:00
Nick Martin
b4520c84de Merge branch 'pr/1785' into devel 2014-03-12 17:49:33 -07:00
Nick Martin
6f6528143d history note for #1785 2014-03-12 17:49:18 -07:00
Zoltan Olah
0b9368e6ce Tests for the html option to email templates 2014-03-12 17:27:51 -07:00
Zoltan Olah
7a85b92a09 Optionally pass in 'html' template function to Accounts email templates 2014-03-12 17:27:51 -07:00
Nick Martin
749d966817 Merge branch 'login-hooks' into devel 2014-03-12 17:04:52 -07:00
Nick Martin
0a5d105027 clean up docs a little 2014-03-12 16:59:08 -07:00
Nick Martin
e67b56ee53 fix id for navbar. this fixes scrolling highlighting 2014-03-12 16:51:49 -07:00
Nick Martin
14856d5600 Tweak error message. 2014-03-12 15:53:03 -07:00
Nick Martin
d920f4c7e2 Also report login failures that stop in beginPasswordExchange 2014-03-12 02:41:30 -07:00
David Glasser
67da1aa8c3 Merge branch 'sort-different-paths' into devel 2014-03-12 01:11:23 -07:00
David Glasser
f986a7c9fd history update 2014-03-12 01:11:11 -07:00
Nick Martin
59a03b6e65 restore login cancelled behavior. 2014-03-12 00:32:52 -07:00
David Glasser
70cbca849a add XXX about a recent MongoDB change 2014-03-11 16:02:56 -07:00
David Glasser
2f4ccb76d1 More code review from nim
Mostly naming and comments.
2014-03-11 12:22:51 -07:00
David Glasser
102a03c100 expand a comment, as suggested by code review 2014-03-11 11:54:00 -07:00
David Glasser
571dce65a9 Add tests for "index parallel arrays" error 2014-03-11 11:50:03 -07:00
David Glasser
e71027cb23 more _generateKeysFromDoc unit tests 2014-03-11 11:50:03 -07:00
David Glasser
de9d28adcc Fix non-array fields with array fields 2014-03-11 11:50:03 -07:00
David Glasser
bf32d79227 a more direct _generateKeysFromDoc unit test 2014-03-11 11:50:03 -07:00
David Glasser
0876ed46a2 Make sorter closer to Mongo sort key semantics
Specifically, this ensures that with sort specifier {'a.x': 1, 'a.y': 1},
{a: [{x: 0, y: 4}]} sorts before {a: [{x: 0, y: 5}, {x: 1, y: 3}]} by
ensuring that the latter only has sort keys [0,5] and [1,3], and not
[0,3].

It does this by ensuring that the different fields used to generate a
sort key are only matched up if they use the same "path" (series of
array indices used during lookup).  This is a little stronger than what
MongoDB does: MongoDB lets you do {'a.x': 1, 'a.y.z': 1} where 'a' and
'a.y' are both arrays, and our new rule requires all fields to have
either the exact same set of arrays or to use no arrays at all.

(MongoDB does still have some constraints; eg, with sort key {a: 1,
b:1}, a and b cannot both be arrays.  Basically, there may be at most
one "outermost" array across all the fields; and so on recursively, sort
of.

The previously failing test passes now.
2014-03-11 11:50:03 -07:00
David Glasser
ed47055526 Key-based sort.
This rewrites the sorter to generate "keys" for each doc and find the
lexicographically minimum "key", rather than to look at each sort key
field separately.

This commit doesn't actually change the semantics (and the failing test
still fails) because the key generator actually still computes the full
cartesian product of all keys, rather than only using fields that are
next to each other in arrays.
2014-03-11 11:50:03 -07:00
David Glasser
95e4cad3c6 Failing test-case for a sort bug 2014-03-11 11:50:03 -07:00
David Glasser
ee7230dadd Drop Sorter name and use _.extend for prototype
Should be a no-op.
2014-03-11 11:50:03 -07:00
David Glasser
2601b3b8ea minimongo: Save all array indices, not just first
This 'x' thing is a bit of a hack. The idea is that there are two
consumers of arrayIndices. One is '$', which only looks at the first
index. The other is (soon) sort ken generators, which cares if indices
are explicit or implicit, but doesn't really need to "parse"
arrayIndices; it just will use them to associate branches from different
lookup functions with the matching arrayIndices.  'x' is a simple way to
accomplish this, though I could have made the values of arrayIndices be
objects too.
2014-03-11 11:50:03 -07:00
Nick Martin
6625462ec2 Add history note. 2014-03-11 01:43:46 -07:00
Nick Martin
af4bf909fd Add comment linking to hackpad. 2014-03-11 01:37:58 -07:00
Nick Martin
f0b692679e Merge remote-tracking branch 'origin/devel' into login-hooks 2014-03-11 01:02:20 -07:00