react_on_rails 3.0.0.beta.1 → 3.0.0.rc.1

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: 5b1502f7743d3d66004e5f876204f48c83e0420b
4
- data.tar.gz: 7373d3222c3344a3985c702d0db0b6f8944c751b
3
+ metadata.gz: 10f4dd139d7cf764647c72c9bcd900026c58d6ed
4
+ data.tar.gz: dfc33f3ddc2d2605e1b80e8a90c16c9e347a1fde
5
5
  SHA512:
6
- metadata.gz: 87f66844af24dcf212c4e6537f4d30bd18f387e1926a013cdc413ecbbbba60a07b043a00f769ebfb7b5bf3d2da649ec106e41b5181e13c6b180c0e895b0b7f41
7
- data.tar.gz: b0fb62a1879309db5de7e3d830015b432eee48766579a5f74c3dd910d077d226330257f2051ee64690c721ae75fda5a94b948adfaaa6d8a0484076e026ee84da
6
+ metadata.gz: dd7da92b93452f7c1874c7a3ff3f5bb0374b3d579f1e353493642224024d0ca97ac25efd0f735392efdcdb742104c390c26397e0d60c7b2754059ee3fd3ecc00
7
+ data.tar.gz: df45b1a12cdce336c0d07c06fff2b84626d9a928c0c518a4e99b501aa52a1519095ace355099867dea10bd88c3d203ed90a56194f7c99b3ce5c526c0c919346b
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. Items under
4
4
  Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
5
5
 
6
6
  ## [3.0.0-beta.1]
7
+ ##### Fixed
8
+ - Fix Bootstrap Sass Append to Gemfile, missing new line. [#262](https://github.com/shakacode/react_on_rails/pull/262).
9
+
7
10
  ##### Added
8
11
  - Added helper `redux_store` and associated JavaScript APIs that allow multiple React components to use the same store. Thus, you initialize the store, with props, separately from the components.
9
12
  - Added forman to gemspec in case new dev does not have it globally installed. [#248](https://github.com/shakacode/react_on_rails/pull/248)
@@ -21,14 +24,14 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com]
21
24
  You'll get a deprecation message to change this.
22
25
  - Renamed `ReactOnRails.configure_rspec_to_compile_assets` to `ReactOnRails::TestHelper.configure_rspec_to_compile_assets`. The code has also been optimized to check for whether or not the compiled webpack bundles are up to date or not and will not run if not necessary. If you are using non-standard directories for your generated webpack assets (`app/assets/javascripts/generated` and `app/assets/stylesheets/generated`) or have additional directories you wish the helper to check, you need to update your ReactOnRails configuration accordingly. See [documentation](https://github.com/shakacode/react_on_rails/blob/master/docs/additional_reading/rspec_configuration.md) for how to do this. [#253](https://github.com/shakacode/react_on_rails/pull/253).
23
26
 
24
- ##### Migration
27
+ ##### Migration Steps v2 to v3
25
28
  - [spec/dummy/spec/rails_helper.rb](https://github.com/shakacode/react_on_rails/blob/master/spec%2Fdummy%2Fspec%2Frails_helper.rb#L36..38) for an example. Add this line to your `rails_helper.rb`:
26
29
  ```ruby
27
30
  RSpec.configure do |config|
28
31
  # Ensure that if we are running js tests, we are using latest webpack assets
29
32
  ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
30
33
  ```
31
- - Change view helper calls to react_component to use the named param of `props`.
34
+ - Change view helper calls to react_component to use the named param of `props`. See forum post [Using Regexp to update to ReactOnRails v3](http://forum.shakacode.com/t/using-regexp-to-update-to-reactonrails-v3/481).
32
35
 
33
36
  ## [2.3.0] - 2016-02-01
34
37
  ##### Added
data/README.md CHANGED
@@ -2,8 +2,11 @@
2
2
 
3
3
  # NEWS
4
4
 
5
- * 2.3 has shipped on Monday, 2/1/2016. Please see the [Changelog](CHANGELOG.md) for details, and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v1-to-v2).
6
- * There was a fatal error when using the lastest version of Redux for server rendering. See [Redux #1335](https://github.com/rackt/redux/issues/1335). See [diff 3.1.6...3.1.4](https://github.com/rackt/redux/commit/e2e14d26f09ca729ae0555442f50fcfc45bfb423#diff-1fdf421c05c1140f6d71444ea2b27638). Workaround for server rendering: Use Redux 3.1.7 or upgrade to React On Rails v2.3.0. [this commit](https://github.com/shakacode/react_on_rails/commit/59f1e68d3d233775e6abc63bff180ea59ac2d79e) on [PR #244](https://github.com/shakacode/react_on_rails/pull/244/).
5
+ * 3.0.0.beta.1 has shipped on Monday, 2/8/2016. Please see the [Changelog](CHANGELOG.md) for details, and let us know if you see any issues! [Migration steps from 1.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v1-to-v2). [Migration steps from 2.x](https://github.com/shakacode/react_on_rails/blob/master/CHANGELOG.md#migration-steps-v2-to-v3).
6
+ * 3.0.0 Highlights:
7
+ 1. Support for ensuring JavaScript is current when running tests.
8
+ 2. Support for multiple React components with one Redux store. So you can have a header React component and different body React components talking to the same Redux store!
9
+ * There was a fatal error when using the lastest version of Redux for server rendering. See [Redux #1335](https://github.com/rackt/redux/issues/1335). See [diff 3.1.6...3.1.4](https://github.com/rackt/redux/commit/e2e14d26f09ca729ae0555442f50fcfc45bfb423#diff-1fdf421c05c1140f6d71444ea2b27638). Workaround for server rendering: Use Redux 3.1.7 or upgrade to React On Rails v2.3.0. [this commit](https://github.com/shakacode/react_on_rails/commit/59f1e68d3d233775e6abc63bff180ea59ac2d79e) on [PR #244](https://github.com/shakacode/react_on_rails/pull/244/).
7
10
  * 2.x Highlights:
8
11
  1. Fixed a **critical** problem with TurboLinks. Be sure to see [turbolinks docs](docs/additional_reading/turbolinks.md) for more information on how to debug TurboLinks issues.
9
12
  2. Provides a convenient helper to ensure that JavaScript assets are compiled before running tests.
@@ -218,18 +221,26 @@ Once the bundled files have been generated in your `app/assets/javascripts/gener
218
221
  This is how you actually render the React components you exposed to `window` inside of `clientRegistration` (and `global` inside of `serverRegistration` if you are server rendering).
219
222
 
220
223
  #### react_component
221
- `react_component(component_name, props = {}, options = {})`
224
+ `react_component(component_name, options = {})`
222
225
 
223
226
  + **component_name:** Can be a React component, created using a ES6 class, or `React.createClass`, or a generator function that returns a React component.
224
- + **props:** Ruby Hash which contains the properties to pass to the react object, or a JSON string. If you pass a string, we'll escape it for you.
225
227
  + **options:**
228
+ + **props:** Ruby Hash which contains the properties to pass to the react object, or a JSON string. If you pass a string, we'll escape it for you.
226
229
  + **prerender:** enable server-side rendering of component. Set to false when debugging!
227
- + **router_redirect_callback:** Use this option if you want to provide a custom handler for redirects on server rendering. If you don't specify this, we'll simply change the rendered output to a script that sets window.location to the new route. Set this up exactly like a generator_function. Your function will will take one parameter, containing all the values that react-router gives on a redirect request, such as pathname, search, etc.
230
+ + **router_redirect_callback:** Use this option if you want to provide a custom handler for redirects on server rendering. If you don't specify this, we'll simply change the rendered output to a script that sets window.location to the new route. Set this up exactly like a generator_function. Your function will take one parameter, containing all the values that react-router gives on a redirect request, such as pathname, search, etc.
228
231
  + **trace:** set to true to print additional debugging information in the browser. Defaults to true for development, off otherwise.
229
232
  + **replay_console:** Default is true. False will disable echoing server-rendering logs to the browser. While this can make troubleshooting server rendering difficult, so long as you have the default configuration of logging_on_server set to true, you'll still see the errors on the server.
230
233
  + **raise_on_prerender_error:** Default is false. True will throw an error on the server side rendering. Your controller will have to handle the error.
231
234
  + Any other options are passed to the content tag, including the id
232
235
 
236
+ #### redux_store
237
+ `redux_store(store_name, props = {})`
238
+
239
+ + **store_name:** A name for the store. You'll refer to this name in 2 places in your JavaScript:
240
+ 1. You'll call `ReactOnRails.registerStore({storeName})` in the same place that you register your components.
241
+ 2. In your component definition, you'll call `ReactOnRails.getStore('storeName')` to get the hydrated Redux store to attach to your components.
242
+ + **props:** ReactOnRails takes care of setting up the hydration of your store with props from the view.
243
+
233
244
  #### Generator Functions
234
245
  Why would you create a function that returns a React compnent? For example, you may want the ability to use the passed-in props to initialize a redux store or setup react-router. Or you may want to return different components depending on what's in the props. ReactOnRails will automatically detect a registered generator function.
235
246
 
@@ -291,7 +302,7 @@ You may wish to have 2 React components share the same the Redux store. For exam
291
302
 
292
303
  Suppose the Redux store is called `appStore`, and you have 3 React components that each need to connect to a store: `NavbarApp`, `CommentsApp`, and `BlogsApp`. I named them with `App` to indicate that they are the registered components.
293
304
 
294
- You will need to make function that can create the store you will be using for all components and register it via the `registerStore` method. Note, this is a **storeCreator**, meaning that it is a function that takes props and returns a store:
305
+ You will need to make a function that can create the store you will be using for all components and register it via the `registerStore` method. Note, this is a **storeCreator**, meaning that it is a function that takes props and returns a store:
295
306
 
296
307
  ```
297
308
  ReactOnRails.registerStore({
@@ -367,7 +378,7 @@ The React on Rails generator can add linters and their recommended accompanying
367
378
  JavaScript linters are **enabled by default**, but can be disabled by passing the `--skip-js-linters` flag (alias `j`) , and those that run in Node have been add to `client/package.json` under `devDependencies`.
368
379
 
369
380
  ##### Ruby Linters
370
- Ruby linters are **disabled by default**, but can be enabled by passing the `--ruby-linters` flag when generating. These linters have been added to your Gemfile in addition to the the appropriate Rake tasks.
381
+ Ruby linters are **disabled by default**, but can be enabled by passing the `--ruby-linters` flag when generating. These linters have been added to your Gemfile in addition to the appropriate Rake tasks.
371
382
 
372
383
  We really love using all the linters! Give them a try.
373
384
 
@@ -416,7 +427,7 @@ If you are using [react-rails](https://github.com/reactjs/react-rails) in your p
416
427
 
417
428
  - Remove the 'react-rails' gem from your Gemfile.
418
429
 
419
- - Remove the generated generated lines for react-rails in your application.js file.
430
+ - Remove the generated lines for react-rails in your application.js file.
420
431
 
421
432
  ```
422
433
  //= require react
@@ -448,7 +459,7 @@ Note: If you have components from react-rails you want to use, then you will nee
448
459
  + [Changelog](CHANGELOG.md)
449
460
 
450
461
  ## Demos
451
- + [www.reactrails.com](http://www.reactrails.com) with source at [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/).
462
+ + [www.reactrails.com](http://www.reactrails.com) with the source at [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/).
452
463
  + [spec app](spec/dummy): Great simple examples used for our tests.
453
464
  ```
454
465
  cd spec/dummy
@@ -62,7 +62,7 @@ module ReactOnRails
62
62
  end
63
63
 
64
64
  def add_bootstrap_sprockets_to_gemfile
65
- append_to_file("Gemfile", "gem 'bootstrap-sass'\n")
65
+ append_to_file("Gemfile", "\ngem 'bootstrap-sass'\n")
66
66
  end
67
67
 
68
68
  def add_bootstrap_sprockets_to_application_js
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ReactOnRails
3
- VERSION = "3.0.0.beta.1".freeze
3
+ VERSION = "3.0.0.rc.1".freeze
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta.1
4
+ version: 3.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-08 00:00:00.000000000 Z
11
+ date: 2016-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool