flux-rails-assets 1.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 935a1ec40de0bdd71ce9bb919cf43cab1d3333d5
4
- data.tar.gz: ecdbaad6ea9a94059047622fbc9c4f819ace24af
3
+ metadata.gz: 29648fcbe2a82dd81376b3bce408361e776ba7cf
4
+ data.tar.gz: 29d1ab417b6cfd4775db80f716b36bddad1a005c
5
5
  SHA512:
6
- metadata.gz: 0b9146e89ce192d225fe1ada11a503d18c4db9a9a4281c303a89a75b152c38f86074b6f1810d743d7bd4842819afd1bc507cf647bf7542b56de736d9e8b2ac30
7
- data.tar.gz: 0ab038d6b12c6b5c076a5232149a86e9936a298201143aeef8caacb544726220862482fdee6e6be45e25a47dc09fb3fbd7672d1f31677e560a22c847bd0984d1
6
+ metadata.gz: 396db4053df874412d90bdd81e8ef79a98d4cc5414b4fe2f635107fc775e5af4b54597a86d5f1caf35f7c1dbb2ff41ebd2879d23618abc7321d4cb4add97b455
7
+ data.tar.gz: be75f3efda8050fa87cee188e62f7d237926a5eab9ffd4b6922e6bcd29790337b7aa0d0c529c8aa38487cfde8dc54bebe4e8e263a0ac080553ca022af95498c4
data/README.md CHANGED
@@ -6,7 +6,7 @@ Doesn't use CommonJS instead it creates FluxDispatcher and EventEmitter on windo
6
6
 
7
7
  Works well with react-rails server side rendering.
8
8
 
