rxjs-rails 2.3.0 → 2.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +115 -27
  4. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  5. data/vendor/assets/javascripts/rx.all.compat.js +2751 -2702
  6. data/vendor/assets/javascripts/rx.all.compat.min.js +3 -3
  7. data/vendor/assets/javascripts/rx.all.js +2605 -2589
  8. data/vendor/assets/javascripts/rx.all.min.js +3 -3
  9. data/vendor/assets/javascripts/rx.async.compat.js +41 -22
  10. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  11. data/vendor/assets/javascripts/rx.async.js +41 -22
  12. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  13. data/vendor/assets/javascripts/rx.backpressure.js +41 -45
  14. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.binding.js +81 -111
  16. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  17. data/vendor/assets/javascripts/rx.coincidence.js +567 -486
  18. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  19. data/vendor/assets/javascripts/rx.compat.js +1430 -1532
  20. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  21. data/vendor/assets/javascripts/rx.core.compat.js +76 -127
  22. data/vendor/assets/javascripts/rx.core.compat.min.js +1 -1
  23. data/vendor/assets/javascripts/rx.core.js +76 -127
  24. data/vendor/assets/javascripts/rx.core.min.js +1 -1
  25. data/vendor/assets/javascripts/rx.experimental.js +36 -36
  26. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.joinpatterns.js +281 -281
  28. data/vendor/assets/javascripts/rx.js +1286 -1421
  29. data/vendor/assets/javascripts/rx.lite.compat.js +1443 -1749
  30. data/vendor/assets/javascripts/rx.lite.compat.min.js +2 -2
  31. data/vendor/assets/javascripts/rx.lite.extras.js +133 -205
  32. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  33. data/vendor/assets/javascripts/rx.lite.js +1319 -1658
  34. data/vendor/assets/javascripts/rx.lite.min.js +2 -2
  35. data/vendor/assets/javascripts/rx.min.js +2 -2
  36. data/vendor/assets/javascripts/rx.testing.js +302 -322
  37. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  38. data/vendor/assets/javascripts/rx.time.js +90 -75
  39. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  40. data/vendor/assets/javascripts/rx.virtualtime.js +264 -279
  41. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  42. metadata +10 -11
