File tree Expand file tree Collapse file tree 3 files changed +45
-42
lines changed Expand file tree Collapse file tree 3 files changed +45
-42
lines changed Original file line number Diff line number Diff line change 1
- application-configuration@1.0.4
2
- autopublish@1.0.2
3
- base64@1.0.2
4
- binary-heap@1.0.2
5
- blaze@2.0.4
6
- blaze-tools@1.0.2
7
- callback-hook@1.0.2
8
- check@1.0.4
9
- ddp@1.0.14
10
- deps@1.0.6
11
- ejson@1.0.5
12
- follower-livedata@1.0.3
13
- geojson-utils@1.0.2
14
- html-tools@1.0.3
15
- htmljs@1.0.3
16
- id-map@1.0.2
17
- insecure@1.0.2
18
- jquery@1.11.3
19
- json@1.0.2
20
- local-test:numtel:mysql@0.1.4
21
- logging@1.0.6
22
- meteor@1.1.4
23
- minifiers@1.1.3
24
- minimongo@1.0.6
25
- mongo@1.0.11
26
- numtel:mysql@0.1.4
27
- observe-sequence@1.0.4
28
- ordered-dict@1.0.2
29
- random@1.0.2
30
- reactive-var@1.0.4
31
- retry@1.0.2
32
- sharlon:6to5@0.0.1
33
- spacebars-compiler@1.0.4
34
- templating@1.0.11
35
- test-helpers@1.0.3
36
- tinytest@1.0.4
37
- tracker@1.0.5
38
- underscore@1.0.2
1
+ autopublish@1.0.3
2
+ base64@1.0.3
3
+ binary-heap@1.0.3
4
+ blaze@2.1.2
5
+ blaze-tools@1.0.3
6
+ callback-hook@1.0.3
7
+ check@1.0.5
8
+ ddp@1.1.0
9
+ deps@1.0.7
10
+ ejson@1.0.6
11
+ geojson-utils@1.0.3
12
+ grigio:babel@0.1.1
13
+ html-tools@1.0.4
14
+ htmljs@1.0.4
15
+ id-map@1.0.3
16
+ insecure@1.0.3
17
+ jquery@1.11.3_2
18
+ json@1.0.3
19
+ local-test:numtel:mysql@0.1.5
20
+ logging@1.0.7
21
+ meteor@1.1.6
22
+ minifiers@1.1.5
23
+ minimongo@1.0.8
24
+ mongo@1.1.0
25
+ numtel:mysql@0.1.5
26
+ observe-sequence@1.0.6
27
+ ordered-dict@1.0.3
28
+ random@1.0.3
29
+ reactive-var@1.0.5
30
+ retry@1.0.3
31
+ spacebars-compiler@1.0.6
32
+ templating@1.1.1
33
+ test-helpers@1.0.4
34
+ tinytest@1.0.5
35
+ tracker@1.0.7
36
+ underscore@1.0.3
Original file line number Diff line number Diff line change 1
1
// numtel:mysql
2
2
// MIT License, ben@latenightsketches.com
3
3
// lib/LiveMysql.js
4
+ var Future = Npm . require ( 'fibers/future' ) ;
5
+
4
6
LiveMysql = Npm . require ( 'mysql-live-select' ) ;
5
7
6
8
// Convert the LiveMysqlSelect object into a cursor
7
9
LiveMysql . LiveMysqlSelect . prototype . _publishCursor = function ( sub ) {
8
10
var self = this ;
11
+ var fut = new Future ;
9
12
var initLength ;
10
13
11
14
sub . onStop ( function ( ) {
@@ -23,7 +26,7 @@ LiveMysql.LiveMysqlSelect.prototype._publishCursor = function(sub) {
23
26
self . on ( 'update' , function ( rows ) {
24
27
if ( sub . _ready === false ) {
25
28
initLength = rows . length ;
26
- if ( initLength === 0 ) sub . ready ( ) ;
29
+ if ( initLength === 0 ) fut [ 'return' ] ( ) ;
27
30
}
28
31
} ) ;
29
32
@@ -43,9 +46,11 @@ LiveMysql.LiveMysqlSelect.prototype._publishCursor = function(sub) {
43
46
selectHandler ( 'added' , 0 , 1 , function ( ) {
44
47
if ( sub . _ready === false &&
45
48
self . data . length === initLength - 1 ) {
46
- sub . ready ( ) ;
49
+ fut [ 'return' ] ( ) ;
47
50
}
48
51
} ) ;
49
52
selectHandler ( 'changed' , 1 , 2 ) ;
50
53
selectHandler ( 'removed' , null , 1 ) ;
54
+
55
+ return fut . wait ( )
51
56
}
Original file line number Diff line number Diff line change 1
1
Package . describe ( {
2
2
name : 'numtel:mysql' ,
3
3
summary : 'MySQL support with Reactive Select Subscriptions' ,
4
- version : '0.1.4 ' ,
4
+ version : '0.1.5 ' ,
5
5
git : 'https://github.com/numtel/meteor-mysql.git'
6
6
} ) ;
7
7
@@ -32,7 +32,7 @@ Package.onTest(function(api) {
32
32
'underscore' ,
33
33
'autopublish' ,
34
34
'insecure' ,
35
- 'sharlon:6to5 ' ,
35
+ 'grigio:babel@0.1.1 ' ,
36
36
'numtel:mysql'
37
37
] ) ;
38
38
api . use ( 'test-helpers' ) ; // Did not work concatenated above
You can’t perform that action at this time.
0 commit comments