react_on_rails 12.2.0 → 12.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +13 -4
- data/Gemfile.development_dependencies +1 -1
- data/README.md +7 -9
- data/Rakefile +1 -1
- data/docs/basics/configuration.md +5 -2
- data/docs/rails/turbolinks.md +13 -1
- data/lib/generators/react_on_rails/base_generator.rb +1 -1
- data/lib/react_on_rails/locales/base.rb +10 -7
- data/lib/react_on_rails/version.rb +1 -1
- data/package.json +1 -1
- data/rakelib/release.rake +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bee43668fbf28e23cce1688ae60bbfd657e9b16eaecb21d274bdef8f33e0a870
|
4
|
+
data.tar.gz: ad75671d6dcdadfa567abc9aa1e795415323bf57ed78ae695bac5a7035c155f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6e94cc63334b75ca78e0575701862fda182f9c0d1be97a92cc7bc9a3af33c3716bbbe4d893c371ece4e56893081d6cccea9712e9336a220f3cab7e7997ab10
|
7
|
+
data.tar.gz: a7e27db6edaf1d9761ba80c846fd40a1e9668aba12e2a6ae1b39e64cd5719784769541d7694e348334c26c24fe102f10636ba5f25996dd5bf6a7406213e5907e
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -17,11 +17,19 @@ Changes since last non-beta release.
|
|
17
17
|
|
18
18
|
*Please add entries here for your pull requests that are not yet released.*
|
19
19
|
|
20
|
+
### [12.3.0] - 2021-07-26
|
21
|
+
#### Added
|
22
|
+
|
23
|
+
- Ability to use with Turbo (@hotwired/turbo), as Turbolinks gets obsolete. [PR 1374](https://github.com/shakacode/react_on_rails/pull/1374) by [pgruener](https://github.com/pgruener) and [PR 1377](https://github.com/shakacode/react_on_rails/pull/1377) by [mdesantis](https://github.com/mdesantis).
|
24
|
+
|
25
|
+
To configure turbo the following option can be set:
|
26
|
+
`ReactOnRails.setOptions({ turbo: true })`
|
27
|
+
|
20
28
|
### [12.2.0] - 2021-03-25
|
21
29
|
#### Added
|
22
30
|
- Ability to configure server react rendering to throw rather than just logging the error. Useful for
|
23
31
|
React on Rails Pro Node rendering [PR 1365](https://github.com/shakacode/react_on_rails/pull/1365) by [justin808](https://github.com/justin808).
|
24
|
-
|
32
|
+
|
25
33
|
### [12.1.0] - 2021-03-23
|
26
34
|
#### Added
|
27
35
|
- Added the ability to assign a module with a `call` method to `config.build_production_command`. See [the configuration docs](./docs/basics/configuration.md). [PR 1362: Accept custom module for config.build_production_command](https://github.com/shakacode/react_on_rails/pull/1362).
|
@@ -43,7 +51,7 @@ Changes since last non-beta release.
|
|
43
51
|
|
44
52
|
### [12.0.2] - 2020-07-09
|
45
53
|
#### Fixed
|
46
|
-
- Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/
|
54
|
+
- Remove dependency upon Redux for Typescript types. [PR 1323](https://github.com/shakacode/react_on_rails/pull/1323) by [justin808](https://github.com/justin808).
|
47
55
|
|
48
56
|
### [12.0.1] - 2020-07-09
|
49
57
|
#### Fixed
|
@@ -67,7 +75,7 @@ invoked to return the React component. In that case, you won't need to pass any
|
|
67
75
|
[PR 1268](https://github.com/shakacode/react_on_rails/pull/1268) by [justin808](https://github.com/justin808)
|
68
76
|
|
69
77
|
See [docs/basics/upgrading-react-on-rails](./docs/basics/upgrading-react-on-rails.md#upgrading-to-v12)
|
70
|
-
for details.
|
78
|
+
for details.
|
71
79
|
|
72
80
|
#### Other Updates
|
73
81
|
* `react_on_rails` fully supports `rails/webpacker`. The example test app in `spec/dummy` was recently converted over to use rails/webpacker v4+. It's a good example of how to leverage rails/webpacker's webpack configuration for server-side rendering.
|
@@ -959,7 +967,8 @@ Best done with Object destructing:
|
|
959
967
|
##### Fixed
|
960
968
|
- Fix several generator related issues.
|
961
969
|
|
962
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.
|
970
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/12.3.0...master
|
971
|
+
[12.3.0]: https://github.com/shakacode/react_on_rails/compare/12.2.0...12.3.0
|
963
972
|
[12.2.0]: https://github.com/shakacode/react_on_rails/compare/12.1.0...12.2.0
|
964
973
|
[12.1.0]: https://github.com/shakacode/react_on_rails/compare/12.0.4...12.1.0
|
965
974
|
[12.0.4]: https://github.com/shakacode/react_on_rails/compare/12.0.3...12.0.4
|
@@ -29,7 +29,7 @@ group :development, :test do
|
|
29
29
|
gem "pry-doc"
|
30
30
|
gem "pry-rails"
|
31
31
|
gem "pry-rescue"
|
32
|
-
gem "rubocop", require: false
|
32
|
+
gem "rubocop", "1.14.0", require: false
|
33
33
|
gem "rubocop-performance", require: false
|
34
34
|
gem "rubocop-rspec", require: false
|
35
35
|
gem "scss_lint", require: false
|
data/README.md
CHANGED
@@ -372,23 +372,21 @@ For more testimonials, see [Live Projects](https://github.com/shakacode/react_on
|
|
372
372
|
|
373
373
|
# Supporters
|
374
374
|
|
375
|
-
The following companies support this open source project, and ShakaCode uses their products! Justin writes React on Rails on [RubyMine](https://www.jetbrains.com/ruby/). We use [Scout](https://scoutapp.com/) to monitor the live performance of [HiChee.com](https://HiChee.com), [Rails AutoScale](https://railsautoscale.com) to scale the dynos of HiChee, [BrowserStack](https://www.browserstack.com) to solve problems with oddball browsers.
|
375
|
+
The following companies support this open source project, and ShakaCode uses their products! Justin writes React on Rails on [RubyMine](https://www.jetbrains.com/ruby/). We use [Scout](https://scoutapp.com/) to monitor the live performance of [HiChee.com](https://HiChee.com), [Rails AutoScale](https://railsautoscale.com) to scale the dynos of HiChee, and [HoneyBadger](https://www.honeybadger.io/) to monitor application errors. We love [BrowserStack](https://www.browserstack.com) to solve problems with oddball browsers. [Status Hero](https://statushero.com/) keeps the team posted on daily progress; it's so much better than live standups.
|
376
376
|
|
377
|
-
[![
|
377
|
+
[![RubyMine](https://user-images.githubusercontent.com/1118459/114100597-3b0e3000-9860-11eb-9b12-73beb1a184b2.png)](https://www.jetbrains.com/ruby/)
|
378
378
|
[![Scout](https://user-images.githubusercontent.com/1118459/41828269-106b40f8-77d0-11e8-8d19-9c4b167ef9d8.png)](https://scoutapp.com/)
|
379
|
-
[![
|
379
|
+
[![Rails AutoScale](https://user-images.githubusercontent.com/1118459/103197530-48dc0e80-488a-11eb-8b1b-a16664b30274.png)](https://railsautoscale.com/)
|
380
380
|
[![BrowserStack](https://cloud.githubusercontent.com/assets/1118459/23203304/1261e468-f886-11e6-819e-93b1a3f17da4.png)](https://www.browserstack.com)
|
381
|
+
[![HoneyBadger](https://user-images.githubusercontent.com/1118459/114100696-63962a00-9860-11eb-8ac1-75ca02856d8e.png)](https://www.honeybadger.io/)
|
382
|
+
[![StatusHero](https://user-images.githubusercontent.com/1118459/126868048-3fe64e54-4d6d-4066-9df2-8cf6fbaeb314.png)](https://statushero.com/)
|
381
383
|
|
382
|
-
|
383
|
-
## Clubhouse
|
384
|
-
I've just moved ShakaCode's development to [ClubHouse](https://clubhouse.io/) from Trello. We're going to be doing this with all our projects. If you want to **try ClubHouse and get 2 months free beyond the 14-day trial period**, click [here to use ShakaCode's referral code](http://r.clbh.se/mvfoNeH). We're participating in their awesome triple-sided referral program, which you can read about [here](https://clubhouse.io/blog/clubhouse-referral-program-5f614bb437c3). By using our [referral code](http://r.clbh.se/mvfoNeH) you'll be supporting ShakaCode and, thus, React on Rails!
|
385
|
-
|
386
|
-
*If you'd like to support React on Rails and have your company listed here, [get in touch](mailto:justin@shakacode.com).*
|
384
|
+
ShakaCode's favorite project tracking tool is [ClubHouse](https://clubhouse.io/). If you want to **try ClubHouse and get 2 months free beyond the 14-day trial period**, click [here to use ShakaCode's referral code](http://r.clbh.se/mvfoNeH). We're participating in their awesome triple-sided referral program, which you can read about [here](https://clubhouse.io/referral/). By using our [referral code](http://r.clbh.se/mvfoNeH) you'll be supporting ShakaCode and, thus, React on Rails!
|
387
385
|
|
388
386
|
Aloha and best wishes from Justin and the ShakaCode team!
|
389
387
|
|
390
388
|
# Work with Us
|
391
|
-
ShakaCode is **[
|
389
|
+
ShakaCode is **[hiring passionate software engineers](http://www.shakacode.com/career)** to work on our projects, including [HiChee](https://hichee.com).
|
392
390
|
|
393
391
|
# License
|
394
392
|
|
data/Rakefile
CHANGED
@@ -73,11 +73,14 @@ ReactOnRails.configure do |config|
|
|
73
73
|
# If that file exists, React on Rails thinks that you'll use the rails/webpacker bin/webpack compiler.
|
74
74
|
config.build_production_command = "RAILS_ENV=production bin/webpack"
|
75
75
|
|
76
|
-
# Alternatively, you can also specify a module containing a class method `call`
|
76
|
+
# Alternatively, you can also specify a module containing a class method `call`
|
77
77
|
# In this example, the module BuildProductionCommand would have a class method `call`.
|
78
78
|
# See bottom for an example of the BuildProductionCommand module.
|
79
79
|
# config.build_production_command = BuildProductionCommand
|
80
|
-
|
80
|
+
# If you wish to utilize ReactOnRailsPro production bundle caching logic, then use
|
81
|
+
# config.build_production_command = ReactOnRailsPro::AssetsPrecompile
|
82
|
+
# and be sure to check ReactOnRailsPro's configuration documentation!
|
83
|
+
|
81
84
|
################################################################################
|
82
85
|
################################################################################
|
83
86
|
# SERVER RENDERING OPTIONS
|
data/docs/rails/turbolinks.md
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
# Turbolinks
|
1
|
+
# Turbolinks and Turbo
|
2
|
+
|
3
|
+
## Updated to support Turbo
|
4
|
+
* See [PR 1374](https://github.com/shakacode/react_on_rails/pull/1374).
|
5
|
+
* Ability to use with Turbo (@hotwired/turbo), as Turbolinks gets obsolete.
|
6
|
+
|
7
|
+
To configure turbo the following option can be set:
|
8
|
+
`ReactOnRails.setOptions({ turbo: true })`
|
9
|
+
|
10
|
+
Turbo is not auto-detected like older Turbolinks.
|
11
|
+
|
12
|
+
*Below docs maybe outdated*
|
2
13
|
|
3
14
|
* See [Turbolinks on Github](https://github.com/rails/turbolinks)
|
4
15
|
* React on Rails currently supports 2.5.x of Turbolinks and 5.0.0 of Turbolinks 5.
|
@@ -73,6 +84,7 @@ To turn on tracing of Turbolinks events, put this in your registration file, whe
|
|
73
84
|
```js
|
74
85
|
ReactOnRails.setOptions({
|
75
86
|
traceTurbolinks: true,
|
87
|
+
turbo: true,
|
76
88
|
});
|
77
89
|
```
|
78
90
|
|
@@ -132,7 +132,7 @@ module ReactOnRails
|
|
132
132
|
# From https://github.com/rails/rails/blob/4c940b2dbfb457f67c6250b720f63501d74a45fd/railties/lib/rails/generators/rails/app/app_generator.rb
|
133
133
|
def app_name
|
134
134
|
@app_name ||= (defined_app_const_base? ? defined_app_name : File.basename(destination_root))
|
135
|
-
.tr(
|
135
|
+
.tr("\\", "").tr(". ", "_")
|
136
136
|
end
|
137
137
|
|
138
138
|
def defined_app_name
|
@@ -54,15 +54,18 @@ module ReactOnRails
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def locale_files
|
57
|
+
# rubocop:disable Layout/IndentationWidth, Style/RedundantBegin
|
57
58
|
@locale_files ||= begin
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
if i18n_yml_dir.present?
|
60
|
+
Dir["#{i18n_yml_dir}/**/*.yml"]
|
61
|
+
else
|
62
|
+
ReactOnRails::Utils.truthy_presence(
|
63
|
+
Rails.application && Rails.application.config.i18n.load_path
|
64
|
+
).presence
|
65
|
+
end
|
65
66
|
end
|
67
|
+
|
68
|
+
# rubocop:enable Layout/IndentationWidth, Style/RedundantBegin
|
66
69
|
end
|
67
70
|
|
68
71
|
def i18n_dir
|
data/package.json
CHANGED
data/rakelib/release.rake
CHANGED
@@ -60,7 +60,7 @@ task :release, %i[gem_version dry_run tools_install] do |_t, args|
|
|
60
60
|
# Will bump the yarn version, commit, tag the commit, push to repo, and release on yarn
|
61
61
|
release_it_command = +"release-it"
|
62
62
|
release_it_command << " #{npm_version}" unless npm_version.strip.empty?
|
63
|
-
release_it_command << " --
|
63
|
+
release_it_command << " --ci --npm.publish --no-git.requireCleanWorkingDir"
|
64
64
|
release_it_command << " --dry-run --verbose" if is_dry_run
|
65
65
|
sh_in_dir(gem_root, release_it_command)
|
66
66
|
|
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: 12.
|
4
|
+
version: 12.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|