9
- - Flux version: [2.0.2](https://github.com/facebook/flux/releases/tag/2.0.2)
9
+ - Flux version: [2.1.0](https://github.com/facebook/flux/releases/tag/2.1.0)
10
10
 
11
11
 
12
12
  ## Installation
@@ -45,10 +45,10 @@ This will create two globals you can use to create your application's dispatcher
45
45
  ExampleStore.dispatchToken = AppDispatcher.register(function (payload) {
46
46
  var action = payload.action;
47
47
 
48
- switch(action.type) {
49
-
48
+ switch(action.actionType) {
49
+
50
50
  case 'EXAMPLE_ACTION':
51
- ExampleStore.emitChange();
51
+ ExampleStore.emit('change');
52
52
  break;
53
53
 
54
54
  default:
@@ -1,320 +1,367 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Flux=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
- /**
3
- * Copyright (c) 2014, Facebook, Inc.
4
- * All rights reserved.
5
- *
6
- * This source code is licensed under the BSD-style license found in the
7
- * LICENSE file in the root directory of this source tree. An additional grant
8
- * of patent rights can be found in the PATENTS file in the same directory.
9
- */
10
-
11
- module.exports.Dispatcher = require('./lib/Dispatcher')
12
- window.FluxDispatcher = module.exports.Dispatcher
13
-
14
- },{"./lib/Dispatcher":2}],2:[function(require,module,exports){
15
- /*
16
- * Copyright (c) 2014, Facebook, Inc.
17
- * All rights reserved.
18
- *
19
- * This source code is licensed under the BSD-style license found in the
20
- * LICENSE file in the root directory of this source tree. An additional grant
21
- * of patent rights can be found in the PATENTS file in the same directory.
22
- *
23
- * @providesModule Dispatcher
24
- * @typechecks
25
- */
26
-
27
- var invariant = require('./invariant');
28
-
29
- var _lastID = 1;
30
- var _prefix = 'ID_';
31
-
32
- /**
33
- * Dispatcher is used to broadcast payloads to registered callbacks. This is
34
- * different from generic pub-sub systems in two ways:
35
- *
36
- * 1) Callbacks are not subscribed to particular events. Every payload is
37
- * dispatched to every registered callback.
38
- * 2) Callbacks can be deferred in whole or part until other callbacks have
39
- * been executed.
40
- *
41
- * For example, consider this hypothetical flight destination form, which
42
- * selects a default city when a country is selected:
43
- *
44
- * var flightDispatcher = new Dispatcher();
45
- *
46
- * // Keeps track of which country is selected
47
- * var CountryStore = {country: null};
48
- *
49
- * // Keeps track of which city is selected
50
- * var CityStore = {city: null};
51
- *
52
- * // Keeps track of the base flight price of the selected city
53
- * var FlightPriceStore = {price: null}
54
- *
55
- * When a user changes the selected city, we dispatch the payload:
56
- *
57
- * flightDispatcher.dispatch({
58
- * actionType: 'city-update',
59
- * selectedCity: 'paris'
60
- * });
61
- *
62
- * This payload is digested by `CityStore`:
63
- *
64
- * flightDispatcher.register(function(payload)) {
65
- * if (payload.actionType === 'city-update') {
66
- * CityStore.city = payload.selectedCity;
67
- * }
68
- * });
69
- *
70
- * When the user selects a country, we dispatch the payload:
71
- *
72
- * flightDispatcher.dispatch({
73
- * actionType: 'country-update',
74
- * selectedCountry: 'australia'
75
- * });
76
- *
77
- * This payload is digested by both stores:
78
- *
79
- * CountryStore.dispatchToken = flightDispatcher.register(function(payload) {
80
- * if (payload.actionType === 'country-update') {
81
- * CountryStore.country = payload.selectedCountry;
82
- * }
83
- * });
84
- *
85
- * When the callback to update `CountryStore` is registered, we save a reference
86
- * to the returned token. Using this token with `waitFor()`, we can guarantee
87
- * that `CountryStore` is updated before the callback that updates `CityStore`
88
- * needs to query its data.
89
- *
90
- * CityStore.dispatchToken = flightDispatcher.register(function(payload) {
91
- * if (payload.actionType === 'country-update') {
92
- * // `CountryStore.country` may not be updated.
93
- * flightDispatcher.waitFor([CountryStore.dispatchToken]);
94
- * // `CountryStore.country` is now guaranteed to be updated.
95
- *
96
- * // Select the default city for the new country
97
- * CityStore.city = getDefaultCityForCountry(CountryStore.country);
98
- * }
99
- * });
100
- *
101
- * The usage of `waitFor()` can be chained, for example:
102
- *
103
- * FlightPriceStore.dispatchToken =
104
- * flightDispatcher.register(function(payload)) {
105
- * switch (payload.actionType) {
106
- * case 'country-update':
107
- * flightDispatcher.waitFor([CityStore.dispatchToken]);
108
- * FlightPriceStore.price =
109
- * getFlightPriceStore(CountryStore.country, CityStore.city);
110
- * break;
111
- *
112
- * case 'city-update':
113
- * FlightPriceStore.price =
114
- * FlightPriceStore(CountryStore.country, CityStore.city);
115
- * break;
116
- * }
117
- * });
118
- *
119
- * The `country-update` payload will be guaranteed to invoke the stores'
120
- * registered callbacks in order: `CountryStore`, `CityStore`, then
121
- * `FlightPriceStore`.
122
- */
123
-
124
- function Dispatcher() {"use strict";
125
- this.$Dispatcher_callbacks = {};
126
- this.$Dispatcher_isPending = {};
127
- this.$Dispatcher_isHandled = {};
128
- this.$Dispatcher_isDispatching = false;
129
- this.$Dispatcher_pendingPayload = null;
130
- }
131
-
132
- /**
133
- * Registers a callback to be invoked with every dispatched payload. Returns
134
- * a token that can be used with `waitFor()`.
135
- *
136
- * @param {function} callback
137
- * @return {string}
138
- */
139
- Dispatcher.prototype.register=function(callback) {"use strict";
140
- var id = _prefix + _lastID++;
141
- this.$Dispatcher_callbacks[id] = callback;
142
- return id;
143
- };
144
-
145
- /**
146
- * Removes a callback based on its token.
147
- *
148
- * @param {string} id
149
- */
150
- Dispatcher.prototype.unregister=function(id) {"use strict";
151
- invariant(
152
- this.$Dispatcher_callbacks[id],
153
- 'Dispatcher.unregister(...): `%s` does not map to a registered callback.',
154
- id
155
- );
156
- delete this.$Dispatcher_callbacks[id];
157
- };
158
-
159
- /**
160
- * Waits for the callbacks specified to be invoked before continuing execution
161
- * of the current callback. This method should only be used by a callback in
162
- * response to a dispatched payload.
163
- *
164
- * @param {array<string>} ids
165
- */
166
- Dispatcher.prototype.waitFor=function(ids) {"use strict";
167
- invariant(
168
- this.$Dispatcher_isDispatching,
169
- 'Dispatcher.waitFor(...): Must be invoked while dispatching.'
170
- );
171
- for (var ii = 0; ii < ids.length; ii++) {
172
- var id = ids[ii];
173
- if (this.$Dispatcher_isPending[id]) {
174
- invariant(
175
- this.$Dispatcher_isHandled[id],
176
- 'Dispatcher.waitFor(...): Circular dependency detected while ' +
177
- 'waiting for `%s`.',
178
- id
179
- );
180
- continue;
181
- }
182
- invariant(
183
- this.$Dispatcher_callbacks[id],
184
- 'Dispatcher.waitFor(...): `%s` does not map to a registered callback.',
185
- id
186
- );
187
- this.$Dispatcher_invokeCallback(id);
188
- }
189
- };
190
-
191
- /**
192
- * Dispatches a payload to all registered callbacks.
193
- *
194
- * @param {object} payload
195
- */
196
- Dispatcher.prototype.dispatch=function(payload) {"use strict";
197
- invariant(
198
- !this.$Dispatcher_isDispatching,
199
- 'Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.'
200
- );
201
- this.$Dispatcher_startDispatching(payload);
202
- try {
203
- for (var id in this.$Dispatcher_callbacks) {
204
- if (this.$Dispatcher_isPending[id]) {
205
- continue;
206
- }
207
- this.$Dispatcher_invokeCallback(id);
208
- }
209
- } finally {
210
- this.$Dispatcher_stopDispatching();
211
- }
212
- };
213
-
214
- /**
215
- * Is this Dispatcher currently dispatching.
216
- *
217
- * @return {boolean}
218
- */
219
- Dispatcher.prototype.isDispatching=function() {"use strict";
220
- return this.$Dispatcher_isDispatching;
221
- };
222
-
223
- /**
224
- * Call the callback stored with the given id. Also do some internal
225
- * bookkeeping.
226
- *
227
- * @param {string} id
228
- * @internal
229
- */
230
- Dispatcher.prototype.$Dispatcher_invokeCallback=function(id) {"use strict";
231
- this.$Dispatcher_isPending[id] = true;
232
- this.$Dispatcher_callbacks[id](this.$Dispatcher_pendingPayload);
233
- this.$Dispatcher_isHandled[id] = true;
234
- };
235
-
236
- /**
237
- * Set up bookkeeping needed when dispatching.
238
- *
239
- * @param {object} payload
240
- * @internal
241
- */
242
- Dispatcher.prototype.$Dispatcher_startDispatching=function(payload) {"use strict";
243
- for (var id in this.$Dispatcher_callbacks) {
244
- this.$Dispatcher_isPending[id] = false;
245
- this.$Dispatcher_isHandled[id] = false;
246
- }
247
- this.$Dispatcher_pendingPayload = payload;
248
- this.$Dispatcher_isDispatching = true;
249
- };
250
-
251
- /**
252
- * Clear bookkeeping used for dispatching.
253
- *
254
- * @internal
255
- */
256
- Dispatcher.prototype.$Dispatcher_stopDispatching=function() {"use strict";
257
- this.$Dispatcher_pendingPayload = null;
258
- this.$Dispatcher_isDispatching = false;
259
- };
260
-
261
-
262
- module.exports = Dispatcher;
263
-
264
- },{"./invariant":3}],3:[function(require,module,exports){
265
- /**
266
- * Copyright (c) 2014, Facebook, Inc.
267
- * All rights reserved.
268
- *
269
- * This source code is licensed under the BSD-style license found in the
270
- * LICENSE file in the root directory of this source tree. An additional grant
271
- * of patent rights can be found in the PATENTS file in the same directory.
272
- *
273
- * @providesModule invariant
274
- */
275
-
276
- "use strict";
277
-
278
- /**
279
- * Use invariant() to assert state which your program assumes to be true.
280
- *
281
- * Provide sprintf-style format (only %s is supported) and arguments
282
- * to provide information about what broke and what you were
283
- * expecting.
284
- *
285
- * The invariant message will be stripped in production, but the invariant
286
- * will remain to ensure logic does not differ in production.
287
- */
288
-
289
- var invariant = function(condition, format, a, b, c, d, e, f) {
290
- if (false) {
291
- if (format === undefined) {
292
- throw new Error('invariant requires an error message argument');
293
- }
294
- }
295
-
296
- if (!condition) {
297
- var error;
298
- if (format === undefined) {
299
- error = new Error(
300
- 'Minified exception occurred; use the non-minified dev environment ' +
301
- 'for the full error message and additional helpful warnings.'
302
- );
303
- } else {
304
- var args = [a, b, c, d, e, f];
305
- var argIndex = 0;
306
- error = new Error(
307
- 'Invariant Violation: ' +
308
- format.replace(/%s/g, function() { return args[argIndex++]; })
309
- );
310
- }
311
-
312
- error.framesToPop = 1; // we don't care about invariant's own frame
313
- throw error;
314
- }
315
- };
316
-
317
- module.exports = invariant;
318
-
319
- },{}]},{},[1])(1)
320
- });
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(factory);
6
+ else if(typeof exports === 'object')
7
+ exports["Flux"] = factory();
8
+ else
9
+ root["Flux"] = factory();
10
+ })(this, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId])
20
+ /******/ return installedModules[moduleId].exports;
21
+
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ exports: {},
25
+ /******/ id: moduleId,
26
+ /******/ loaded: false
27
+ /******/ };
28
+
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.loaded = true;
34
+
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+
39
+
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+
46
+ /******/ // __webpack_public_path__
47
+ /******/ __webpack_require__.p = "";
48
+
49
+ /******/ // Load entry module and return exports
50
+ /******/ return __webpack_require__(0);
51
+ /******/ })
52
+ /************************************************************************/
53
+ /******/ ([
54
+ /* 0 */
55
+ /***/ function(module, exports, __webpack_require__) {
56
+
57
+ /**
58
+ * Copyright (c) 2014-2015, Facebook, Inc.
59
+ * All rights reserved.
60
+ *
61
+ * This source code is licensed under the BSD-style license found in the
62
+ * LICENSE file in the root directory of this source tree. An additional grant
63
+ * of patent rights can be found in the PATENTS file in the same directory.
64
+ */
65
+
66
+ 'use strict';
67
+
68
+ module.exports.Dispatcher = __webpack_require__(1);
69
+
70
+ /***/ },
71
+ /* 1 */
72
+ /***/ function(module, exports, __webpack_require__) {
73
+
74
+ /**
75
+ * Copyright (c) 2014-2015, Facebook, Inc.
76
+ * All rights reserved.
77
+ *
78
+ * This source code is licensed under the BSD-style license found in the
79
+ * LICENSE file in the root directory of this source tree. An additional grant
80
+ * of patent rights can be found in the PATENTS file in the same directory.
81
+ *
82
+ * @providesModule Dispatcher
83
+ *
84
+ * @preventMunge
85
+ */
86
+
87
+ 'use strict';
88
+
89
+ exports.__esModule = true;
90
+
91
+ function _classCallCheck(instance, Constructor) {
92
+ if (!(instance instanceof Constructor)) {
93
+ throw new TypeError('Cannot call a class as a function');
94
+ }
95
+ }
96
+
97
+ var invariant = __webpack_require__(2);
98
+
99
+ var _prefix = 'ID_';
100
+
101
+ /**
102
+ * Dispatcher is used to broadcast payloads to registered callbacks. This is
103
+ * different from generic pub-sub systems in two ways:
104
+ *
105
+ * 1) Callbacks are not subscribed to particular events. Every payload is
106
+ * dispatched to every registered callback.
107
+ * 2) Callbacks can be deferred in whole or part until other callbacks have
108
+ * been executed.
109
+ *
110
+ * For example, consider this hypothetical flight destination form, which
111
+ * selects a default city when a country is selected:
112
+ *
113
+ * var flightDispatcher = new Dispatcher();
114
+ *
115
+ * // Keeps track of which country is selected
116
+ * var CountryStore = {country: null};
117
+ *
118
+ * // Keeps track of which city is selected
119
+ * var CityStore = {city: null};
120
+ *
121
+ * // Keeps track of the base flight price of the selected city
122
+ * var FlightPriceStore = {price: null}
123
+ *
124
+ * When a user changes the selected city, we dispatch the payload:
125
+ *
126
+ * flightDispatcher.dispatch({
127
+ * actionType: 'city-update',
128
+ * selectedCity: 'paris'
129
+ * });
130
+ *
131
+ * This payload is digested by `CityStore`:
132
+ *
133
+ * flightDispatcher.register(function(payload) {
134
+ * if (payload.actionType === 'city-update') {
135
+ * CityStore.city = payload.selectedCity;
136
+ * }
137
+ * });
138
+ *
139
+ * When the user selects a country, we dispatch the payload:
140
+ *
141
+ * flightDispatcher.dispatch({
142
+ * actionType: 'country-update',
143
+ * selectedCountry: 'australia'
144
+ * });
145
+ *
146
+ * This payload is digested by both stores:
147
+ *
148
+ * CountryStore.dispatchToken = flightDispatcher.register(function(payload) {
149
+ * if (payload.actionType === 'country-update') {
150
+ * CountryStore.country = payload.selectedCountry;
151
+ * }
152
+ * });
153
+ *
154
+ * When the callback to update `CountryStore` is registered, we save a reference
155
+ * to the returned token. Using this token with `waitFor()`, we can guarantee
156
+ * that `CountryStore` is updated before the callback that updates `CityStore`
157
+ * needs to query its data.
158
+ *
159
+ * CityStore.dispatchToken = flightDispatcher.register(function(payload) {
160
+ * if (payload.actionType === 'country-update') {
161
+ * // `CountryStore.country` may not be updated.
162
+ * flightDispatcher.waitFor([CountryStore.dispatchToken]);
163
+ * // `CountryStore.country` is now guaranteed to be updated.
164
+ *
165
+ * // Select the default city for the new country
166
+ * CityStore.city = getDefaultCityForCountry(CountryStore.country);
167
+ * }
168
+ * });
169
+ *
170
+ * The usage of `waitFor()` can be chained, for example:
171
+ *
172
+ * FlightPriceStore.dispatchToken =
173
+ * flightDispatcher.register(function(payload) {
174
+ * switch (payload.actionType) {
175
+ * case 'country-update':
176
+ * case 'city-update':
177
+ * flightDispatcher.waitFor([CityStore.dispatchToken]);
178
+ * FlightPriceStore.price =
179
+ * getFlightPriceStore(CountryStore.country, CityStore.city);
180
+ * break;
181
+ * }
182
+ * });
183
+ *
184
+ * The `country-update` payload will be guaranteed to invoke the stores'
185
+ * registered callbacks in order: `CountryStore`, `CityStore`, then
186
+ * `FlightPriceStore`.
187
+ */
188
+
189
+ var Dispatcher = (function () {
190
+ function Dispatcher() {
191
+ _classCallCheck(this, Dispatcher);
192
+
193
+ this._callbacks = {};
194
+ this._isDispatching = false;
195
+ this._isHandled = {};
196
+ this._isPending = {};
197
+ this._lastID = 1;
198
+ }
199
+
200
+ /**
201
+ * Registers a callback to be invoked with every dispatched payload. Returns
202
+ * a token that can be used with `waitFor()`.
203
+ */
204
+
205
+ Dispatcher.prototype.register = function register(callback) {
206
+ var id = _prefix + this._lastID++;
207
+ this._callbacks[id] = callback;
208
+ return id;
209
+ };
210
+
211
+ /**
212
+ * Removes a callback based on its token.
213
+ */
214
+
215
+ Dispatcher.prototype.unregister = function unregister(id) {
216
+ !this._callbacks[id] ? true ? invariant(false, 'Dispatcher.unregister(...): `%s` does not map to a registered callback.', id) : invariant(false) : undefined;
217
+ delete this._callbacks[id];
218
+ };
219
+
220
+ /**
221
+ * Waits for the callbacks specified to be invoked before continuing execution
222
+ * of the current callback. This method should only be used by a callback in
223
+ * response to a dispatched payload.
224
+ */
225
+
226
+ Dispatcher.prototype.waitFor = function waitFor(ids) {
227
+ !this._isDispatching ? true ? invariant(false, 'Dispatcher.waitFor(...): Must be invoked while dispatching.') : invariant(false) : undefined;
228
+ for (var ii = 0; ii < ids.length; ii++) {
229
+ var id = ids[ii];
230
+ if (this._isPending[id]) {
231
+ !this._isHandled[id] ? true ? invariant(false, 'Dispatcher.waitFor(...): Circular dependency detected while ' + 'waiting for `%s`.', id) : invariant(false) : undefined;
232
+ continue;
233
+ }
234
+ !this._callbacks[id] ? true ? invariant(false, 'Dispatcher.waitFor(...): `%s` does not map to a registered callback.', id) : invariant(false) : undefined;
235
+ this._invokeCallback(id);
236
+ }
237
+ };
238
+
239
+ /**
240
+ * Dispatches a payload to all registered callbacks.
241
+ */
242
+
243
+ Dispatcher.prototype.dispatch = function dispatch(payload) {
244
+ !!this._isDispatching ? true ? invariant(false, 'Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch.') : invariant(false) : undefined;
245
+ this._startDispatching(payload);
246
+ try {
247
+ for (var id in this._callbacks) {
248
+ if (this._isPending[id]) {
249
+ continue;
250
+ }
251
+ this._invokeCallback(id);
252
+ }
253
+ } finally {
254
+ this._stopDispatching();
255
+ }
256
+ };
257
+
258
+ /**
259
+ * Is this Dispatcher currently dispatching.
260
+ */
261
+
262
+ Dispatcher.prototype.isDispatching = function isDispatching() {
263
+ return this._isDispatching;
264
+ };
265
+
266
+ /**
267
+ * Call the callback stored with the given id. Also do some internal
268
+ * bookkeeping.
269
+ *
270
+ * @internal
271
+ */
272
+
273
+ Dispatcher.prototype._invokeCallback = function _invokeCallback(id) {
274
+ this._isPending[id] = true;
275
+ this._callbacks[id](this._pendingPayload);
276
+ this._isHandled[id] = true;
277
+ };
278
+
279
+ /**
280
+ * Set up bookkeeping needed when dispatching.
281
+ *
282
+ * @internal
283
+ */
284
+
285
+ Dispatcher.prototype._startDispatching = function _startDispatching(payload) {
286
+ for (var id in this._callbacks) {
287
+ this._isPending[id] = false;
288
+ this._isHandled[id] = false;
289
+ }
290
+ this._pendingPayload = payload;
291
+ this._isDispatching = true;
292
+ };
293
+
294
+ /**
295
+ * Clear bookkeeping used for dispatching.
296
+ *
297
+ * @internal
298
+ */
299
+
300
+ Dispatcher.prototype._stopDispatching = function _stopDispatching() {
301
+ delete this._pendingPayload;
302
+ this._isDispatching = false;
303
+ };
304
+
305
+ return Dispatcher;
306
+ })();
307
+
308
+ module.exports = Dispatcher;
309
+
310
+ /***/ },
311
+ /* 2 */
312
+ /***/ function(module, exports, __webpack_require__) {
313
+
314
+ /**
315
+ * Copyright 2013-2015, Facebook, Inc.
316
+ * All rights reserved.
317
+ *
318
+ * This source code is licensed under the BSD-style license found in the
319
+ * LICENSE file in the root directory of this source tree. An additional grant
320
+ * of patent rights can be found in the PATENTS file in the same directory.
321
+ *
322
+ * @providesModule invariant
323
+ */
324
+
325
+ "use strict";
326
+
327
+ /**
328
+ * Use invariant() to assert state which your program assumes to be true.
329
+ *
330
+ * Provide sprintf-style format (only %s is supported) and arguments
331
+ * to provide information about what broke and what you were
332
+ * expecting.
333
+ *
334
+ * The invariant message will be stripped in production, but the invariant
335
+ * will remain to ensure logic does not differ in production.
336
+ */
337
+
338
+ var invariant = function invariant(condition, format, a, b, c, d, e, f) {
339
+ if (true) {
340
+ if (format === undefined) {
341
+ throw new Error('invariant requires an error message argument');
342
+ }
343
+ }
344
+
345
+ if (!condition) {
346
+ var error;
347
+ if (format === undefined) {
348
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
349
+ } else {
350
+ var args = [a, b, c, d, e, f];
351
+ var argIndex = 0;
352
+ error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () {
353
+ return args[argIndex++];
354
+ }));
355
+ }
356
+
357
+ error.framesToPop = 1; // we don't care about invariant's own frame
358
+ throw error;
359
+ }
360
+ };
361
+
362
+ module.exports = invariant;
363
+
364
+ /***/ }
365
+ /******/ ])
366
+ });
367
+ ;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flux-rails-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Ritter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-27 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -45,11 +45,11 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - LICENSE.txt
49
- - README.md
50
48
  - lib/flux-rails-assets.rb
51
49
  - vendor/assets/javascript/eventemitter.js
52
50
  - vendor/assets/javascript/flux.js
51
+ - LICENSE.txt
52
+ - README.md
53
53
  homepage: https://github.com/stefanritter/flux-rails-assets
54
54
  licenses:
55
55
  - MIT
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubyforge_project:
73
- rubygems_version: 2.2.2
73
+ rubygems_version: 2.1.11
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Flux dispatcher and Node Event Emitter for the Ruby on Rails asset pipeline