@@ -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 = {
@@ -42,294 +42,279 @@
42
42
  inherits = Rx.internals.inherits,
43
43
  defaultSubComparer = Rx.helpers.defaultSubComparer;
44
44
 
45
- /** Provides a set of extension methods for virtual time scheduling. */
46
- Rx.VirtualTimeScheduler = (function (_super) {
45
+ /** Provides a set of extension methods for virtual time scheduling. */
46
+ Rx.VirtualTimeScheduler = (function (__super__) {
47
47
 
48
- function notImplemented() {
49
- throw new Error('Not implemented');
50
- }
48
+ function notImplemented() {
49
+ throw new Error('Not implemented');
50
+ }
51
51
 
52
- function localNow() {
53
- return this.toDateTimeOffset(this.clock);
54
- }
52
+ function localNow() {
53
+ return this.toDateTimeOffset(this.clock);
54
+ }
55
55
 
56
- function scheduleNow(state, action) {
57
- return this.scheduleAbsoluteWithState(state, this.clock, action);
58
- }
56
+ function scheduleNow(state, action) {
57
+ return this.scheduleAbsoluteWithState(state, this.clock, action);
58
+ }
59
59
 
60
- function scheduleRelative(state, dueTime, action) {
61
- return this.scheduleRelativeWithState(state, this.toRelative(dueTime), action);
62
- }
60
+ function scheduleRelative(state, dueTime, action) {
61
+ return this.scheduleRelativeWithState(state, this.toRelative(dueTime), action);
62
+ }
63
63
 
64
- function scheduleAbsolute(state, dueTime, action) {
65
- return this.scheduleRelativeWithState(state, this.toRelative(dueTime - this.now()), action);
66
- }
64
+ function scheduleAbsolute(state, dueTime, action) {
65
+ return this.scheduleRelativeWithState(state, this.toRelative(dueTime - this.now()), action);
66
+ }
67
67
 
68
- function invokeAction(scheduler, action) {
69
- action();
70
- return disposableEmpty;
71
- }
68
+ function invokeAction(scheduler, action) {
69
+ action();
70
+ return disposableEmpty;
71
+ }
72
+
73
+ inherits(VirtualTimeScheduler, __super__);
74
+
75
+ /**
76
+ * Creates a new virtual time scheduler with the specified initial clock value and absolute time comparer.
77
+ *
78
+ * @constructor
79
+ * @param {Number} initialClock Initial value for the clock.
80
+ * @param {Function} comparer Comparer to determine causality of events based on absolute time.
81
+ */
82
+ function VirtualTimeScheduler(initialClock, comparer) {
83
+ this.clock = initialClock;
84
+ this.comparer = comparer;
85
+ this.isEnabled = false;
86
+ this.queue = new PriorityQueue(1024);
87
+ __super__.call(this, localNow, scheduleNow, scheduleRelative, scheduleAbsolute);
88
+ }
89
+
90
+ var VirtualTimeSchedulerPrototype = VirtualTimeScheduler.prototype;
91
+
92
+ /**
93
+ * Adds a relative time value to an absolute time value.
94
+ * @param {Number} absolute Absolute virtual time value.
95
+ * @param {Number} relative Relative virtual time value to add.
96
+ * @return {Number} Resulting absolute virtual time sum value.
97
+ */
98
+ VirtualTimeSchedulerPrototype.add = notImplemented;
99
+
100
+ /**
101
+ * Converts an absolute time to a number
102
+ * @param {Any} The absolute time.
103
+ * @returns {Number} The absolute time in ms
104
+ */
105
+ VirtualTimeSchedulerPrototype.toDateTimeOffset = notImplemented;
106
+
107
+ /**
108
+ * Converts the TimeSpan value to a relative virtual time value.
109
+ * @param {Number} timeSpan TimeSpan value to convert.
110
+ * @return {Number} Corresponding relative virtual time value.
111
+ */
112
+ VirtualTimeSchedulerPrototype.toRelative = notImplemented;
113
+
114
+ /**
115
+ * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be emulated using recursive scheduling.
116
+ * @param {Mixed} state Initial state passed to the action upon the first iteration.
117
+ * @param {Number} period Period for running the work periodically.
118
+ * @param {Function} action Action to be executed, potentially updating the state.
119
+ * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort).
120
+ */
121
+ VirtualTimeSchedulerPrototype.schedulePeriodicWithState = function (state, period, action) {
122
+ var s = new SchedulePeriodicRecursive(this, state, period, action);
123
+ return s.start();
124
+ };
125
+
126
+ /**
127
+ * Schedules an action to be executed after dueTime.
128
+ * @param {Mixed} state State passed to the action to be executed.
129
+ * @param {Number} dueTime Relative time after which to execute the action.
130
+ * @param {Function} action Action to be executed.
131
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
132
+ */
133
+ VirtualTimeSchedulerPrototype.scheduleRelativeWithState = function (state, dueTime, action) {
134
+ var runAt = this.add(this.clock, dueTime);
135
+ return this.scheduleAbsoluteWithState(state, runAt, action);
136
+ };
72
137
 
73
- inherits(VirtualTimeScheduler, _super);
74
-
75
- /**
76
- * Creates a new virtual time scheduler with the specified initial clock value and absolute time comparer.
77
- *
78
- * @constructor
79
- * @param {Number} initialClock Initial value for the clock.
80
- * @param {Function} comparer Comparer to determine causality of events based on absolute time.
81
- */
82
- function VirtualTimeScheduler(initialClock, comparer) {
83
- this.clock = initialClock;
84
- this.comparer = comparer;
138
+ /**
139
+ * Schedules an action to be executed at dueTime.
140
+ * @param {Number} dueTime Relative time after which to execute the action.
141
+ * @param {Function} action Action to be executed.
142
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
143
+ */
144
+ VirtualTimeSchedulerPrototype.scheduleRelative = function (dueTime, action) {
145
+ return this.scheduleRelativeWithState(action, dueTime, invokeAction);
146
+ };
147
+
148
+ /**
149
+ * Starts the virtual time scheduler.
150
+ */
151
+ VirtualTimeSchedulerPrototype.start = function () {
152
+ if (!this.isEnabled) {
153
+ this.isEnabled = true;
154
+ do {
155
+ var next = this.getNext();
156
+ if (next !== null) {
157
+ this.comparer(next.dueTime, this.clock) > 0 && (this.clock = next.dueTime);
158
+ next.invoke();
159
+ } else {
85
160
  this.isEnabled = false;
86
- this.queue = new PriorityQueue(1024);
87
- _super.call(this, localNow, scheduleNow, scheduleRelative, scheduleAbsolute);
88
- }
161
+ }
162
+ } while (this.isEnabled);
163
+ }
164
+ };
89
165
 
90
- var VirtualTimeSchedulerPrototype = VirtualTimeScheduler.prototype;
91
-
92
- /**
93
- * Adds a relative time value to an absolute time value.
94
- * @param {Number} absolute Absolute virtual time value.
95
- * @param {Number} relative Relative virtual time value to add.
96
- * @return {Number} Resulting absolute virtual time sum value.
97
- */
98
- VirtualTimeSchedulerPrototype.add = notImplemented;
99
-
100
- /**
101
- * Converts an absolute time to a number
102
- * @param {Any} The absolute time.
103
- * @returns {Number} The absolute time in ms
104
- */
105
- VirtualTimeSchedulerPrototype.toDateTimeOffset = notImplemented;
106
-
107
- /**
108
- * Converts the TimeSpan value to a relative virtual time value.
109
- * @param {Number} timeSpan TimeSpan value to convert.
110
- * @return {Number} Corresponding relative virtual time value.
111
- */
112
- VirtualTimeSchedulerPrototype.toRelative = notImplemented;
113
-
114
- /**
115
- * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be emulated using recursive scheduling.
116
- * @param {Mixed} state Initial state passed to the action upon the first iteration.
117
- * @param {Number} period Period for running the work periodically.
118
- * @param {Function} action Action to be executed, potentially updating the state.
119
- * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort).
120
- */
121
- VirtualTimeSchedulerPrototype.schedulePeriodicWithState = function (state, period, action) {
122
- var s = new SchedulePeriodicRecursive(this, state, period, action);
123
- return s.start();
124
- };
125
-
126
- /**
127
- * Schedules an action to be executed after dueTime.
128
- * @param {Mixed} state State passed to the action to be executed.
129
- * @param {Number} dueTime Relative time after which to execute the action.
130
- * @param {Function} action Action to be executed.
131
- * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
132
- */
133
- VirtualTimeSchedulerPrototype.scheduleRelativeWithState = function (state, dueTime, action) {
134
- var runAt = this.add(this.clock, dueTime);
135
- return this.scheduleAbsoluteWithState(state, runAt, action);
136
- };
137
-
138
- /**
139
- * Schedules an action to be executed at dueTime.
140
- * @param {Number} dueTime Relative time after which to execute the action.
141
- * @param {Function} action Action to be executed.
142
- * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
143
- */
144
- VirtualTimeSchedulerPrototype.scheduleRelative = function (dueTime, action) {
145
- return this.scheduleRelativeWithState(action, dueTime, invokeAction);
146
- };
147
-
148
- /**
149
- * Starts the virtual time scheduler.
150
- */
151
- VirtualTimeSchedulerPrototype.start = function () {
152
- var next;
153
- if (!this.isEnabled) {
154
- this.isEnabled = true;
155
- do {
156
- next = this.getNext();
157
- if (next !== null) {
158
- if (this.comparer(next.dueTime, this.clock) > 0) {
159
- this.clock = next.dueTime;
160
- }
161
- next.invoke();
162
- } else {
163
- this.isEnabled = false;
164
- }
165
- } while (this.isEnabled);
166
- }
167
- };
168
-
169
- /**
170
- * Stops the virtual time scheduler.
171
- */
172
- VirtualTimeSchedulerPrototype.stop = function () {
166
+ /**
167
+ * Stops the virtual time scheduler.
168
+ */
169
+ VirtualTimeSchedulerPrototype.stop = function () {
170
+ this.isEnabled = false;
171
+ };
172
+
173
+ /**
174
+ * Advances the scheduler's clock to the specified time, running all work till that point.
175
+ * @param {Number} time Absolute time to advance the scheduler's clock to.
176
+ */
177
+ VirtualTimeSchedulerPrototype.advanceTo = function (time) {
178
+ var dueToClock = this.comparer(this.clock, time);
179
+ if (this.comparer(this.clock, time) > 0) {
180
+ throw new Error(argumentOutOfRange);
181
+ }
182
+ if (dueToClock === 0) {
183
+ return;
184
+ }
185
+ if (!this.isEnabled) {
186
+ this.isEnabled = true;
187
+ do {
188
+ var next = this.getNext();
189
+ if (next !== null && this.comparer(next.dueTime, time) <= 0) {
190
+ this.comparer(next.dueTime, this.clock) > 0 && (this.clock = next.dueTime);
191
+ next.invoke();
192
+ } else {
173
193
  this.isEnabled = false;
174
- };
175
-
176
- /**
177
- * Advances the scheduler's clock to the specified time, running all work till that point.
178
- * @param {Number} time Absolute time to advance the scheduler's clock to.
179
- */
180
- VirtualTimeSchedulerPrototype.advanceTo = function (time) {
181
- var next;
182
- var dueToClock = this.comparer(this.clock, time);
183
- if (this.comparer(this.clock, time) > 0) {
184
- throw new Error(argumentOutOfRange);
185
- }
186
- if (dueToClock === 0) {
187
- return;
188
- }
189
- if (!this.isEnabled) {
190
- this.isEnabled = true;
191
- do {
192
- next = this.getNext();
193
- if (next !== null && this.comparer(next.dueTime, time) <= 0) {
194
- if (this.comparer(next.dueTime, this.clock) > 0) {
195
- this.clock = next.dueTime;
196
- }
197
- next.invoke();
198
- } else {
199
- this.isEnabled = false;
200
- }
201
- } while (this.isEnabled);
202
- this.clock = time;
203
- }
204
- };
205
-
206
- /**
207
- * Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.
208
- * @param {Number} time Relative time to advance the scheduler's clock by.
209
- */
210
- VirtualTimeSchedulerPrototype.advanceBy = function (time) {
211
- var dt = this.add(this.clock, time);
212
- var dueToClock = this.comparer(this.clock, dt);
213
- if (dueToClock > 0) {
214
- throw new Error(argumentOutOfRange);
215
- }
216
- if (dueToClock === 0) {
217
- return;
218
- }
219
- this.advanceTo(dt);
220
- };
221
-
222
- /**
223
- * Advances the scheduler's clock by the specified relative time.
224
- * @param {Number} time Relative time to advance the scheduler's clock by.
225
- */
226
- VirtualTimeSchedulerPrototype.sleep = function (time) {
227
- var dt = this.add(this.clock, time);
228
-
229
- if (this.comparer(this.clock, dt) >= 0) {
230
- throw new Error(argumentOutOfRange);
231
- }
232
-
233
- this.clock = dt;
234
- };
235
-
236
- /**
237
- * Gets the next scheduled item to be executed.
238
- * @returns {ScheduledItem} The next scheduled item.
239
- */
240
- VirtualTimeSchedulerPrototype.getNext = function () {
241
- var next;
242
- while (this.queue.length > 0) {
243
- next = this.queue.peek();
244
- if (next.isCancelled()) {
245
- this.queue.dequeue();
246
- } else {
247
- return next;
248
- }
249
- }
250
- return null;
251
- };
252
-
253
- /**
254
- * Schedules an action to be executed at dueTime.
255
- * @param {Scheduler} scheduler Scheduler to execute the action on.
256
- * @param {Number} dueTime Absolute time at which to execute the action.
257
- * @param {Function} action Action to be executed.
258
- * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
259
- */
260
- VirtualTimeSchedulerPrototype.scheduleAbsolute = function (dueTime, action) {
261
- return this.scheduleAbsoluteWithState(action, dueTime, invokeAction);
262
- };
263
-
264
- /**
265
- * Schedules an action to be executed at dueTime.
266
- * @param {Mixed} state State passed to the action to be executed.
267
- * @param {Number} dueTime Absolute time at which to execute the action.
268
- * @param {Function} action Action to be executed.
269
- * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
270
- */
271
- VirtualTimeSchedulerPrototype.scheduleAbsoluteWithState = function (state, dueTime, action) {
272
- var self = this,
273
- run = function (scheduler, state1) {
274
- self.queue.remove(si);
275
- return action(scheduler, state1);
276
- },
277
- si = new ScheduledItem(self, state, run, dueTime, self.comparer);
278
- self.queue.enqueue(si);
279
- return si.disposable;
280
- };
281
-
282
- return VirtualTimeScheduler;
283
- }(Scheduler));
284
-
285
- /** Provides a virtual time scheduler that uses Date for absolute time and number for relative time. */
286
- Rx.HistoricalScheduler = (function (_super) {
287
- inherits(HistoricalScheduler, _super);
288
-
289
- /**
290
- * Creates a new historical scheduler with the specified initial clock value.
291
- *
292
- * @constructor
293
- * @param {Number} initialClock Initial value for the clock.
294
- * @param {Function} comparer Comparer to determine causality of events based on absolute time.
295
- */
296
- function HistoricalScheduler(initialClock, comparer) {
297
- var clock = initialClock == null ? 0 : initialClock;
298
- var cmp = comparer || defaultSubComparer;
299
- _super.call(this, clock, cmp);
194
+ }
195
+ } while (this.isEnabled);
196
+ this.clock = time;
197
+ }
198
+ };
199
+
200
+ /**
201
+ * Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.
202
+ * @param {Number} time Relative time to advance the scheduler's clock by.
203
+ */
204
+ VirtualTimeSchedulerPrototype.advanceBy = function (time) {
205
+ var dt = this.add(this.clock, time),
206
+ dueToClock = this.comparer(this.clock, dt);
207
+ if (dueToClock > 0) { throw new Error(argumentOutOfRange); }
208
+ if (dueToClock === 0) { return; }
209
+
210
+ this.advanceTo(dt);
211
+ };
212
+
213
+ /**
214
+ * Advances the scheduler's clock by the specified relative time.
215
+ * @param {Number} time Relative time to advance the scheduler's clock by.
216
+ */
217
+ VirtualTimeSchedulerPrototype.sleep = function (time) {
218
+ var dt = this.add(this.clock, time);
219
+ if (this.comparer(this.clock, dt) >= 0) { throw new Error(argumentOutOfRange); }
220
+
221
+ this.clock = dt;
222
+ };
223
+
224
+ /**
225
+ * Gets the next scheduled item to be executed.
226
+ * @returns {ScheduledItem} The next scheduled item.
227
+ */
228
+ VirtualTimeSchedulerPrototype.getNext = function () {
229
+ while (this.queue.length > 0) {
230
+ var next = this.queue.peek();
231
+ if (next.isCancelled()) {
232
+ this.queue.dequeue();
233
+ } else {
234
+ return next;
300
235
  }
236
+ }
237
+ return null;
238
+ };
239
+
240
+ /**
241
+ * Schedules an action to be executed at dueTime.
242
+ * @param {Scheduler} scheduler Scheduler to execute the action on.
243
+ * @param {Number} dueTime Absolute time at which to execute the action.
244
+ * @param {Function} action Action to be executed.
245
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
246
+ */
247
+ VirtualTimeSchedulerPrototype.scheduleAbsolute = function (dueTime, action) {
248
+ return this.scheduleAbsoluteWithState(action, dueTime, invokeAction);
249
+ };
250
+
251
+ /**
252
+ * Schedules an action to be executed at dueTime.
253
+ * @param {Mixed} state State passed to the action to be executed.
254
+ * @param {Number} dueTime Absolute time at which to execute the action.
255
+ * @param {Function} action Action to be executed.
256
+ * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort).
257
+ */
258
+ VirtualTimeSchedulerPrototype.scheduleAbsoluteWithState = function (state, dueTime, action) {
259
+ var self = this;
260
+
261
+ function run(scheduler, state1) {
262
+ self.queue.remove(si);
263
+ return action(scheduler, state1);
264
+ }
265
+
266
+ var si = new ScheduledItem(this, state, run, dueTime, this.comparer);
267
+ this.queue.enqueue(si);
268
+
269
+ return si.disposable;
270
+ };
271
+
272
+ return VirtualTimeScheduler;
273
+ }(Scheduler));
274
+
275
+ /** Provides a virtual time scheduler that uses Date for absolute time and number for relative time. */
276
+ Rx.HistoricalScheduler = (function (__super__) {
277
+ inherits(HistoricalScheduler, __super__);
278
+
279
+ /**
280
+ * Creates a new historical scheduler with the specified initial clock value.
281
+ * @constructor
282
+ * @param {Number} initialClock Initial value for the clock.
283
+ * @param {Function} comparer Comparer to determine causality of events based on absolute time.
284
+ */
285
+ function HistoricalScheduler(initialClock, comparer) {
286
+ var clock = initialClock == null ? 0 : initialClock;
287
+ var cmp = comparer || defaultSubComparer;
288
+ __super__.call(this, clock, cmp);
289
+ }
290
+
291
+ var HistoricalSchedulerProto = HistoricalScheduler.prototype;
292
+
293
+ /**
294
+ * Adds a relative time value to an absolute time value.
295
+ * @param {Number} absolute Absolute virtual time value.
296
+ * @param {Number} relative Relative virtual time value to add.
297
+ * @return {Number} Resulting absolute virtual time sum value.
298
+ */
299
+ HistoricalSchedulerProto.add = function (absolute, relative) {
300
+ return absolute + relative;
301
+ };
302
+
303
+ HistoricalSchedulerProto.toDateTimeOffset = function (absolute) {
304
+ return new Date(absolute).getTime();
305
+ };
306
+
307
+ /**
308
+ * Converts the TimeSpan value to a relative virtual time value.
309
+ * @memberOf HistoricalScheduler
310
+ * @param {Number} timeSpan TimeSpan value to convert.
311
+ * @return {Number} Corresponding relative virtual time value.
312
+ */
313
+ HistoricalSchedulerProto.toRelative = function (timeSpan) {
314
+ return timeSpan;
315
+ };
301
316
 
302
- var HistoricalSchedulerProto = HistoricalScheduler.prototype;
303
-
304
- /**
305
- * Adds a relative time value to an absolute time value.
306
- * @param {Number} absolute Absolute virtual time value.
307
- * @param {Number} relative Relative virtual time value to add.
308
- * @return {Number} Resulting absolute virtual time sum value.
309
- */
310
- HistoricalSchedulerProto.add = function (absolute, relative) {
311
- return absolute + relative;
312
- };
313
-
314
- /**
315
- * @private
316
- */
317
- HistoricalSchedulerProto.toDateTimeOffset = function (absolute) {
318
- return new Date(absolute).getTime();
319
- };
320
-
321
- /**
322
- * Converts the TimeSpan value to a relative virtual time value.
323
- *
324
- * @memberOf HistoricalScheduler
325
- * @param {Number} timeSpan TimeSpan value to convert.
326
- * @return {Number} Corresponding relative virtual time value.
327
- */
328
- HistoricalSchedulerProto.toRelative = function (timeSpan) {
329
- return timeSpan;
330
- };
331
-
332
- return HistoricalScheduler;
333
- }(Rx.VirtualTimeScheduler));
334
- return Rx;
317
+ return HistoricalScheduler;
318
+ }(Rx.VirtualTimeScheduler));
319
+ return Rx;
335
320
  }));
