rxjs-rails 2.2.20 → 2.2.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +38 -20
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +9288 -0
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -0
  7. data/vendor/assets/javascripts/rx.all.js +9102 -0
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -0
  9. data/vendor/assets/javascripts/rx.async.compat.js +5 -4
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +5 -4
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +24 -12
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.binding.js +85 -85
  16. data/vendor/assets/javascripts/rx.coincidence.js +59 -15
  17. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  18. data/vendor/assets/javascripts/rx.compat.js +809 -742
  19. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  20. data/vendor/assets/javascripts/rx.core.compat.js +2629 -0
  21. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -0
  22. data/vendor/assets/javascripts/rx.core.js +2511 -0
  23. data/vendor/assets/javascripts/rx.core.min.js +1 -0
  24. data/vendor/assets/javascripts/rx.experimental.js +43 -43
  25. data/vendor/assets/javascripts/rx.joinpatterns.js +281 -281
  26. data/vendor/assets/javascripts/rx.js +792 -725
  27. data/vendor/assets/javascripts/rx.lite.compat.js +890 -758
  28. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  29. data/vendor/assets/javascripts/rx.lite.extras.js +664 -0
  30. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -0
  31. data/vendor/assets/javascripts/rx.lite.js +890 -758
  32. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  33. data/vendor/assets/javascripts/rx.min.js +2 -2
  34. data/vendor/assets/javascripts/rx.testing.js +166 -166
  35. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  36. data/vendor/assets/javascripts/rx.time.js +132 -131
  37. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  38. data/vendor/assets/javascripts/rx.virtualtime.js +2 -2
  39. metadata +13 -4
  40. data/vendor/assets/javascripts/rx.node.js +0 -142
@@ -1,4 +1,4 @@
1
- // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
1
+ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
2
2
 
3
3
  ;(function (factory) {
4
4
  var objectTypes = {
@@ -33,101 +33,101 @@
33
33
  }
34
34
  }.call(this, function (root, exp, Rx, undefined) {
35
35
 
36
- // Aliases
37
- var Observable = Rx.Observable,
38
- observableProto = Observable.prototype,
39
- AnonymousObservable = Rx.AnonymousObservable,
40
- observableThrow = Observable.throwException,
41
- observerCreate = Rx.Observer.create,
42
- SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
43
- CompositeDisposable = Rx.CompositeDisposable,
44
- AbstractObserver = Rx.internals.AbstractObserver,
45
- noop = Rx.helpers.noop,
46
- defaultComparer = Rx.internals.isEqual,
47
- inherits = Rx.internals.inherits,
48
- slice = Array.prototype.slice;
49
-
50
- // Utilities
51
- function argsOrArray(args, idx) {
52
- return args.length === 1 && Array.isArray(args[idx]) ?
53
- args[idx] :
54
- slice.call(args);
55
- }
56
-
57
- /** @private */
58
- var Map = (function () {
59
-
60
- /**
61
- * @constructor
62
- * @private
63
- */
64
- function Map() {
65
- this.keys = [];
66
- this.values = [];
67
- }
68
-
69
- /**
70
- * @private
71
- * @memberOf Map#
72
- */
73
- Map.prototype['delete'] = function (key) {
74
- var i = this.keys.indexOf(key);
75
- if (i !== -1) {
76
- this.keys.splice(i, 1);
77
- this.values.splice(i, 1);
78
- }
79
- return i !== -1;
80
- };
81
-
82
- /**
83
- * @private
84
- * @memberOf Map#
85
- */
86
- Map.prototype.get = function (key, fallback) {
87
- var i = this.keys.indexOf(key);
88
- return i !== -1 ? this.values[i] : fallback;
89
- };
90
-
91
- /**
92
- * @private
93
- * @memberOf Map#
94
- */
95
- Map.prototype.set = function (key, value) {
96
- var i = this.keys.indexOf(key);
97
- if (i !== -1) {
98
- this.values[i] = value;
99
- }
100
- this.values[this.keys.push(key) - 1] = value;
101
- };
102
-
103
- /**
104
- * @private
105
- * @memberOf Map#
106
- */
107
- Map.prototype.size = function () { return this.keys.length; };
108
-
109
- /**
110
- * @private
111
- * @memberOf Map#
112
- */
113
- Map.prototype.has = function (key) {
114
- return this.keys.indexOf(key) !== -1;
115
- };
116
-
117
- /**
118
- * @private
119
- * @memberOf Map#
120
- */
121
- Map.prototype.getKeys = function () { return this.keys.slice(0); };
122
-
123
- /**
124
- * @private
125
- * @memberOf Map#
126
- */
127
- Map.prototype.getValues = function () { return this.values.slice(0); };
128
-
129
- return Map;
130
- }());
36
+ // Aliases
37
+ var Observable = Rx.Observable,
38
+ observableProto = Observable.prototype,
39
+ AnonymousObservable = Rx.AnonymousObservable,
40
+ observableThrow = Observable.throwException,
41
+ observerCreate = Rx.Observer.create,
42
+ SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
43
+ CompositeDisposable = Rx.CompositeDisposable,
44
+ AbstractObserver = Rx.internals.AbstractObserver,
45
+ noop = Rx.helpers.noop,
46
+ defaultComparer = Rx.internals.isEqual,
47
+ inherits = Rx.internals.inherits,
48
+ slice = Array.prototype.slice;
49
+
50
+ // Utilities
51
+ function argsOrArray(args, idx) {
52
+ return args.length === 1 && Array.isArray(args[idx]) ?
53
+ args[idx] :
54
+ slice.call(args);
55
+ }
56
+
57
+ /** @private */
58
+ var Map = (function () {
59
+
60
+ /**
61
+ * @constructor
62
+ * @private
63
+ */
64
+ function Map() {
65
+ this.keys = [];
66
+ this.values = [];
67
+ }
68
+
69
+ /**
70
+ * @private
71
+ * @memberOf Map#
72
+ */
73
+ Map.prototype['delete'] = function (key) {
74
+ var i = this.keys.indexOf(key);
75
+ if (i !== -1) {
76
+ this.keys.splice(i, 1);
77
+ this.values.splice(i, 1);
78
+ }
79
+ return i !== -1;
80
+ };
81
+
82
+ /**
83
+ * @private
84
+ * @memberOf Map#
85
+ */
86
+ Map.prototype.get = function (key, fallback) {
87
+ var i = this.keys.indexOf(key);
88
+ return i !== -1 ? this.values[i] : fallback;
89
+ };
90
+
91
+ /**
92
+ * @private
93
+ * @memberOf Map#
94
+ */
95
+ Map.prototype.set = function (key, value) {
96
+ var i = this.keys.indexOf(key);
97
+ if (i !== -1) {
98
+ this.values[i] = value;
99
+ }
100
+ this.values[this.keys.push(key) - 1] = value;
101
+ };
102
+
103
+ /**
104
+ * @private
105
+ * @memberOf Map#
106
+ */
107
+ Map.prototype.size = function () { return this.keys.length; };
108
+
109
+ /**
110
+ * @private
111
+ * @memberOf Map#
112
+ */
113
+ Map.prototype.has = function (key) {
114
+ return this.keys.indexOf(key) !== -1;
115
+ };
116
+
117
+ /**
118
+ * @private
119
+ * @memberOf Map#
120
+ */
121
+ Map.prototype.getKeys = function () { return this.keys.slice(0); };
122
+
123
+ /**
124
+ * @private
125
+ * @memberOf Map#
126
+ */
127
+ Map.prototype.getValues = function () { return this.values.slice(0); };
128
+
129
+ return Map;
130
+ }());
131
131
 
132
132
  /**
133
133
  * @constructor
@@ -159,190 +159,190 @@
159
159
  return new Plan(this, selector);
160
160
  };
161
161
 
162
- function Plan(expression, selector) {
163
- this.expression = expression;
164
- this.selector = selector;
165
- }
166
-
167
- Plan.prototype.activate = function (externalSubscriptions, observer, deactivate) {
168
- var self = this;
169
- var joinObservers = [];
170
- for (var i = 0, len = this.expression.patterns.length; i < len; i++) {
171
- joinObservers.push(planCreateObserver(externalSubscriptions, this.expression.patterns[i], observer.onError.bind(observer)));
172
- }
173
- var activePlan = new ActivePlan(joinObservers, function () {
174
- var result;
175
- try {
176
- result = self.selector.apply(self, arguments);
177
- } catch (exception) {
178
- observer.onError(exception);
179
- return;
180
- }
181
- observer.onNext(result);
182
- }, function () {
183
- for (var j = 0, jlen = joinObservers.length; j < jlen; j++) {
184
- joinObservers[j].removeActivePlan(activePlan);
185
- }
186
- deactivate(activePlan);
187
- });
188
- for (i = 0, len = joinObservers.length; i < len; i++) {
189
- joinObservers[i].addActivePlan(activePlan);
190
- }
191
- return activePlan;
192
- };
193
-
194
- function planCreateObserver(externalSubscriptions, observable, onError) {
195
- var entry = externalSubscriptions.get(observable);
196
- if (!entry) {
197
- var observer = new JoinObserver(observable, onError);
198
- externalSubscriptions.set(observable, observer);
199
- return observer;
200
- }
201
- return entry;
202
- }
203
-
204
- // Active Plan
205
- function ActivePlan(joinObserverArray, onNext, onCompleted) {
206
- var i, joinObserver;
207
- this.joinObserverArray = joinObserverArray;
208
- this.onNext = onNext;
209
- this.onCompleted = onCompleted;
210
- this.joinObservers = new Map();
211
- for (i = 0; i < this.joinObserverArray.length; i++) {
212
- joinObserver = this.joinObserverArray[i];
213
- this.joinObservers.set(joinObserver, joinObserver);
214
- }
215
- }
216
-
217
- ActivePlan.prototype.dequeue = function () {
218
- var values = this.joinObservers.getValues();
219
- for (var i = 0, len = values.length; i < len; i++) {
220
- values[i].queue.shift();
221
- }
222
- };
223
- ActivePlan.prototype.match = function () {
224
- var firstValues, i, len, isCompleted, values, hasValues = true;
225
- for (i = 0, len = this.joinObserverArray.length; i < len; i++) {
226
- if (this.joinObserverArray[i].queue.length === 0) {
227
- hasValues = false;
228
- break;
229
- }
230
- }
231
- if (hasValues) {
232
- firstValues = [];
233
- isCompleted = false;
234
- for (i = 0, len = this.joinObserverArray.length; i < len; i++) {
235
- firstValues.push(this.joinObserverArray[i].queue[0]);
236
- if (this.joinObserverArray[i].queue[0].kind === 'C') {
237
- isCompleted = true;
238
- }
239
- }
240
- if (isCompleted) {
241
- this.onCompleted();
242
- } else {
243
- this.dequeue();
244
- values = [];
245
- for (i = 0; i < firstValues.length; i++) {
246
- values.push(firstValues[i].value);
247
- }
248
- this.onNext.apply(this, values);
249
- }
250
- }
251
- };
252
-
253
- /** @private */
254
- var JoinObserver = (function (_super) {
255
-
256
- inherits(JoinObserver, _super);
257
-
258
- /**
259
- * @constructor
260
- * @private
261
- */
262
- function JoinObserver(source, onError) {
263
- _super.call(this);
264
- this.source = source;
265
- this.onError = onError;
266
- this.queue = [];
267
- this.activePlans = [];
268
- this.subscription = new SingleAssignmentDisposable();
269
- this.isDisposed = false;
270
- }
271
-
272
- var JoinObserverPrototype = JoinObserver.prototype;
273
-
274
- /**
275
- * @memberOf JoinObserver#
276
- * @private
277
- */
278
- JoinObserverPrototype.next = function (notification) {
279
- if (!this.isDisposed) {
280
- if (notification.kind === 'E') {
281
- this.onError(notification.exception);
282
- return;
283
- }
284
- this.queue.push(notification);
285
- var activePlans = this.activePlans.slice(0);
286
- for (var i = 0, len = activePlans.length; i < len; i++) {
287
- activePlans[i].match();
288
- }
289
- }
290
- };
291
-
292
- /**
293
- * @memberOf JoinObserver#
294
- * @private
295
- */
296
- JoinObserverPrototype.error = noop;
297
-
298
- /**
299
- * @memberOf JoinObserver#
300
- * @private
301
- */
302
- JoinObserverPrototype.completed = noop;
303
-
304
- /**
305
- * @memberOf JoinObserver#
306
- * @private
307
- */
308
- JoinObserverPrototype.addActivePlan = function (activePlan) {
309
- this.activePlans.push(activePlan);
310
- };
311
-
312
- /**
313
- * @memberOf JoinObserver#
314
- * @private
315
- */
316
- JoinObserverPrototype.subscribe = function () {
317
- this.subscription.setDisposable(this.source.materialize().subscribe(this));
318
- };
319
-
320
- /**
321
- * @memberOf JoinObserver#
322
- * @private
323
- */
324
- JoinObserverPrototype.removeActivePlan = function (activePlan) {
325
- var idx = this.activePlans.indexOf(activePlan);
326
- this.activePlans.splice(idx, 1);
327
- if (this.activePlans.length === 0) {
328
- this.dispose();
329
- }
330
- };
331
-
332
- /**
333
- * @memberOf JoinObserver#
334
- * @private
335
- */
336
- JoinObserverPrototype.dispose = function () {
337
- _super.prototype.dispose.call(this);
338
- if (!this.isDisposed) {
339
- this.isDisposed = true;
340
- this.subscription.dispose();
341
- }
342
- };
343
-
344
- return JoinObserver;
345
- } (AbstractObserver));
162
+ function Plan(expression, selector) {
163
+ this.expression = expression;
164
+ this.selector = selector;
165
+ }
166
+
167
+ Plan.prototype.activate = function (externalSubscriptions, observer, deactivate) {
168
+ var self = this;
169
+ var joinObservers = [];
170
+ for (var i = 0, len = this.expression.patterns.length; i < len; i++) {
171
+ joinObservers.push(planCreateObserver(externalSubscriptions, this.expression.patterns[i], observer.onError.bind(observer)));
172
+ }
173
+ var activePlan = new ActivePlan(joinObservers, function () {
174
+ var result;
175
+ try {
176
+ result = self.selector.apply(self, arguments);
177
+ } catch (exception) {
178
+ observer.onError(exception);
179
+ return;
180
+ }
181
+ observer.onNext(result);
182
+ }, function () {
183
+ for (var j = 0, jlen = joinObservers.length; j < jlen; j++) {
184
+ joinObservers[j].removeActivePlan(activePlan);
185
+ }
186
+ deactivate(activePlan);
187
+ });
188
+ for (i = 0, len = joinObservers.length; i < len; i++) {
189
+ joinObservers[i].addActivePlan(activePlan);
190
+ }
191
+ return activePlan;
192
+ };
193
+
194
+ function planCreateObserver(externalSubscriptions, observable, onError) {
195
+ var entry = externalSubscriptions.get(observable);
196
+ if (!entry) {
197
+ var observer = new JoinObserver(observable, onError);
198
+ externalSubscriptions.set(observable, observer);
199
+ return observer;
200
+ }
201
+ return entry;
202
+ }
203
+
204
+ // Active Plan
205
+ function ActivePlan(joinObserverArray, onNext, onCompleted) {
206
+ var i, joinObserver;
207
+ this.joinObserverArray = joinObserverArray;
208
+ this.onNext = onNext;
209
+ this.onCompleted = onCompleted;
210
+ this.joinObservers = new Map();
211
+ for (i = 0; i < this.joinObserverArray.length; i++) {
212
+ joinObserver = this.joinObserverArray[i];
213
+ this.joinObservers.set(joinObserver, joinObserver);
214
+ }
215
+ }
216
+
217
+ ActivePlan.prototype.dequeue = function () {
218
+ var values = this.joinObservers.getValues();
219
+ for (var i = 0, len = values.length; i < len; i++) {
220
+ values[i].queue.shift();
221
+ }
222
+ };
223
+ ActivePlan.prototype.match = function () {
224
+ var firstValues, i, len, isCompleted, values, hasValues = true;
225
+ for (i = 0, len = this.joinObserverArray.length; i < len; i++) {
226
+ if (this.joinObserverArray[i].queue.length === 0) {
227
+ hasValues = false;
228
+ break;
229
+ }
230
+ }
231
+ if (hasValues) {
232
+ firstValues = [];
233
+ isCompleted = false;
234
+ for (i = 0, len = this.joinObserverArray.length; i < len; i++) {
235
+ firstValues.push(this.joinObserverArray[i].queue[0]);
236
+ if (this.joinObserverArray[i].queue[0].kind === 'C') {
237
+ isCompleted = true;
238
+ }
239
+ }
240
+ if (isCompleted) {
241
+ this.onCompleted();
242
+ } else {
243
+ this.dequeue();
244
+ values = [];
245
+ for (i = 0; i < firstValues.length; i++) {
246
+ values.push(firstValues[i].value);
247
+ }
248
+ this.onNext.apply(this, values);
249
+ }
250
+ }
251
+ };
252
+
253
+ /** @private */
254
+ var JoinObserver = (function (_super) {
255
+
256
+ inherits(JoinObserver, _super);
257
+
258
+ /**
259
+ * @constructor
260
+ * @private
261
+ */
262
+ function JoinObserver(source, onError) {
263
+ _super.call(this);
264
+ this.source = source;
265
+ this.onError = onError;
266
+ this.queue = [];
267
+ this.activePlans = [];
268
+ this.subscription = new SingleAssignmentDisposable();
269
+ this.isDisposed = false;
270
+ }
271
+
272
+ var JoinObserverPrototype = JoinObserver.prototype;
273
+
274
+ /**
275
+ * @memberOf JoinObserver#
276
+ * @private
277
+ */
278
+ JoinObserverPrototype.next = function (notification) {
279
+ if (!this.isDisposed) {
280
+ if (notification.kind === 'E') {
281
+ this.onError(notification.exception);
282
+ return;
283
+ }
284
+ this.queue.push(notification);
285
+ var activePlans = this.activePlans.slice(0);
286
+ for (var i = 0, len = activePlans.length; i < len; i++) {
287
+ activePlans[i].match();
288
+ }
289
+ }
290
+ };
291
+
292
+ /**
293
+ * @memberOf JoinObserver#
294
+ * @private
295
+ */
296
+ JoinObserverPrototype.error = noop;
297
+
298
+ /**
299
+ * @memberOf JoinObserver#
300
+ * @private
301
+ */
302
+ JoinObserverPrototype.completed = noop;
303
+
304
+ /**
305
+ * @memberOf JoinObserver#
306
+ * @private
307
+ */
308
+ JoinObserverPrototype.addActivePlan = function (activePlan) {
309
+ this.activePlans.push(activePlan);
310
+ };
311
+
312
+ /**
313
+ * @memberOf JoinObserver#
314
+ * @private
315
+ */
316
+ JoinObserverPrototype.subscribe = function () {
317
+ this.subscription.setDisposable(this.source.materialize().subscribe(this));
318
+ };
319
+
320
+ /**
321
+ * @memberOf JoinObserver#
322
+ * @private
323
+ */
324
+ JoinObserverPrototype.removeActivePlan = function (activePlan) {
325
+ var idx = this.activePlans.indexOf(activePlan);
326
+ this.activePlans.splice(idx, 1);
327
+ if (this.activePlans.length === 0) {
328
+ this.dispose();
329
+ }
330
+ };
331
+
332
+ /**
333
+ * @memberOf JoinObserver#
334
+ * @private
335
+ */
336
+ JoinObserverPrototype.dispose = function () {
337
+ _super.prototype.dispose.call(this);
338
+ if (!this.isDisposed) {
339
+ this.isDisposed = true;
340
+ this.subscription.dispose();
341
+ }
342
+ };
343
+
344
+ return JoinObserver;
345
+ } (AbstractObserver));
346
346
 
347
347
  /**
348
348
  * Creates a pattern that matches when both observable sequences have an available value.
@@ -411,5 +411,5 @@
411
411
  });
412
412
  };
413
413
 
414
- return Rx;
414
+ return Rx;
415
415
  }));