Commit Graph

7201 Commits

Author SHA1 Message Date
David Glasser
82aa3485ac Assign the Fiber to self.fiber.
Doing so reveals a deadlock in the stop code (which causes self-test to
fail, yay).  Fix it by trying harder to not stop the (all or app) runner
until after the app runner has processed the "hey you should stop"
return false from onRunEnd.
2014-04-02 20:27:54 -07:00
David Glasser
a61dd5c9f3 upgrade mongo to 1.4.0-rc9 from a fork of 1.3.19 2014-04-02 19:38:33 -07:00
Maxime Quandalle
f05e93afde Don't rewrite URI with a defined protocol (ie http(s) or data) Use the node url module to parse the URI 2014-04-02 11:52:58 -07:00
David Greenspan
6454067e66 Make Blaze packages internal 2014-04-02 09:56:33 -07:00
David Greenspan
e91fea7512 Remove old, unused html5-tokenizer package 2014-04-02 09:56:33 -07:00
David Glasser
f36abc946e Generalize "load *.html files first" hack
Now any plugin can request that its files be treated as "templates" by
setting an isTemplate flag.

(This API is just as supported as you'd expect based on the fact that
you still can't access it without calling a function which starts with
"_transitional_".)

Tested by renaming leaderboard.js to a.js and confirming that it still
works (and that it *doesn't* if templating does not set isTemplate).
2014-04-01 17:21:24 -07:00
David Glasser
d287d36bac Make run tests less flaky 2014-03-31 20:03:01 -07:00
David Glasser
3e76ad7946 Don't use require('./run-log.js').runLog
If you happen to introduce a circular require into the stack, this
object will be undefined.

Instead, hang on to `require('./run-log.js')`, which is the exports
module which does get filled in later.
2014-03-31 19:52:02 -07:00
David Glasser
241ba37f66 DDP spec: wrap heartbeat section 2014-03-31 18:41:24 -07:00
Nick Martin
c918bae9ab Merge branch 'ddp-heartbeats' into devel 2014-03-31 00:19:48 -07:00
Nick Martin
a690cacc63 Only print timeout message on the client. 2014-03-30 23:52:42 -07:00
Nick Martin
2216f6d05f Comments. 2014-03-30 22:53:41 -07:00
Nick Martin
7f44bdf0c8 Add debug print on timeout.
We have this now for sockjs timeouts, and it seems handy to have for DDP timeouts.
2014-03-30 22:18:34 -07:00
Nick Martin
cb5556f7d2 Up sockjs heartbeat timeout (60s->100s) to match new sending interval (25s->45s) 2014-03-30 22:02:55 -07:00
Nick Martin
197552ae9b Add ping and pong to DDP spec.
Minimal writeup. Could stand to be fleshed out a bit. Maybe later.
2014-03-30 21:43:58 -07:00
Andrew Wilcox
6f4f723c6a Allow user to set heartbeat interval to 0 to disable sending pings.
Add test flag `_respondToPings` which allows tests to disable
responding to pings.
2014-03-30 20:03:29 -07:00
Andrew Wilcox
8709365598 Stop heartbeats on client side disconnect.
Use heartbeatInterval: 0 to disable heartbeats for testing.

No need to add `_internal` to the public connection API because we
can get to the internal session through the server.
2014-03-30 20:03:29 -07:00
Andrew Wilcox
865eb30015 Move protocol out of heartbeat.js 2014-03-30 20:03:29 -07:00
Andrew Wilcox
0ac3bf9d4b Move the ddp-heartbeat test into tools/tests. 2014-03-30 20:03:29 -07:00
Andrew Wilcox
05c4edf9f7 DDP Heartbeats
Add "ping" and "pong" messages to DDP.  This allows us to detect at
the DDP level when we've lost the connection.

Bump the DDP version to "pre2".  Preserve backwards compatibility by
not enabling pings if the negotiated DDP version is an earlier version.

Since receiving a ping indicates that the connection is alive, one
side of the connection doesn't have to send its own pings as long as
its receiving pings from the other side.  The ping interval defaults
to 30 seconds on the server and 35 seconds on the client, which means
that normally the pings go just one way (saving on bandwidth).

Increase the sockjs heartbeats from 25s to 45s, so they do not
normally fire.
2014-03-30 20:03:28 -07:00
Slava Kim
7dab23c3ce Merge pull request #1986 from mquandalle/css-urls
Convert relative urls to absolute url when merging CSS files

Fixes issues introduced in `css-minification` branch in development mode and caused by concatenation in general.

When a stylesheet refers to an asset by a relative url, the relative url becomes invalid after concatenation if the stylesheet was originally located somewhere nested.
2014-03-30 18:39:32 -07:00
Maxime Quandalle
a9254d7a60 Handle the case where there are more than one url in the same value 2014-03-31 03:33:39 +02:00
Maxime Quandalle
bc16dabdf6 Add tests for the CSS url rewriting
Add `minifiers-tests.js` into package.js` (tests were not executed)
2014-03-31 01:43:37 +02:00
Maxime Quandalle
4215e3d98b Convert relative urls to absolute url when merging CSS files 2014-03-31 01:43:30 +02:00
David Greenspan
45ac9b1a6d Kill TBODY special case in DomRange
Background: When browsers parse HTML, they always insert a <tbody> around your <tr>s if you don't have one.  That is, `<table><tr>` becomes `<table><tbody><tr>`.  However, if you use the DOM API (appendChild et al.), this doesn't happen.  According to the latest specs and modern browsers, the TBODY element is not necessary in the DOM (though it is still always inserted when parsing HTML).  IE 6/7 disagrees, but that's history.  jQuery bends over backwards to insert TBODY elements dynamically, whenever you put a TR inside a TABLE.  Previously, we did too, but it's even harder for us.

This commit removes the code that special-cases tables in DomRange.  The code was never completely finished, and it will slow us down to have the extra essential complexity in DomRange.  Now, when you write `<table><tr>`, you'll get `<table><tr>` in the DOM tree.

It's important that we never optimize `<table><tr>...` into innerHTML, or else a template like `<table><tr><td>Foo</td></tr></table>` will get an inserted TBODY, while the same template with `{{foo}}` instead of `Foo` won't (because the table can't be optimized into static HTML).  A new test checks that we do this right.

The main downside of this change is that jQuery isn't as good for manipulating tables created by Meteor.  However, I think we can live with that.  jQuery made a particular choice there, and any problems that come up will be consistent across browsers and have workarounds (like inserting a <tbody> or not using a <table> tag).

Another downside concerns server-side rendering.  Rendering a template to a complete HTML string containing `<table><tr>` and then splatting that into the page will produce <tbody> tags that wouldn't be there if the page were rendered on the client.  We'll cross that bridge when we come to it.  In most ways (e.g. CSS rules), it shouldn't matter if there are <tbody> tags or not.
2014-03-30 12:15:23 -07:00
David Glasser
c5f288be38 Fixes to app.html-in-webapp
- Depend on ui in webapp because we use UI.component

- Use eval rather than new Function because we *do* need the local
  environment (to get HTML, UI, etc)

- Log errors from running the template

These issues were not visible in normal apps because normal apps use
'ui' (implied by standard-app-packages) which makes UI a *global*. Ditto
for 'htmljs' (implied by ui) and the HTML symbol.
2014-03-27 17:22:18 -07:00
Avital Oliver
350f4e5bbd Merge branch 'master' into devel 2014-03-27 15:47:41 -07:00
Avital Oliver
886c38bd34 Merge branch 'release-0.8.0' 2014-03-27 15:47:19 -07:00
Avital Oliver
b0ef1ce9a1 Update apps to 0.8.0 2014-03-27 15:46:26 -07:00
Avital Oliver
3b8b43a936 Elaborate on {{#each}} over arrays 2014-03-27 14:41:30 -07:00
Avital Oliver
ad5db65236 Update {{#each}} documentation 2014-03-27 14:39:08 -07:00
Avital Oliver
f2b2d304bf Update README.md 2014-03-27 14:35:55 -07:00
David Glasser
aa903dc6be docs: Fix trailing comma (breaks IE8) 2014-03-27 12:59:21 -07:00
Emily Stark
13561c0c13 Remove element from DOM after test 2014-03-27 11:38:08 -07:00
Emily Stark
cf14b70ea2 Remove element from DOM after test 2014-03-27 11:37:16 -07:00
Emily Stark
172f709a5f Fix bug where event handler return values weren't being used. release/0.8.0-rc7 release/0.8.0 2014-03-27 11:10:30 -07:00
Emily Stark
add97c5280 Fix bug where event handler return values weren't being used. 2014-03-27 11:08:18 -07:00
David Glasser
c89f5fd030 doc tweaks 2014-03-27 10:02:57 -07:00
Avital Oliver
4a328d0004 Fix failing IE test 2014-03-27 09:30:46 -07:00
David Glasser
6242898729 Upgrade showdown 2014-03-26 23:29:03 -07:00
Avital Oliver
14c27ca953 Merge branch 'release-0.8.0' into devel 2014-03-26 20:58:29 -07:00
Avital Oliver
42f5ff1fb9 Revert "Remove preserve-inputs package -- an upgrader removes it from apps"
This wouldn't work well if you run from a Meteor checkout or
without updating your app (via `meteor run --release 0.8.0`)

This reverts commit dc71bd2143.
2014-03-26 20:57:58 -07:00
Avital Oliver
72c901553e Merge branch 'release-0.8.0' into devel
Conflicts:
	History.md
2014-03-26 20:55:34 -07:00
Avital Oliver
dc71bd2143 Remove preserve-inputs package -- an upgrader removes it from apps 2014-03-26 20:55:02 -07:00
David Glasser
27ec7b1519 Fix stylus tests to test stylus rather than less 2014-03-26 20:41:58 -07:00
David Glasser
6b9c74561f banner and notices rough draft 2014-03-26 20:34:31 -07:00
David Glasser
9cb2131bb6 Check package notices line length 2014-03-26 20:33:56 -07:00
David Glasser
acb54beff8 add external contributors 2014-03-26 20:19:05 -07:00
David Glasser
321f1c752f initial history.md pass 2014-03-26 20:16:26 -07:00
David Glasser
ea10dfc545 Update concepts section 2014-03-26 19:38:02 -07:00