react-redux-rails 3.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ef1636d7ea89804036329be677b5d5f50c9a4cf2
4
+ data.tar.gz: 9c75c5628437f4288a8993a2166794c1bea37b0f
5
+ SHA512:
6
+ metadata.gz: d80c7cfb3f9df25252c968610500153041955db5a32a506fcddcc5a66d6654d45681b6d4dba19ec84cb486c4a2aa2a3579c4e9d0fa66bb1260954686225f7edd
7
+ data.tar.gz: 0833b92689708df598979adff501934359809c6e2eb277e87d60749a51ba78bc74ae62cba80dd06924fc3f5689e28054d758909e5432dc42d62a14af14fe201c
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Alex Konrad
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # react-redux-rails
2
+
3
+ A Rails wrapper for the React wrapper for Redux
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'react-redux-rails'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install react-redux-rails
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Development
26
+
27
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+
29
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
30
+
31
+ ## Contributing
32
+
33
+ Bug reports and pull requests are welcome on GitHub at https://github.com/alexkonrad/react-redux-rails.
34
+
35
+
36
+ ## License
37
+
38
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
39
+
@@ -0,0 +1,11 @@
1
+ require "react/redux/rails/version"
2
+
3
+ module React
4
+ module Redux
5
+ module Rails
6
+ class Engine < ::Rails::Engine
7
+ end
8
+
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ module React
2
+ module Redux
3
+ module Rails
4
+ VERSION = "3.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,721 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("react"), require("redux"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["react", "redux"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["ReactRedux"] = factory(require("react"), require("redux"));
8
+ else
9
+ root["ReactRedux"] = factory(root["React"], root["Redux"]);
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__) {
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 _react = __webpack_require__(10);
64
+
65
+ var _react2 = _interopRequireDefault(_react);
66
+
67
+ var _componentsCreateAll = __webpack_require__(2);
68
+
69
+ var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll);
70
+
71
+ var _createAll = _componentsCreateAll2['default'](_react2['default']);
72
+
73
+ var Provider = _createAll.Provider;
74
+ var connect = _createAll.connect;
75
+ exports.Provider = Provider;
76
+ exports.connect = connect;
77
+
78
+ /***/ },
79
+ /* 1 */
80
+ /***/ function(module, exports) {
81
+
82
+ "use strict";
83
+
84
+ exports.__esModule = true;
85
+ exports["default"] = createStoreShape;
86
+
87
+ function createStoreShape(PropTypes) {
88
+ return PropTypes.shape({
89
+ subscribe: PropTypes.func.isRequired,
90
+ dispatch: PropTypes.func.isRequired,
91
+ getState: PropTypes.func.isRequired
92
+ });
93
+ }
94
+
95
+ module.exports = exports["default"];
96
+
97
+ /***/ },
98
+ /* 2 */
99
+ /***/ function(module, exports, __webpack_require__) {
100
+
101
+ 'use strict';
102
+
103
+ exports.__esModule = true;
104
+ exports['default'] = createAll;
105
+
106
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
107
+
108
+ var _createProvider = __webpack_require__(4);
109
+
110
+ var _createProvider2 = _interopRequireDefault(_createProvider);
111
+
112
+ var _createConnect = __webpack_require__(3);
113
+
114
+ var _createConnect2 = _interopRequireDefault(_createConnect);
115
+
116
+ function createAll(React) {
117
+ var Provider = _createProvider2['default'](React);
118
+ var connect = _createConnect2['default'](React);
119
+
120
+ return { Provider: Provider, connect: connect };
121
+ }
122
+
123
+ module.exports = exports['default'];
124
+
125
+ /***/ },
126
+ /* 3 */
127
+ /***/ function(module, exports, __webpack_require__) {
128
+
129
+ 'use strict';
130
+
131
+ exports.__esModule = true;
132
+
133
+ 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; };
134
+
135
+ exports['default'] = createConnect;
136
+
137
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
138
+
139
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
140
+
141
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
142
+
143
+ var _utilsCreateStoreShape = __webpack_require__(1);
144
+
145
+ var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
146
+
147
+ var _utilsShallowEqual = __webpack_require__(6);
148
+
149
+ var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual);
150
+
151
+ var _utilsIsPlainObject = __webpack_require__(5);
152
+
153
+ var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
154
+
155
+ var _utilsWrapActionCreators = __webpack_require__(7);
156
+
157
+ var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators);
158
+
159
+ var _hoistNonReactStatics = __webpack_require__(8);
160
+
161
+ var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
162
+
163
+ var _invariant = __webpack_require__(9);
164
+
165
+ var _invariant2 = _interopRequireDefault(_invariant);
166
+
167
+ var defaultMapStateToProps = function defaultMapStateToProps() {
168
+ return {};
169
+ };
170
+ var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) {
171
+ return { dispatch: dispatch };
172
+ };
173
+ var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) {
174
+ return _extends({}, parentProps, stateProps, dispatchProps);
175
+ };
176
+
177
+ function getDisplayName(Component) {
178
+ return Component.displayName || Component.name || 'Component';
179
+ }
180
+
181
+ // Helps track hot reloading.
182
+ var nextVersion = 0;
183
+
184
+ function createConnect(React) {
185
+ var Component = React.Component;
186
+ var PropTypes = React.PropTypes;
187
+
188
+ var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
189
+
190
+ return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
191
+ var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
192
+
193
+ var shouldSubscribe = Boolean(mapStateToProps);
194
+ var finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
195
+ var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps;
196
+ var finalMergeProps = mergeProps || defaultMergeProps;
197
+ var shouldUpdateStateProps = finalMapStateToProps.length > 1;
198
+ var shouldUpdateDispatchProps = finalMapDispatchToProps.length > 1;
199
+ var _options$pure = options.pure;
200
+ var pure = _options$pure === undefined ? true : _options$pure;
201
+
202
+ // Helps track hot reloading.
203
+ var version = nextVersion++;
204
+
205
+ function computeStateProps(store, props) {
206
+ var state = store.getState();
207
+ var stateProps = shouldUpdateStateProps ? finalMapStateToProps(state, props) : finalMapStateToProps(state);
208
+
209
+ _invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps);
210
+ return stateProps;
211
+ }
212
+
213
+ function computeDispatchProps(store, props) {
214
+ var dispatch = store.dispatch;
215
+
216
+ var dispatchProps = shouldUpdateDispatchProps ? finalMapDispatchToProps(dispatch, props) : finalMapDispatchToProps(dispatch);
217
+
218
+ _invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps);
219
+ return dispatchProps;
220
+ }
221
+
222
+ function _computeNextState(stateProps, dispatchProps, parentProps) {
223
+ var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps);
224
+ _invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps);
225
+ return mergedProps;
226
+ }
227
+
228
+ return function wrapWithConnect(WrappedComponent) {
229
+ var Connect = (function (_Component) {
230
+ _inherits(Connect, _Component);
231
+
232
+ Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {
233
+ if (!pure) {
234
+ this.updateStateProps(nextProps);
235
+ this.updateDispatchProps(nextProps);
236
+ this.updateState(nextProps);
237
+ return true;
238
+ }
239
+
240
+ var storeChanged = nextState.storeState !== this.state.storeState;
241
+ var propsChanged = !_utilsShallowEqual2['default'](nextProps, this.props);
242
+ var mapStateProducedChange = false;
243
+ var dispatchPropsChanged = false;
244
+
245
+ if (storeChanged || propsChanged && shouldUpdateStateProps) {
246
+ mapStateProducedChange = this.updateStateProps(nextProps);
247
+ }
248
+
249
+ if (propsChanged && shouldUpdateDispatchProps) {
250
+ dispatchPropsChanged = this.updateDispatchProps(nextProps);
251
+ }
252
+
253
+ if (propsChanged || mapStateProducedChange || dispatchPropsChanged) {
254
+ this.updateState(nextProps);
255
+ return true;
256
+ }
257
+
258
+ return false;
259
+ };
260
+
261
+ function Connect(props, context) {
262
+ _classCallCheck(this, Connect);
263
+
264
+ _Component.call(this, props, context);
265
+ this.version = version;
266
+ this.store = props.store || context.store;
267
+
268
+ _invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".'));
269
+
270
+ this.stateProps = computeStateProps(this.store, props);
271
+ this.dispatchProps = computeDispatchProps(this.store, props);
272
+ this.state = { storeState: null };
273
+ this.updateState();
274
+ }
275
+
276
+ Connect.prototype.computeNextState = function computeNextState() {
277
+ var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
278
+
279
+ return _computeNextState(this.stateProps, this.dispatchProps, props);
280
+ };
281
+
282
+ Connect.prototype.updateStateProps = function updateStateProps() {
283
+ var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
284
+
285
+ var nextStateProps = computeStateProps(this.store, props);
286
+ if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) {
287
+ return false;
288
+ }
289
+
290
+ this.stateProps = nextStateProps;
291
+ return true;
292
+ };
293
+
294
+ Connect.prototype.updateDispatchProps = function updateDispatchProps() {
295
+ var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
296
+
297
+ var nextDispatchProps = computeDispatchProps(this.store, props);
298
+ if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) {
299
+ return false;
300
+ }
301
+
302
+ this.dispatchProps = nextDispatchProps;
303
+ return true;
304
+ };
305
+
306
+ Connect.prototype.updateState = function updateState() {
307
+ var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
308
+
309
+ this.nextState = this.computeNextState(props);
310
+ };
311
+
312
+ Connect.prototype.isSubscribed = function isSubscribed() {
313
+ return typeof this.unsubscribe === 'function';
314
+ };
315
+
316
+ Connect.prototype.trySubscribe = function trySubscribe() {
317
+ if (shouldSubscribe && !this.unsubscribe) {
318
+ this.unsubscribe = this.store.subscribe(this.handleChange.bind(this));
319
+ this.handleChange();
320
+ }
321
+ };
322
+
323
+ Connect.prototype.tryUnsubscribe = function tryUnsubscribe() {
324
+ if (this.unsubscribe) {
325
+ this.unsubscribe();
326
+ this.unsubscribe = null;
327
+ }
328
+ };
329
+
330
+ Connect.prototype.componentDidMount = function componentDidMount() {
331
+ this.trySubscribe();
332
+ };
333
+
334
+ Connect.prototype.componentWillUnmount = function componentWillUnmount() {
335
+ this.tryUnsubscribe();
336
+ };
337
+
338
+ Connect.prototype.handleChange = function handleChange() {
339
+ if (!this.unsubscribe) {
340
+ return;
341
+ }
342
+
343
+ this.setState({
344
+ storeState: this.store.getState()
345
+ });
346
+ };
347
+
348
+ Connect.prototype.getWrappedInstance = function getWrappedInstance() {
349
+ return this.refs.wrappedInstance;
350
+ };
351
+
352
+ Connect.prototype.render = function render() {
353
+ return React.createElement(WrappedComponent, _extends({ ref: 'wrappedInstance'
354
+ }, this.nextState));
355
+ };
356
+
357
+ return Connect;
358
+ })(Component);
359
+
360
+ Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')';
361
+ Connect.WrappedComponent = WrappedComponent;
362
+ Connect.contextTypes = {
363
+ store: storeShape
364
+ };
365
+ Connect.propTypes = {
366
+ store: storeShape
367
+ };
368
+
369
+ if (true) {
370
+ Connect.prototype.componentWillUpdate = function componentWillUpdate() {
371
+ if (this.version === version) {
372
+ return;
373
+ }
374
+
375
+ // We are hot reloading!
376
+ this.version = version;
377
+
378
+ // Update the state and bindings.
379
+ this.trySubscribe();
380
+ this.updateStateProps();
381
+ this.updateDispatchProps();
382
+ this.updateState();
383
+ };
384
+ }
385
+
386
+ return _hoistNonReactStatics2['default'](Connect, WrappedComponent);
387
+ };
388
+ };
389
+ }
390
+
391
+ module.exports = exports['default'];
392
+
393
+ /***/ },
394
+ /* 4 */
395
+ /***/ function(module, exports, __webpack_require__) {
396
+
397
+ 'use strict';
398
+
399
+ exports.__esModule = true;
400
+ exports['default'] = createProvider;
401
+
402
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
403
+
404
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
405
+
406
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
407
+
408
+ var _utilsCreateStoreShape = __webpack_require__(1);
409
+
410
+ var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
411
+
412
+ function isUsingOwnerContext(React) {
413
+ var version = React.version;
414
+
415
+ if (typeof version !== 'string') {
416
+ return true;
417
+ }
418
+
419
+ var sections = version.split('.');
420
+ var major = parseInt(sections[0], 10);
421
+ var minor = parseInt(sections[1], 10);
422
+
423
+ return major === 0 && minor === 13;
424
+ }
425
+
426
+ function createProvider(React) {
427
+ var Component = React.Component;
428
+ var PropTypes = React.PropTypes;
429
+ var Children = React.Children;
430
+
431
+ var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
432
+ var requireFunctionChild = isUsingOwnerContext(React);
433
+
434
+ var didWarnAboutChild = false;
435
+ function warnAboutFunctionChild() {
436
+ if (didWarnAboutChild || requireFunctionChild) {
437
+ return;
438
+ }
439
+
440
+ didWarnAboutChild = true;
441
+ console.error( // eslint-disable-line no-console
442
+ 'With React 0.14 and later versions, you no longer need to ' + 'wrap <Provider> child into a function.');
443
+ }
444
+ function warnAboutElementChild() {
445
+ if (didWarnAboutChild || !requireFunctionChild) {
446
+ return;
447
+ }
448
+
449
+ didWarnAboutChild = true;
450
+ console.error( // eslint-disable-line no-console
451
+ 'With React 0.13, you need to ' + 'wrap <Provider> child into a function. ' + 'This restriction will be removed with React 0.14.');
452
+ }
453
+
454
+ var didWarnAboutReceivingStore = false;
455
+ function warnAboutReceivingStore() {
456
+ if (didWarnAboutReceivingStore) {
457
+ return;
458
+ }
459
+
460
+ didWarnAboutReceivingStore = true;
461
+ console.error( // eslint-disable-line no-console
462
+ '<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/rackt/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
463
+ }
464
+
465
+ var Provider = (function (_Component) {
466
+ _inherits(Provider, _Component);
467
+
468
+ Provider.prototype.getChildContext = function getChildContext() {
469
+ return { store: this.store };
470
+ };
471
+
472
+ function Provider(props, context) {
473
+ _classCallCheck(this, Provider);
474
+
475
+ _Component.call(this, props, context);
476
+ this.store = props.store;
477
+ }
478
+
479
+ Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
480
+ var store = this.store;
481
+ var nextStore = nextProps.store;
482
+
483
+ if (store !== nextStore) {
484
+ warnAboutReceivingStore();
485
+ }
486
+ };
487
+
488
+ Provider.prototype.render = function render() {
489
+ var children = this.props.children;
490
+
491
+ if (typeof children === 'function') {
492
+ warnAboutFunctionChild();
493
+ children = children();
494
+ } else {
495
+ warnAboutElementChild();
496
+ }
497
+
498
+ return Children.only(children);
499
+ };
500
+
501
+ return Provider;
502
+ })(Component);
503
+
504
+ Provider.childContextTypes = {
505
+ store: storeShape.isRequired
506
+ };
507
+ Provider.propTypes = {
508
+ store: storeShape.isRequired,
509
+ children: (requireFunctionChild ? PropTypes.func : PropTypes.element).isRequired
510
+ };
511
+
512
+ return Provider;
513
+ }
514
+
515
+ module.exports = exports['default'];
516
+
517
+ /***/ },
518
+ /* 5 */
519
+ /***/ function(module, exports) {
520
+
521
+ 'use strict';
522
+
523
+ exports.__esModule = true;
524
+ exports['default'] = isPlainObject;
525
+ var fnToString = function fnToString(fn) {
526
+ return Function.prototype.toString.call(fn);
527
+ };
528
+
529
+ /**
530
+ * @param {any} obj The object to inspect.
531
+ * @returns {boolean} True if the argument appears to be a plain object.
532
+ */
533
+
534
+ function isPlainObject(obj) {
535
+ if (!obj || typeof obj !== 'object') {
536
+ return false;
537
+ }
538
+
539
+ var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;
540
+
541
+ if (proto === null) {
542
+ return true;
543
+ }
544
+
545
+ var constructor = proto.constructor;
546
+
547
+ return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
548
+ }
549
+
550
+ module.exports = exports['default'];
551
+
552
+ /***/ },
553
+ /* 6 */
554
+ /***/ function(module, exports) {
555
+
556
+ "use strict";
557
+
558
+ exports.__esModule = true;
559
+ exports["default"] = shallowEqual;
560
+
561
+ function shallowEqual(objA, objB) {
562
+ if (objA === objB) {
563
+ return true;
564
+ }
565
+
566
+ var keysA = Object.keys(objA);
567
+ var keysB = Object.keys(objB);
568
+
569
+ if (keysA.length !== keysB.length) {
570
+ return false;
571
+ }
572
+
573
+ // Test for A's keys different from B.
574
+ var hasOwn = Object.prototype.hasOwnProperty;
575
+ for (var i = 0; i < keysA.length; i++) {
576
+ if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
577
+ return false;
578
+ }
579
+ }
580
+
581
+ return true;
582
+ }
583
+
584
+ module.exports = exports["default"];
585
+
586
+ /***/ },
587
+ /* 7 */
588
+ /***/ function(module, exports, __webpack_require__) {
589
+
590
+ 'use strict';
591
+
592
+ exports.__esModule = true;
593
+ exports['default'] = wrapActionCreators;
594
+
595
+ var _redux = __webpack_require__(11);
596
+
597
+ function wrapActionCreators(actionCreators) {
598
+ return function (dispatch) {
599
+ return _redux.bindActionCreators(actionCreators, dispatch);
600
+ };
601
+ }
602
+
603
+ module.exports = exports['default'];
604
+
605
+ /***/ },
606
+ /* 8 */
607
+ /***/ function(module, exports) {
608
+
609
+ /**
610
+ * Copyright 2015, Yahoo! Inc.
611
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
612
+ */
613
+ 'use strict';
614
+
615
+ var REACT_STATICS = {
616
+ childContextTypes: true,
617
+ contextTypes: true,
618
+ defaultProps: true,
619
+ displayName: true,
620
+ getDefaultProps: true,
621
+ mixins: true,
622
+ propTypes: true,
623
+ type: true
624
+ };
625
+
626
+ var KNOWN_STATICS = {
627
+ name: true,
628
+ length: true,
629
+ prototype: true,
630
+ caller: true,
631
+ arguments: true,
632
+ arity: true
633
+ };
634
+
635
+ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent) {
636
+ var keys = Object.getOwnPropertyNames(sourceComponent);
637
+ for (var i=0; i<keys.length; ++i) {
638
+ if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]]) {
639
+ targetComponent[keys[i]] = sourceComponent[keys[i]];
640
+ }
641
+ }
642
+
643
+ return targetComponent;
644
+ };
645
+
646
+
647
+ /***/ },
648
+ /* 9 */
649
+ /***/ function(module, exports, __webpack_require__) {
650
+
651
+ /**
652
+ * Copyright 2013-2015, Facebook, Inc.
653
+ * All rights reserved.
654
+ *
655
+ * This source code is licensed under the BSD-style license found in the
656
+ * LICENSE file in the root directory of this source tree. An additional grant
657
+ * of patent rights can be found in the PATENTS file in the same directory.
658
+ *
659
+ * @providesModule invariant
660
+ */
661
+
662
+ 'use strict';
663
+
664
+ /**
665
+ * Use invariant() to assert state which your program assumes to be true.
666
+ *
667
+ * Provide sprintf-style format (only %s is supported) and arguments
668
+ * to provide information about what broke and what you were
669
+ * expecting.
670
+ *
671
+ * The invariant message will be stripped in production, but the invariant
672
+ * will remain to ensure logic does not differ in production.
673
+ */
674
+
675
+ var invariant = function(condition, format, a, b, c, d, e, f) {
676
+ if (true) {
677
+ if (format === undefined) {
678
+ throw new Error('invariant requires an error message argument');
679
+ }
680
+ }
681
+
682
+ if (!condition) {
683
+ var error;
684
+ if (format === undefined) {
685
+ error = new Error(
686
+ 'Minified exception occurred; use the non-minified dev environment ' +
687
+ 'for the full error message and additional helpful warnings.'
688
+ );
689
+ } else {
690
+ var args = [a, b, c, d, e, f];
691
+ var argIndex = 0;
692
+ error = new Error(
693
+ 'Invariant Violation: ' +
694
+ format.replace(/%s/g, function() { return args[argIndex++]; })
695
+ );
696
+ }
697
+
698
+ error.framesToPop = 1; // we don't care about invariant's own frame
699
+ throw error;
700
+ }
701
+ };
702
+
703
+ module.exports = invariant;
704
+
705
+
706
+ /***/ },
707
+ /* 10 */
708
+ /***/ function(module, exports) {
709
+
710
+ module.exports = __WEBPACK_EXTERNAL_MODULE_10__;
711
+
712
+ /***/ },
713
+ /* 11 */
714
+ /***/ function(module, exports) {
715
+
716
+ module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
717
+
718
+ /***/ }
719
+ /******/ ])
720
+ });
721
+ ;
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: react-redux-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alex Konrad
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-10-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description:
56
+ email:
57
+ - alexkonrad08@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - LICENSE.txt
63
+ - README.md
64
+ - lib/react/redux/rails.rb
65
+ - lib/react/redux/rails/version.rb
66
+ - vendor/assets/javascripts/react-redux.js
67
+ homepage: https://github.com/alexkonrad/react-redux-rails
68
+ licenses:
69
+ - MIT
70
+ metadata:
71
+ allowed_push_host: https://rubygems.org
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubyforge_project:
88
+ rubygems_version: 2.4.5
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: A Rails wrapper for the react-redux React wrapper for redux
92
+ test_files: []