@@ -1 +1 @@
1
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){var d=c.Scheduler,e=c.internals.PriorityQueue,f=c.internals.ScheduledItem,g=c.internals.SchedulePeriodicRecursive,h=c.Disposable.empty,i=c.internals.inherits,j=c.helpers.defaultSubComparer;return c.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function j(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function k(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function l(a,b){return b(),h}function m(b,f){this.clock=b,this.comparer=f,this.isEnabled=!1,this.queue=new e(1024),a.call(this,c,d,j,k)}i(m,a);var n=m.prototype;return n.add=b,n.toDateTimeOffset=b,n.toRelative=b,n.schedulePeriodicWithState=function(a,b,c){var d=new g(this,a,b,c);return d.start()},n.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},n.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,l)},n.start=function(){var a;if(!this.isEnabled){this.isEnabled=!0;do a=this.getNext(),null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1;while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(a){var b,c=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(argumentOutOfRange);if(0!==c&&!this.isEnabled){this.isEnabled=!0;do b=this.getNext(),null!==b&&this.comparer(b.dueTime,a)<=0?(this.comparer(b.dueTime,this.clock)>0&&(this.clock=b.dueTime),b.invoke()):this.isEnabled=!1;while(this.isEnabled);this.clock=a}},n.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(argumentOutOfRange);0!==c&&this.advanceTo(b)},n.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(argumentOutOfRange);this.clock=b},n.getNext=function(){for(var a;this.queue.length>0;){if(a=this.queue.peek(),!a.isCancelled())return a;this.queue.dequeue()}return null},n.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,l)},n.scheduleAbsoluteWithState=function(a,b,c){var d=this,e=function(a,b){return d.queue.remove(g),c(a,b)},g=new f(d,a,e,b,d.comparer);return d.queue.enqueue(g),g.disposable},m}(d),c.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||j;a.call(this,d,e)}i(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(c.VirtualTimeScheduler),c});
1
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){var d=c.Scheduler,e=c.internals.PriorityQueue,f=c.internals.ScheduledItem,g=c.internals.SchedulePeriodicRecursive,h=c.Disposable.empty,i=c.internals.inherits,j=c.helpers.defaultSubComparer;return c.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function j(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function k(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function l(a,b){return b(),h}function m(b,f){this.clock=b,this.comparer=f,this.isEnabled=!1,this.queue=new e(1024),a.call(this,c,d,j,k)}i(m,a);var n=m.prototype;return n.add=b,n.toDateTimeOffset=b,n.toRelative=b,n.schedulePeriodicWithState=function(a,b,c){var d=new g(this,a,b,c);return d.start()},n.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},n.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,l)},n.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(argumentOutOfRange);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},n.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(argumentOutOfRange);0!==c&&this.advanceTo(b)},n.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(argumentOutOfRange);this.clock=b},n.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},n.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,l)},n.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(g),c(a,b)}var e=this,g=new f(this,a,d,b,this.comparer);return this.queue.enqueue(g),g.disposable},m}(d),c.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||j;a.call(this,d,e)}i(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(c.VirtualTimeScheduler),c});
metadata CHANGED
@@ -1,33 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - jdeseno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2014-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
- - - "<"
20
+ - - <
21
21
  - !ruby/object:Gem::Version
22
22
  version: '5.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: '3.0'
30
- - - "<"
30
+ - - <
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5.0'
33
33
  description: This gem makes the RxJS js files available to the rails asset pipeline
@@ -37,7 +37,7 @@ executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
39
39
  files:
40
- - ".gitignore"
40
+ - .gitignore
41
41
  - Gemfile
42
42
  - LICENSE
43
43
  - README.md
@@ -100,19 +100,18 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ">="
103
+ - - '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: 1.3.6
111
111
  requirements: []
112
112
  rubyforge_project: rxjs-rails
113
- rubygems_version: 2.2.2
113
+ rubygems_version: 2.0.14
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Use RxJS with rails
117
117
  test_files: []
118
- has_rdoc: