react-redux-rails 3.1.0.1 → 3.1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38db04b9610f9dfdd5f636fb8a5a6b438d04b0eb
4
- data.tar.gz: 8f0490b01f03c5a5080109670bf64979fd32d1a3
3
+ metadata.gz: 33a9ad89c8a7a3834e91d306d0bcf47dfa6587d8
4
+ data.tar.gz: 52e6149e7036c2cc81e2d3112fe048b423bd5c05
5
5
  SHA512:
6
- metadata.gz: d2a04718464c83d401347cdeb1296ee2a7c9e06f68ed111ea858615e45cdf2fdb9cada02bfd232bf1f9fcb148eb59eeeaecfc8a91196c52abe191ad07579f2ff
7
- data.tar.gz: 939ca03a413feef81e16a9e4786c7118421606f3802cc16c746305f6e6d437b156ef9af77b184856c14922fb8f4605dd416f162dcc44dd959f677d6cd54ee0b5
6
+ metadata.gz: 6654731ece3488ded9de3ef5a4325edc6c2e33e2c89c1df1b828e134e392f46e2764b9ddd5b818042ef48f2ac0992a6d469b5f8f050b5d995403771da8f99052
7
+ data.tar.gz: c341a82121341aa9b15b0fccf2abd21998760b6705aba12fca4cde7ee6863a18cd2c00dda4d012ee7429a13c33dfd8148a048c5f9fd5b43249fec6a1e77534b5
@@ -1,7 +1,7 @@
1
1
  module React
2
2
  module Redux
3
3
  module Rails
4
- VERSION = "3.1.0.1"
4
+ VERSION = "3.1.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -0,0 +1,630 @@
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["Redux"] = factory();
8
+ else
9
+ root["Redux"] = 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
+ 'use strict';
58
+
59
+ exports.__esModule = true;
60
+
61
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
62
+
63
+ var _createStore = __webpack_require__(1);
64
+
65
+ var _createStore2 = _interopRequireDefault(_createStore);
66
+
67
+ var _utilsCombineReducers = __webpack_require__(7);
68
+
69
+ var _utilsCombineReducers2 = _interopRequireDefault(_utilsCombineReducers);
70
+
71
+ var _utilsBindActionCreators = __webpack_require__(6);
72
+
73
+ var _utilsBindActionCreators2 = _interopRequireDefault(_utilsBindActionCreators);
74
+
75
+ var _utilsApplyMiddleware = __webpack_require__(5);
76
+
77
+ var _utilsApplyMiddleware2 = _interopRequireDefault(_utilsApplyMiddleware);
78
+
79
+ var _utilsCompose = __webpack_require__(2);
80
+
81
+ var _utilsCompose2 = _interopRequireDefault(_utilsCompose);
82
+
83
+ exports.createStore = _createStore2['default'];
84
+ exports.combineReducers = _utilsCombineReducers2['default'];
85
+ exports.bindActionCreators = _utilsBindActionCreators2['default'];
86
+ exports.applyMiddleware = _utilsApplyMiddleware2['default'];
87
+ exports.compose = _utilsCompose2['default'];
88
+
89
+ /***/ },
90
+ /* 1 */
91
+ /***/ function(module, exports, __webpack_require__) {
92
+
93
+ 'use strict';
94
+
95
+ exports.__esModule = true;
96
+ exports['default'] = createStore;
97
+
98
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
99
+
100
+ var _utilsIsPlainObject = __webpack_require__(3);
101
+
102
+ var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
103
+
104
+ /**
105
+ * These are private action types reserved by Redux.
106
+ * For any unknown actions, you must return the current state.
107
+ * If the current state is undefined, you must return the initial state.
108
+ * Do not reference these action types directly in your code.
109
+ */
110
+ var ActionTypes = {
111
+ INIT: '@@redux/INIT'
112
+ };
113
+
114
+ exports.ActionTypes = ActionTypes;
115
+ /**
116
+ * Creates a Redux store that holds the state tree.
117
+ * The only way to change the data in the store is to call `dispatch()` on it.
118
+ *
119
+ * There should only be a single store in your app. To specify how different
120
+ * parts of the state tree respond to actions, you may combine several reducers
121
+ * into a single reducer function by using `combineReducers`.
122
+ *
123
+ * @param {Function} reducer A function that returns the next state tree, given
124
+ * the current state tree and the action to handle.
125
+ *
126
+ * @param {any} [initialState] The initial state. You may optionally specify it
127
+ * to hydrate the state from the server in universal apps, or to restore a
128
+ * previously serialized user session.
129
+ * If you use `combineReducers` to produce the root reducer function, this must be
130
+ * an object with the same shape as `combineReducers` keys.
131
+ *
132
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
133
+ * and subscribe to changes.
134
+ */
135
+
136
+ function createStore(reducer, initialState) {
137
+ if (typeof reducer !== 'function') {
138
+ throw new Error('Expected the reducer to be a function.');
139
+ }
140
+
141
+ var currentReducer = reducer;
142
+ var currentState = initialState;
143
+ var listeners = [];
144
+ var isDispatching = false;
145
+
146
+ /**
147
+ * Reads the state tree managed by the store.
148
+ *
149
+ * @returns {any} The current state tree of your application.
150
+ */
151
+ function getState() {
152
+ return currentState;
153
+ }
154
+
155
+ /**
156
+ * Adds a change listener. It will be called any time an action is dispatched,
157
+ * and some part of the state tree may potentially have changed. You may then
158
+ * call `getState()` to read the current state tree inside the callback.
159
+ *
160
+ * @param {Function} listener A callback to be invoked on every dispatch.
161
+ * @returns {Function} A function to remove this change listener.
162
+ */
163
+ function subscribe(listener) {
164
+ listeners.push(listener);
165
+
166
+ return function unsubscribe() {
167
+ var index = listeners.indexOf(listener);
168
+ listeners.splice(index, 1);
169
+ };
170
+ }
171
+
172
+ /**
173
+ * Dispatches an action. It is the only way to trigger a state change.
174
+ *
175
+ * The `reducer` function, used to create the store, will be called with the
176
+ * current state tree and the given `action`. Its return value will
177
+ * be considered the **next** state of the tree, and the change listeners
178
+ * will be notified.
179
+ *
180
+ * The base implementation only supports plain object actions. If you want to
181
+ * dispatch a Promise, an Observable, a thunk, or something else, you need to
182
+ * wrap your store creating function into the corresponding middleware. For
183
+ * example, see the documentation for the `redux-thunk` package. Even the
184
+ * middleware will eventually dispatch plain object actions using this method.
185
+ *
186
+ * @param {Object} action A plain object representing “what changed”. It is
187
+ * a good idea to keep actions serializable so you can record and replay user
188
+ * sessions, or use the time travelling `redux-devtools`. An action must have
189
+ * a `type` property which may not be `undefined`. It is a good idea to use
190
+ * string constants for action types.
191
+ *
192
+ * @returns {Object} For convenience, the same action object you dispatched.
193
+ *
194
+ * Note that, if you use a custom middleware, it may wrap `dispatch()` to
195
+ * return something else (for example, a Promise you can await).
196
+ */
197
+ function dispatch(action) {
198
+ if (!_utilsIsPlainObject2['default'](action)) {
199
+ throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
200
+ }
201
+
202
+ if (typeof action.type === 'undefined') {
203
+ throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
204
+ }
205
+
206
+ if (isDispatching) {
207
+ throw new Error('Reducers may not dispatch actions.');
208
+ }
209
+
210
+ try {
211
+ isDispatching = true;
212
+ currentState = currentReducer(currentState, action);
213
+ } finally {
214
+ isDispatching = false;
215
+ }
216
+
217
+ listeners.slice().forEach(function (listener) {
218
+ return listener();
219
+ });
220
+ return action;
221
+ }
222
+
223
+ /**
224
+ * Replaces the reducer currently used by the store to calculate the state.
225
+ *
226
+ * You might need this if your app implements code splitting and you want to
227
+ * load some of the reducers dynamically. You might also need this if you
228
+ * implement a hot reloading mechanism for Redux.
229
+ *
230
+ * @param {Function} nextReducer The reducer for the store to use instead.
231
+ * @returns {void}
232
+ */
233
+ function replaceReducer(nextReducer) {
234
+ currentReducer = nextReducer;
235
+ dispatch({ type: ActionTypes.INIT });
236
+ }
237
+
238
+ // When a store is created, an "INIT" action is dispatched so that every
239
+ // reducer returns their initial state. This effectively populates
240
+ // the initial state tree.
241
+ dispatch({ type: ActionTypes.INIT });
242
+
243
+ return {
244
+ dispatch: dispatch,
245
+ subscribe: subscribe,
246
+ getState: getState,
247
+ replaceReducer: replaceReducer
248
+ };
249
+ }
250
+
251
+ /***/ },
252
+ /* 2 */
253
+ /***/ function(module, exports) {
254
+
255
+ /**
256
+ * Composes single-argument functions from right to left.
257
+ *
258
+ * @param {...Function} funcs The functions to compose.
259
+ * @returns {Function} A function obtained by composing functions from right to
260
+ * left. For example, compose(f, g, h) is identical to arg => f(g(h(arg))).
261
+ */
262
+ "use strict";
263
+
264
+ exports.__esModule = true;
265
+ exports["default"] = compose;
266
+
267
+ function compose() {
268
+ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
269
+ funcs[_key] = arguments[_key];
270
+ }
271
+
272
+ return function (arg) {
273
+ return funcs.reduceRight(function (composed, f) {
274
+ return f(composed);
275
+ }, arg);
276
+ };
277
+ }
278
+
279
+ module.exports = exports["default"];
280
+
281
+ /***/ },
282
+ /* 3 */
283
+ /***/ function(module, exports) {
284
+
285
+ 'use strict';
286
+
287
+ exports.__esModule = true;
288
+ exports['default'] = isPlainObject;
289
+ var fnToString = function fnToString(fn) {
290
+ return Function.prototype.toString.call(fn);
291
+ };
292
+
293
+ /**
294
+ * @param {any} obj The object to inspect.
295
+ * @returns {boolean} True if the argument appears to be a plain object.
296
+ */
297
+
298
+ function isPlainObject(obj) {
299
+ if (!obj || typeof obj !== 'object') {
300
+ return false;
301
+ }
302
+
303
+ var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;
304
+
305
+ if (proto === null) {
306
+ return true;
307
+ }
308
+
309
+ var constructor = proto.constructor;
310
+
311
+ return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
312
+ }
313
+
314
+ module.exports = exports['default'];
315
+
316
+ /***/ },
317
+ /* 4 */
318
+ /***/ function(module, exports) {
319
+
320
+ /**
321
+ * Applies a function to every key-value pair inside an object.
322
+ *
323
+ * @param {Object} obj The source object.
324
+ * @param {Function} fn The mapper function that receives the value and the key.
325
+ * @returns {Object} A new object that contains the mapped values for the keys.
326
+ */
327
+ "use strict";
328
+
329
+ exports.__esModule = true;
330
+ exports["default"] = mapValues;
331
+
332
+ function mapValues(obj, fn) {
333
+ return Object.keys(obj).reduce(function (result, key) {
334
+ result[key] = fn(obj[key], key);
335
+ return result;
336
+ }, {});
337
+ }
338
+
339
+ module.exports = exports["default"];
340
+
341
+ /***/ },
342
+ /* 5 */
343
+ /***/ function(module, exports, __webpack_require__) {
344
+
345
+ 'use strict';
346
+
347
+ exports.__esModule = true;
348
+
349
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
350
+
351
+ exports['default'] = applyMiddleware;
352
+
353
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
354
+
355
+ var _compose = __webpack_require__(2);
356
+
357
+ var _compose2 = _interopRequireDefault(_compose);
358
+
359
+ /**
360
+ * Creates a store enhancer that applies middleware to the dispatch method
361
+ * of the Redux store. This is handy for a variety of tasks, such as expressing
362
+ * asynchronous actions in a concise manner, or logging every action payload.
363
+ *
364
+ * See `redux-thunk` package as an example of the Redux middleware.
365
+ *
366
+ * Because middleware is potentially asynchronous, this should be the first
367
+ * store enhancer in the composition chain.
368
+ *
369
+ * Note that each middleware will be given the `dispatch` and `getState` functions
370
+ * as named arguments.
371
+ *
372
+ * @param {...Function} middlewares The middleware chain to be applied.
373
+ * @returns {Function} A store enhancer applying the middleware.
374
+ */
375
+
376
+ function applyMiddleware() {
377
+ for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
378
+ middlewares[_key] = arguments[_key];
379
+ }
380
+
381
+ return function (next) {
382
+ return function (reducer, initialState) {
383
+ var store = next(reducer, initialState);
384
+ var _dispatch = store.dispatch;
385
+ var chain = [];
386
+
387
+ var middlewareAPI = {
388
+ getState: store.getState,
389
+ dispatch: function dispatch(action) {
390
+ return _dispatch(action);
391
+ }
392
+ };
393
+ chain = middlewares.map(function (middleware) {
394
+ return middleware(middlewareAPI);
395
+ });
396
+ _dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
397
+
398
+ return _extends({}, store, {
399
+ dispatch: _dispatch
400
+ });
401
+ };
402
+ };
403
+ }
404
+
405
+ module.exports = exports['default'];
406
+
407
+ /***/ },
408
+ /* 6 */
409
+ /***/ function(module, exports, __webpack_require__) {
410
+
411
+ 'use strict';
412
+
413
+ exports.__esModule = true;
414
+ exports['default'] = bindActionCreators;
415
+
416
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
417
+
418
+ var _utilsMapValues = __webpack_require__(4);
419
+
420
+ var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues);
421
+
422
+ function bindActionCreator(actionCreator, dispatch) {
423
+ return function () {
424
+ return dispatch(actionCreator.apply(undefined, arguments));
425
+ };
426
+ }
427
+
428
+ /**
429
+ * Turns an object whose values are action creators, into an object with the
430
+ * same keys, but with every function wrapped into a `dispatch` call so they
431
+ * may be invoked directly. This is just a convenience method, as you can call
432
+ * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
433
+ *
434
+ * For convenience, you can also pass a single function as the first argument,
435
+ * and get a function in return.
436
+ *
437
+ * @param {Function|Object} actionCreators An object whose values are action
438
+ * creator functions. One handy way to obtain it is to use ES6 `import * as`
439
+ * syntax. You may also pass a single function.
440
+ *
441
+ * @param {Function} dispatch The `dispatch` function available on your Redux
442
+ * store.
443
+ *
444
+ * @returns {Function|Object} The object mimicking the original object, but with
445
+ * every action creator wrapped into the `dispatch` call. If you passed a
446
+ * function as `actionCreators`, the return value will also be a single
447
+ * function.
448
+ */
449
+
450
+ function bindActionCreators(actionCreators, dispatch) {
451
+ if (typeof actionCreators === 'function') {
452
+ return bindActionCreator(actionCreators, dispatch);
453
+ }
454
+
455
+ if (typeof actionCreators !== 'object' || actionCreators === null || actionCreators === undefined) {
456
+ // eslint-disable-line no-eq-null
457
+ throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
458
+ }
459
+
460
+ return _utilsMapValues2['default'](actionCreators, function (actionCreator) {
461
+ return bindActionCreator(actionCreator, dispatch);
462
+ });
463
+ }
464
+
465
+ module.exports = exports['default'];
466
+
467
+ /***/ },
468
+ /* 7 */
469
+ /***/ function(module, exports, __webpack_require__) {
470
+
471
+ 'use strict';
472
+
473
+ exports.__esModule = true;
474
+ exports['default'] = combineReducers;
475
+
476
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
477
+
478
+ var _createStore = __webpack_require__(1);
479
+
480
+ var _utilsIsPlainObject = __webpack_require__(3);
481
+
482
+ var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
483
+
484
+ var _utilsMapValues = __webpack_require__(4);
485
+
486
+ var _utilsMapValues2 = _interopRequireDefault(_utilsMapValues);
487
+
488
+ var _utilsPick = __webpack_require__(8);
489
+
490
+ var _utilsPick2 = _interopRequireDefault(_utilsPick);
491
+
492
+ /* eslint-disable no-console */
493
+
494
+ function getUndefinedStateErrorMessage(key, action) {
495
+ var actionType = action && action.type;
496
+ var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
497
+
498
+ return 'Reducer "' + key + '" returned undefined handling ' + actionName + '. ' + 'To ignore an action, you must explicitly return the previous state.';
499
+ }
500
+
501
+ function getUnexpectedStateKeyWarningMessage(inputState, outputState, action) {
502
+ var reducerKeys = Object.keys(outputState);
503
+ var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
504
+
505
+ if (reducerKeys.length === 0) {
506
+ return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
507
+ }
508
+
509
+ if (!_utilsIsPlainObject2['default'](inputState)) {
510
+ return 'The ' + argumentName + ' has unexpected type of "' + ({}).toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
511
+ }
512
+
513
+ var unexpectedKeys = Object.keys(inputState).filter(function (key) {
514
+ return reducerKeys.indexOf(key) < 0;
515
+ });
516
+
517
+ if (unexpectedKeys.length > 0) {
518
+ return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
519
+ }
520
+ }
521
+
522
+ function assertReducerSanity(reducers) {
523
+ Object.keys(reducers).forEach(function (key) {
524
+ var reducer = reducers[key];
525
+ var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
526
+
527
+ if (typeof initialState === 'undefined') {
528
+ throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
529
+ }
530
+
531
+ var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
532
+ if (typeof reducer(undefined, { type: type }) === 'undefined') {
533
+ throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
534
+ }
535
+ });
536
+ }
537
+
538
+ /**
539
+ * Turns an object whose values are different reducer functions, into a single
540
+ * reducer function. It will call every child reducer, and gather their results
541
+ * into a single state object, whose keys correspond to the keys of the passed
542
+ * reducer functions.
543
+ *
544
+ * @param {Object} reducers An object whose values correspond to different
545
+ * reducer functions that need to be combined into one. One handy way to obtain
546
+ * it is to use ES6 `import * as reducers` syntax. The reducers may never return
547
+ * undefined for any action. Instead, they should return their initial state
548
+ * if the state passed to them was undefined, and the current state for any
549
+ * unrecognized action.
550
+ *
551
+ * @returns {Function} A reducer function that invokes every reducer inside the
552
+ * passed object, and builds a state object with the same shape.
553
+ */
554
+
555
+ function combineReducers(reducers) {
556
+ var finalReducers = _utilsPick2['default'](reducers, function (val) {
557
+ return typeof val === 'function';
558
+ });
559
+ var sanityError;
560
+
561
+ try {
562
+ assertReducerSanity(finalReducers);
563
+ } catch (e) {
564
+ sanityError = e;
565
+ }
566
+
567
+ var defaultState = _utilsMapValues2['default'](finalReducers, function () {
568
+ return undefined;
569
+ });
570
+
571
+ return function combination(state, action) {
572
+ if (state === undefined) state = defaultState;
573
+
574
+ if (sanityError) {
575
+ throw sanityError;
576
+ }
577
+
578
+ var finalState = _utilsMapValues2['default'](finalReducers, function (reducer, key) {
579
+ var newState = reducer(state[key], action);
580
+ if (typeof newState === 'undefined') {
581
+ var errorMessage = getUndefinedStateErrorMessage(key, action);
582
+ throw new Error(errorMessage);
583
+ }
584
+ return newState;
585
+ });
586
+
587
+ if (true) {
588
+ var warningMessage = getUnexpectedStateKeyWarningMessage(state, finalState, action);
589
+ if (warningMessage) {
590
+ console.error(warningMessage);
591
+ }
592
+ }
593
+
594
+ return finalState;
595
+ };
596
+ }
597
+
598
+ module.exports = exports['default'];
599
+
600
+ /***/ },
601
+ /* 8 */
602
+ /***/ function(module, exports) {
603
+
604
+ /**
605
+ * Picks key-value pairs from an object where values satisfy a predicate.
606
+ *
607
+ * @param {Object} obj The object to pick from.
608
+ * @param {Function} fn The predicate the values must satisfy to be copied.
609
+ * @returns {Object} The object with the values that satisfied the predicate.
610
+ */
611
+ "use strict";
612
+
613
+ exports.__esModule = true;
614
+ exports["default"] = pick;
615
+
616
+ function pick(obj, fn) {
617
+ return Object.keys(obj).reduce(function (result, key) {
618
+ if (fn(obj[key])) {
619
+ result[key] = obj[key];
620
+ }
621
+ return result;
622
+ }, {});
623
+ }
624
+
625
+ module.exports = exports["default"];
626
+
627
+ /***/ }
628
+ /******/ ])
629
+ });
630
+ ;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react-redux-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.1
4
+ version: 3.1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Konrad
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -64,6 +64,7 @@ files:
64
64
  - lib/react/redux/rails.rb
65
65
  - lib/react/redux/rails/version.rb
66
66
  - vendor/assets/javascripts/react-redux-rails.js
67
+ - vendor/assets/javascripts/redux-rails.js
67
68
  homepage: https://github.com/alexkonrad/react-redux-rails
68
69
  licenses:
69
70
  - MIT