diff --git a/.circleci/config.yml b/.circleci/config.yml index a875dd9ab..eab28626e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,7 +131,7 @@ jobs: name: prettier command: yarn start format.listDifferent - # Install Node modules for Renderer package with Yarn and save them to chache. + # Install Node modules for Renderer package with Yarn and save them to cache. install-package-node-packages: docker: *docker-image steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index bf048ba23..2a5d5396a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ Please follow the recommendations outlined at [keepachangelog.com](http://keepac ### [Unreleased] Changes since the last non-beta release. +#### Fixed +- Address a number of typos and grammar mistakes [PR 1631](https://github.com/shakacode/react_on_rails/pull/1631) by [G-Rath](https://github.com/G-Rath) + ### [14.0.2] - 2024-06-11 #### Fixed @@ -174,7 +177,7 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re #### Changed - Changed logic of determining the usage of the default rails/webpacker webpack config or a custom command to only check if the config.build_production_command is defined. [PR 1402](https://github.com/shakacode/react_on_rails/pull/1402) by [justin808](https://github.com/justin808) and [gscarv13](https://github.com/gscarv13). -- Minimimum required Ruby is 2.7 to match lastest rails/webpacker. +- Minimum required Ruby is 2.7 to match latest rails/webpacker. ### [12.4.0] - 2021-09-22 #### Added @@ -201,7 +204,7 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re - Added the ability to assign a module with a `call` method to `config.build_production_command`. See [the configuration docs](https://www.shakacode.com/react-on-rails/docs/guides/configuration). [PR 1362: Accept custom module for config.build_production_command](https://github.com/shakacode/react_on_rails/pull/1362). #### Fixed -- Stop setting NODE_ENV value during precompile, as it interferred with rails/webpacker's setting of NODE_ENV to production by default. Fixes [#1334](https://github.com/shakacode/react_on_rails/issues/1334). [PR 1356: Don't set NODE_ENV in assets.rake](https://github.com/shakacode/react_on_rails/pull/1356) by [alexrozanski](https://github.com/alexrozanski). +- Stop setting NODE_ENV value during precompile, as it interfered with rails/webpacker's setting of NODE_ENV to production by default. Fixes [#1334](https://github.com/shakacode/react_on_rails/issues/1334). [PR 1356: Don't set NODE_ENV in assets.rake](https://github.com/shakacode/react_on_rails/pull/1356) by [alexrozanski](https://github.com/alexrozanski). ### [12.0.4] - 2020-11-14 #### Fixed @@ -221,7 +224,7 @@ which was only used in the workaround. [PR 1580](https://github.com/shakacode/re ### [12.0.1] - 2020-07-09 #### Fixed -- Changed invocation of webpacker:clean to use a very large number of versions so it does not acidentally delete the server-bundle.js. [PR 1306](https://github.com/shakacode/react_on_rails/pull/1306) by By [justin808](https://github.com/justin808). +- Changed invocation of webpacker:clean to use a very large number of versions so it does not accidentally delete the server-bundle.js. [PR 1306](https://github.com/shakacode/react_on_rails/pull/1306) by By [justin808](https://github.com/justin808). ### [12.0.0] - 2020-07-08 For upgrade instructions, see [docs/guides/upgrading-react-on-rails.md](https://www.shakacode.com/react-on-rails/docs/guides/upgrading-react-on-rails). @@ -380,7 +383,7 @@ Do not use. Unpublished. Caused by an issue with the release script. ### [11.0.7] - 2018-05-16 #### Fixed -- Fix npm publshing. [PR 1090](https://github.com/shakacode/react_on_rails/pull/1090) by [justin808](https://github.com/justin808). +- Fix npm publishing. [PR 1090](https://github.com/shakacode/react_on_rails/pull/1090) by [justin808](https://github.com/justin808). ### [11.0.6] - 2018-05-15 #### Changed @@ -756,7 +759,7 @@ No changes. - Don't assume ActionMailer is available. [#608](https://github.com/shakacode/react_on_rails/pull/608) by [tuzz](https://github.com/tuzz). ## [6.2.1] - 2016-11-19 -- Removed unnecesary passing of context in the HelloWorld Container example and basic generator. [#612](https://github.com/shakacode/react_on_rails/pull/612) by [justin808](https://github.com/justin808) +- Removed unnecessary passing of context in the HelloWorld Container example and basic generator. [#612](https://github.com/shakacode/react_on_rails/pull/612) by [justin808](https://github.com/justin808) - Turbolinks 5 bugfix to use `before-cache`, not `before-render`. [#611](https://github.com/shakacode/react_on_rails/pull/611) by [volkanunsal](https://github.com/volkanunsal). @@ -782,12 +785,12 @@ No changes. ##### Fixed - React on Rails now correctly parses single-digit version strings from package.json [#491](https://github.com/shakacode/react_on_rails/pull/491) by [samphilipd ](https://github.com/samphilipd). -- Fixed assets symlinking to correctly use filenames with spaces. Begining in [#510](https://github.com/shakacode/react_on_rails/pull/510), ending in [#513](https://github.com/shakacode/react_on_rails/pull/513) by [dzirtusss](https://github.com/dzirtusss). +- Fixed assets symlinking to correctly use filenames with spaces. Beginning in [#510](https://github.com/shakacode/react_on_rails/pull/510), ending in [#513](https://github.com/shakacode/react_on_rails/pull/513) by [dzirtusss](https://github.com/dzirtusss). - Check encoding of request's original URL and force it to UTF-8 [#527](https://github.com/shakacode/react_on_rails/pull/527) by [lucke84](https://github.com/lucke84) ## [6.0.5] - 2016-07-11 ##### Added -- Added better error messages to avoid issues with shared redux stores [#470](https://github.com/shakacode/react_on_rails/pull/470) by by [justin808](https://github.com/justin808). +- Added better error messages to avoid issues with shared redux stores [#470](https://github.com/shakacode/react_on_rails/pull/470) by [justin808](https://github.com/justin808). ## [6.0.4] - 2016-06-13 ##### Fixed @@ -799,7 +802,7 @@ No changes. ## [6.0.2] - 2016-06-06 ##### Fixed -- Fix colisions in ids of DOM nodes generated by `react_component` by indexing in using an UUID rather than an auto-increment value. This means that it should be overriden using the `id` parameter of `react_component` if one wants to generate a predictable id (_e.g._ for testing purpose). See [Issue #437](https://github.com/shakacode/react_on_rails/issues/437). Fixed in [#438](https://github.com/shakacode/react_on_rails/pull/438) by [Michael Baudino](https://github.com/michaelbaudino). +- Fix collisions in ids of DOM nodes generated by `react_component` by indexing in using a UUID rather than an auto-increment value. This means that it should be overridden using the `id` parameter of `react_component` if one wants to generate a predictable id (_e.g._ for testing purpose). See [Issue #437](https://github.com/shakacode/react_on_rails/issues/437). Fixed in [#438](https://github.com/shakacode/react_on_rails/pull/438) by [Michael Baudino](https://github.com/michaelbaudino). ## [6.0.1] - 2016-05-27 ##### Fixed @@ -807,16 +810,16 @@ No changes. ## [6.0.0] - 2016-05-25 ##### Breaking Changes -- Added automatic compilation of assets at precompile is now done by ReactOnRails. Thus, you don't need to provide your own assets.rake file that does the precompilation. +- Added automatic compilation of assets at precompile is now done by ReactOnRails. Thus, you don't need to provide your own `assets.rake` file that does the precompilation. [#398](https://github.com/shakacode/react_on_rails/pull/398) by [robwise](https://github.com/robwise), [jbhatab](https://github.com/jbhatab), and [justin808](https://github.com/justin808). - **Migration to v6** - Do not run the generator again if you've already run it. - See [shakacode/react-webpack-rails-tutorial/pull/287](https://github.com/shakacode/react-webpack-rails-tutorial/pull/287) for an example of upgrading from v5. - - To configure the asset compliation you can either + - To configure the asset compilation you can either 1. Specify a `config/react_on_rails` setting for `build_production_command` to be nil to turn this feature off. - 2. Specify the script command you want to run to build your production assets, and remove your assets.rake file. + 2. Specify the script command you want to run to build your production assets, and remove your `assets.rake` file. - If you are using the ReactOnRails test helper, then you will need to add the 'config.npm_build_test_command' to your config to tell react_on_rails what command to run when you run rspec. @@ -903,7 +906,7 @@ All 5.1.0 changes can be found in [#362](https://github.com/shakacode/react_on_r ## [4.0.3] - 2016-03-17 ##### Fixed -- `ReactOnRailsHelper#react_component`: Invalid deprecation message when called with only one paramter, the component name. +- `ReactOnRailsHelper#react_component`: Invalid deprecation message when called with only one parameter, the component name. ## [4.0.2] - 2016-03-17 diff --git a/NEWS.md b/NEWS.md index 1bc438d57..41793e4b9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -28,11 +28,11 @@ that supports SSR. * 2016-12-20: New Video on Egghead.io: [Creating a component with React on Rails](https://egghead.io/lessons/react-creating-a-component-with-react-on-rails) * 2016-11-03: Spoke at [LA Ruby, 7pm, Thursday, November 10 in Venice, CA: "React on Rails: Why, What, and How?"](http://www.meetup.com/laruby/events/234825187/). [Video and pictures in this article](https://blog.shakacode.com/my-react-on-rails-talk-at-the-la-ruby-rails-meetup-november-10-2016-eaaa83aff800#.ej6h4eglp). * 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference. -* 2016-08-21: v6.1 ships with serveral new features and bug fixes. See the [Changelog](CHANGELOG.md). +* 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md). * 2016-07-28: If you're doing server rendering, be sure to use mini\_racer! See [issues/428](https://github.com/shakacode/react_on_rails/issues/428). It's supposedly much faster than `therubyracer`. * 2016-08-27: We now have a [Documentation Gitbook](https://shakacode.gitbooks.io/react-on-rails/content/) for improved readability & reference. -* 2016-08-21: v6.1 ships with serveral new features and bug fixes. See the [Changelog](CHANGELOG.md). +* 2016-08-21: v6.1 ships with several new features and bug fixes. See the [Changelog](CHANGELOG.md). * 2016-06-13: 6.0.4 shipped with a critical fix regarding a missing polyfill for `clearTimeout`, used by babel-polyfill. * 2016-06-06: 6.0.2 shipped with a critical fix if you are fragment caching the server generated React. * 2016-05-24: 6.0.0 Released! Simplified generator and install process! See the [CHANGELOG.md](./CHANGELOG.md) for details. diff --git a/SUMMARY.md b/SUMMARY.md index 2ec681457..7196a50e5 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,6 +1,6 @@ # Table of Contents -Doccumentation for React on Rails has moved! +Documentation for React on Rails has moved! Here is the new link: diff --git a/docs/additional-details/tips-for-usage-with-sp6.md b/docs/additional-details/tips-for-usage-with-sp6.md index c13d2b3d6..2ae1b62c3 100644 --- a/docs/additional-details/tips-for-usage-with-sp6.md +++ b/docs/additional-details/tips-for-usage-with-sp6.md @@ -6,7 +6,7 @@ As mentioned earlier in the documentation, we assume you install ReactOnRails in 2. Check the following table to map the references in the documentation to the relevant ones in Shakapacker 6: - |Usage in Shakapacker 7 |Equivalant in Shakapacker 6| + |Usage in Shakapacker 7 |Equivalent in Shakapacker 6| |----------------------------|---------------------------| |`config/shakapacker.yml` |`config/webpacker.yml` | |`bin/shakapacker` |`bin/webpacker` | diff --git a/docs/api/view-helpers-api.md b/docs/api/view-helpers-api.md index a96041170..a50025b03 100644 --- a/docs/api/view-helpers-api.md +++ b/docs/api/view-helpers-api.md @@ -1,7 +1,7 @@ # View and Controller Helpers ## View Helpers API -Once the bundled files have been generated in your `app/assets/webpack` folder and you have registered your components, you will want to render these components on your Rails views using the included helper method, [`react_component`](https://www.shakacode.com/react-on-rails/docs/api/view-helpers-api/#react_component). +Once the bundled files have been generated in your `app/assets/webpack` folder, and you have registered your components, you will want to render these components on your Rails views using the included helper method, [`react_component`](https://www.shakacode.com/react-on-rails/docs/api/view-helpers-api/#react_component). ------------ @@ -93,13 +93,13 @@ end %> ### rails_context -You can call `rails_context` or `rails_context(server_side: true|false)` from your controller or view to see what values are are in the Rails Context. Pass true or false depending on whether you want to see the server side or the client side rails_context. Typically, for computing cache keys, you should leave server_side as the default true. When calling this from a controller method, use `helpers.rails_context`. +You can call `rails_context` or `rails_context(server_side: true|false)` from your controller or view to see what values are in the Rails Context. Pass true or false depending on whether you want to see the server side or the client side rails_context. Typically, for computing cache keys, you should leave server_side as the default true. When calling this from a controller method, use `helpers.rails_context`. ------------ ### Renderer Functions (function that will call ReactDOM.render or ReactDOM.hydrate) -A "renderer function" is a Render-Function that accepts three arguments (rather than 2): `(props, railsContext, domNodeId) => { ... }`. Instead of returning a React component, a renderer is responsible for installing a callback that will call `ReactDOM.render` (in React 16+, `ReactDOM.hydrate`) to render a React component into the DOM. The "renderer function" is called at the same time the document ready event would instantate the React components into the DOM. +A "renderer function" is a Render-Function that accepts three arguments (rather than 2): `(props, railsContext, domNodeId) => { ... }`. Instead of returning a React component, a renderer is responsible for installing a callback that will call `ReactDOM.render` (in React 16+, `ReactDOM.hydrate`) to render a React component into the DOM. The "renderer function" is called at the same time the document ready event would instantiate the React components into the DOM. Why would you want to call `ReactDOM.hydrate` yourself? One possible use case is [code splitting](https://www.shakacode.com/react-on-rails/docs/javascript/code-splitting/). In a nutshell, you don't want to load the React component on the DOM node yet. So you want to install some handler that will call `ReactDOM.hydrate` at a later time. In the case of code splitting with server rendering, the server rendered code has any async code loaded and used to server render. Thus, the client code must also fully load any asynch code before server rendering. Otherwise, the client code would first render partially, not matching the server rendering, and then a second later, the full code would render, resulting in an unpleasant flashing on the screen. diff --git a/docs/guides/configuration.md b/docs/guides/configuration.md index af6f781cb..06129115d 100644 --- a/docs/guides/configuration.md +++ b/docs/guides/configuration.md @@ -179,7 +179,7 @@ ReactOnRails.configure do |config| # config.components_subdirectory = "ror_components" # Default is false. - # The default can be overidden as an option in calls to view helpers + # The default can be overridden as an option in calls to view helpers # `render_component` and `render_component_hash`. You may set to true to change the default to auto loading. config.auto_load_bundle = false diff --git a/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md b/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md index 15e3b5f5b..882d4c537 100644 --- a/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md +++ b/docs/guides/hmr-and-hot-reloading-with-the-webpack-dev-server.md @@ -75,7 +75,7 @@ To enable HMR functionality you have to use `./bin/shakapacker-dev-server` ) } ``` - We added overlay.sockedPort option in `ReactRefreshWebpackPlugin` to match the webpack dev-server port specified in `config/shakapacker.yml`. Thats way we make sockjs works properly and suppress error in browser console `GET http://localhost:[port]/sockjs-node/info?t=[xxxxxxxxxx] 404 (Not Found)`. + We added `overlay.sockPort` option in `ReactRefreshWebpackPlugin` to match the webpack dev-server port specified in `config/shakapacker.yml`. That way we make sockjs works properly and suppress error in browser console `GET http://localhost:[port]/sockjs-node/info?t=[xxxxxxxxxx] 404 (Not Found)`. 4. Add react-refresh plugin in `babel.config.js` ``` diff --git a/docs/guides/how-react-on-rails-works.md b/docs/guides/how-react-on-rails-works.md index 2f4961d0f..88512aa29 100644 --- a/docs/guides/how-react-on-rails-works.md +++ b/docs/guides/how-react-on-rails-works.md @@ -1,4 +1,4 @@ -# How React on Rails Works (with Shakapcker) +# How React on Rails Works (with Shakapacker) *Note, older versions of React on Rails pushed the Webpack bundles through the Asset Pipeline. This older method has *many* disadvantages, such as broken sourcemaps, performance issues, etc. If you need help migrating to the current way of bypassing the Asset Pipeline, [email Justin](mailto:justin@shakacode.com).* diff --git a/docs/guides/i18n.md b/docs/guides/i18n.md index 4645e85cd..69c105930 100644 --- a/docs/guides/i18n.md +++ b/docs/guides/i18n.md @@ -84,4 +84,4 @@ By default, the locales are generated as JSON, but you can also generate them as # Notes * See why using JSON can perform better compared to JS for large amounts of data [https://v8.dev/blog/cost-of-javascript-2019#json](https://v8.dev/blog/cost-of-javascript-2019#json). * See [Support for Rails' i18n pluralization #1000](https://github.com/shakacode/react_on_rails/issues/1000) for a discussion of issues around pluralization. -* *Outdated:* You can refer to [react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial) and [PR #340](https://github.com/shakacode/react-webpack-rails-tutorial/pull/340), [commmited](https://github.com/shakacode/react-webpack-rails-tutorial/commit/ef369ed9d922aea5116ca7e50208169fd7831389) for a complete example. +* *Outdated:* You can refer to [react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial) and [PR #340](https://github.com/shakacode/react-webpack-rails-tutorial/pull/340), [committed](https://github.com/shakacode/react-webpack-rails-tutorial/commit/ef369ed9d922aea5116ca7e50208169fd7831389) for a complete example. diff --git a/docs/guides/react-server-rendering.md b/docs/guides/react-server-rendering.md index f6311a16f..47ca46102 100644 --- a/docs/guides/react-server-rendering.md +++ b/docs/guides/react-server-rendering.md @@ -11,7 +11,7 @@ Here's a [decent article to introduce you to server rendering](https://medium.fr During the Rails rendering of HTML per a browser request, the Rails server will execute some JavaScript to create a string of HTML used for React server rendering. This resulting HTML is placed with in your Rails view's output. -The default JavaScript interpretter is [ExecJS](https://github.com/rails/execjs). If you want to maximize the perfomance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](https://github.com/shakacode/react_on_rails/wiki). +The default JavaScript interpreter is [ExecJS](https://github.com/rails/execjs). If you want to maximize the performance of your server rendering, then you want to use React on Rails Pro which uses NodeJS to do the server rendering. See the [docs for React on Rails Pro](https://github.com/shakacode/react_on_rails/wiki). See [this note](https://www.shakacode.com/react-on-rails/docs/guides/client-vs-server-rendering/). diff --git a/docs/guides/render-functions-and-railscontext.md b/docs/guides/render-functions-and-railscontext.md index 4b52bd92f..c6fe0a108 100644 --- a/docs/guides/render-functions-and-railscontext.md +++ b/docs/guides/render-functions-and-railscontext.md @@ -157,7 +157,7 @@ Consider this line in depth: ``` -The outer `{...` is for the [JSX spread operator for attributes](https://facebook.github.io/react/docs/jsx-in-depth.html#spread-attributes) and the innner `{...` is for the [Spread in object literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Spread_in_object_literals). +The outer `{...` is for the [JSX spread operator for attributes](https://facebook.github.io/react/docs/jsx-in-depth.html#spread-attributes) and the inner `{...` is for the [Spread in object literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Spread_in_object_literals). ## Use Cases @@ -202,4 +202,3 @@ end ``` In this case, a prop and value for `somethingUseful` will go into the railsContext passed to all react_component and redux_store calls. You may set any values available in the view rendering context. - diff --git a/docs/guides/tutorial.md b/docs/guides/tutorial.md index 487d7b896..08ce56f1a 100644 --- a/docs/guides/tutorial.md +++ b/docs/guides/tutorial.md @@ -294,7 +294,7 @@ If you want to test this out with HMR, then you also need to add this line to yo ``` More likely, you will create a different build file for server rendering. However, if you want to -use the same file from the shakapack-dev-server, you'll need to add that line. +use the same file from the shakapacker-dev-server, you'll need to add that line. When you look at the source code for the page (right click, view source in Chrome), you can see the difference between non-server rendering, where your DIV containing your React looks like this: diff --git a/docs/javascript/code-splitting.md b/docs/javascript/code-splitting.md index e8e4b710a..8eb2733f2 100644 --- a/docs/javascript/code-splitting.md +++ b/docs/javascript/code-splitting.md @@ -20,11 +20,11 @@ Let's say you're requesting a page that needs to fetch a code chunk from the ser > (server) `
{ /* * NOTE: Since is a singleton, it preserves value as the tests run. - * Thus, tests are cummulative. + * Thus, tests are cumulative. */ it('registers and retrieves multiple components', () => { expect.assertions(4); diff --git a/rakelib/release.rake b/rakelib/release.rake index bd6d7ff7f..4d1fef404 100644 --- a/rakelib/release.rake +++ b/rakelib/release.rake @@ -34,7 +34,7 @@ Example: `rake release[2.1.0,false]`") task :release, %i[gem_version dry_run tools_install] do |_t, args| include ReactOnRails::TaskHelpers - # Check if there are uncommited changes + # Check if there are uncommitted changes ReactOnRails::GitUtils.uncommitted_changes?(RaisingMessageHandler.new) args_hash = args.to_hash diff --git a/script/test b/script/test index 2f915115e..c68d21801 100644 --- a/script/test +++ b/script/test @@ -20,7 +20,7 @@ if [ "$RAILS_ENV" = "test" ] || [ "$RACK_ENV" = "test" ]; then else # if the environment isn't set to `test`, set it to `test` and update the # application to ensure all dependencies are met as well as any other things - # that need to be up to date, like db migrations. The environement not having + # that need to be up to date, like db migrations. The environment not having # already been set to `test` almost always means this is being called on it's # own from a `development` environment. export RAILS_ENV="test" RACK_ENV="test" diff --git a/spec/dummy/app/views/pages/xhr_refresh.html.erb b/spec/dummy/app/views/pages/xhr_refresh.html.erb index 0cf632827..f46cf080c 100644 --- a/spec/dummy/app/views/pages/xhr_refresh.html.erb +++ b/spec/dummy/app/views/pages/xhr_refresh.html.erb @@ -18,7 +18,7 @@ Components will be prerendered by the server and inserted in the DOM (spec/dummy/app/views/pages/xhr_refresh.js.erb)
No client rehydration will occur, preventing any event handler to be correctly attached

- Thus, the onChange handler of the HelloWorld component won't trigger whereas the one from HellowWorldRehydratable will, thanks to the "hydrate" javascript event dispacthed from xhr_refresh.js.erb
+ Thus, the onChange handler of the HelloWorld component won't trigger whereas the one from HellowWorldRehydratable will, thanks to the "hydrate" javascript event dispatched from xhr_refresh.js.erb


diff --git a/spec/dummy/client/README.md b/spec/dummy/client/README.md index 6bbf3e635..191858993 100644 --- a/spec/dummy/client/README.md +++ b/spec/dummy/client/README.md @@ -18,7 +18,7 @@ or to autofix yarn run lint -- --fix -Updating Node Dependenencies +Updating Node Dependencies =========================== ``` diff --git a/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx b/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx index 44e4152a1..f7c77e8a7 100644 --- a/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx +++ b/spec/dummy/client/app/startup/ReactHelmetApp.server.jsx @@ -12,7 +12,7 @@ import ReactHelmet from '../components/ReactHelmet'; * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered * component markup must go under "componentHtml" key. * - * Note that the function takes 2 params to identify this as a generator fuction. Alternately, + * Note that the function takes 2 params to identify this as a generator function. Alternately, * the function could get the property of `.renderFunction = true` added to it. */ export default (props, _railsContext) => { diff --git a/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx b/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx index 881e4c8b8..d1c72af50 100644 --- a/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx +++ b/spec/dummy/client/app/startup/ReactHelmetAppBroken.server.jsx @@ -14,7 +14,7 @@ import ReactHelmet from '../components/ReactHelmet'; * This is imported as "ReactHelmetApp" by "serverRegistration.jsx". Note that rendered * component markup must go under "componentHtml" key. * - * Note that the function should take 2 params to identify this as a generator fuction. + * Note that the function should take 2 params to identify this as a generator function. * Alternately, the function could get the property of `.renderFunction = true` added to it. */ export default (props) => { diff --git a/spec/dummy/spec/support/selenium_logger.rb b/spec/dummy/spec/support/selenium_logger.rb index caacdd940..921df2748 100644 --- a/spec/dummy/spec/support/selenium_logger.rb +++ b/spec/dummy/spec/support/selenium_logger.rb @@ -4,7 +4,7 @@ config.after(:each, :js) do |example| next unless %i[selenium_chrome selenium_chrome_headless].include?(Capybara.current_driver) - # As of 2018-10-21, traping errors does not work for firefox + # As of 2018-10-21, trapping errors does not work for firefox log_only_list = %w[DEBUG INFO] log_only_list += %w[WARNING SEVERE ERROR] if example.metadata[:ignore_js_errors] diff --git a/spec/dummy/spec/system/rails_context_spec.rb b/spec/dummy/spec/system/rails_context_spec.rb index 81c8b1ae5..1f3fb67fa 100644 --- a/spec/dummy/spec/system/rails_context_spec.rb +++ b/spec/dummy/spec/system/rails_context_spec.rb @@ -11,7 +11,7 @@ visit "/#{pathname}?ab=cd" end - context "when visting /#{pathname}", :js do + context "when visiting /#{pathname}", :js do it "check rails context" do expect(page).to have_current_path("/#{pathname}", ignore_query: true) host = Capybara.current_session.server.host diff --git a/spec/react_on_rails/configuration_spec.rb b/spec/react_on_rails/configuration_spec.rb index 071d37ce0..1f2193fc5 100644 --- a/spec/react_on_rails/configuration_spec.rb +++ b/spec/react_on_rails/configuration_spec.rb @@ -273,7 +273,7 @@ module ReactOnRails ReactOnRails.configure do |config| config.auto_load_bundle = true end - end.to raise_error(ReactOnRails::Error, /components_subdirectory is unconfigured/) + end.to raise_error(ReactOnRails::Error, /components_subdirectory is not configured/) end it "checks that autobundling requirements are met if configuration options for autobundling are set" do diff --git a/spec/react_on_rails/git_utils_spec.rb b/spec/react_on_rails/git_utils_spec.rb index 4f8927437..f429e2e8e 100644 --- a/spec/react_on_rails/git_utils_spec.rb +++ b/spec/react_on_rails/git_utils_spec.rb @@ -5,7 +5,7 @@ module ReactOnRails RSpec.describe GitUtils do describe ".uncommitted_changes?" do - context "with uncommited git changes" do + context "with uncommitted git changes" do let(:message_handler) { instance_double("MessageHandler") } # rubocop:disable RSpec/VerifiedDoubleReference it "returns true" do diff --git a/spec/react_on_rails/locales_spec.rb b/spec/react_on_rails/locales_spec.rb index 15f051219..3fc76489f 100644 --- a/spec/react_on_rails/locales_spec.rb +++ b/spec/react_on_rails/locales_spec.rb @@ -6,11 +6,11 @@ module ReactOnRails RSpec.describe Locales do describe ".compile" do before do - @orginal_output_format = ReactOnRails.configuration.i18n_output_format + @original_output_format = ReactOnRails.configuration.i18n_output_format end after do - ReactOnRails.configuration.i18n_output_format = @orginal_output_format + ReactOnRails.configuration.i18n_output_format = @original_output_format end it "by default compiles to JSON" do diff --git a/spec/react_on_rails/webpacker_utils_spec.rb b/spec/react_on_rails/webpacker_utils_spec.rb index 3adbda406..c30af8b90 100644 --- a/spec/react_on_rails/webpacker_utils_spec.rb +++ b/spec/react_on_rails/webpacker_utils_spec.rb @@ -4,7 +4,7 @@ module ReactOnRails describe WebpackerUtils do - describe ".using_webapcker?" do + describe ".using_webpacker?" do subject do described_class.using_webpacker? end