react_on_rails 8.0.2 → 8.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/docs/additional-reading/hot-reloading-rails-development.md +4 -0
- data/docs/tutorial.md +2 -2
- data/lib/generators/react_on_rails/templates/dev_tests/spec/simplecov_helper.rb +1 -1
- data/lib/react_on_rails/git_utils.rb +1 -1
- data/lib/react_on_rails/prerender_error.rb +15 -9
- data/lib/react_on_rails/version.rb +1 -1
- data/package.json +1 -1
- data/rakelib/release.rake +5 -0
- data/rakelib/run_rspec.rake +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 980e63fa85b8221f7773b8e4cc43b19d3d6188f5
|
4
|
+
data.tar.gz: a5e71d9a44e77c888d92619ad9c3dc849949364e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aa2a2935544f0b058e9d3f0d9dbfae8c205fc086d57b43de6bcc68134db3914edb6879c36f4f7865eb279c5e0be1f780811334d85c6371abc29b19c274f672b
|
7
|
+
data.tar.gz: ab4eaf6ec4ef2f01895f385cc236207c5660f394e200a1222f9af045c919f94ea9f51df6034f22b06322c482bd5f4421983bd322ee66994e6d7b6f60d33de609
|
data/CHANGELOG.md
CHANGED
@@ -8,9 +8,14 @@ Changes since last non-beta release.
|
|
8
8
|
|
9
9
|
*Please add entries here for your pull requests.*
|
10
10
|
|
11
|
+
## [8.0.3]
|
12
|
+
### Fixed
|
13
|
+
- Ruby 2.1 issue due to `<<~` as reported in [issue #870](https://github.com/shakacode/react_on_rails/issues/870). [#867](https://github.com/shakacode/react_on_rails/pull/867) by [justin808](https://github.com/justin808)
|
14
|
+
|
11
15
|
## [8.0.2]
|
12
16
|
### Fixed
|
13
17
|
- Any failure in webpack to build test files quits tests.
|
18
|
+
- Fixed a Ruby 2.4 potential crash which could cause a crash due to pathname change in Ruby 2.4.
|
14
19
|
- CI Improvements:
|
15
20
|
- Switched to yarn link and removed relative path install of react-on-rails
|
16
21
|
- Removed testing of Turbolinks 2
|
@@ -606,7 +611,8 @@ Best done with Object destructing:
|
|
606
611
|
##### Fixed
|
607
612
|
- Fix several generator related issues.
|
608
613
|
|
609
|
-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/8.0.
|
614
|
+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/8.0.3...master
|
615
|
+
[8.0.3]: https://github.com/shakacode/react_on_rails/compare/8.0.2...8.0.3
|
610
616
|
[8.0.2]: https://github.com/shakacode/react_on_rails/compare/8.0.1...8.0.2
|
611
617
|
[8.0.1]: https://github.com/shakacode/react_on_rails/compare/8.0.0...8.0.1
|
612
618
|
[8.0.0]: https://github.com/shakacode/react_on_rails/compare/7.0.4...8.0.0
|
@@ -1,5 +1,9 @@
|
|
1
1
|
# Hot Reloading of Assets For Rails Development
|
2
2
|
|
3
|
+
_Note, this document is not yet updated for React on Rails v8+. See [PR #865](https://github.com/shakacode/react_on_rails/pull/865) for a detailed example of doing hot reloading using V8+ with Webpack v2. Any volunteers to update this page? See [#772](https://github.com/shakacode/react_on_rails/issues/772) and [#361](https://github.com/shakacode/react-webpack-rails-tutorial/issues/361)._
|
4
|
+
|
5
|
+
------
|
6
|
+
|
3
7
|
This document outlines the steps to setup your React On Rails Environment so that you can experience the pleasure of hot reloading of JavaScript and Sass during your Rails development work. See [Issue 332](https://github.com/shakacode/react_on_rails/issues/332) for troubleshooting. There are 3 examples of this setup:
|
4
8
|
|
5
9
|
1. [minimal demo here](https://github.com/retroalgic/react-on-rails-hot-minimal): The most simple and updated hot reloading setup.
|
data/docs/tutorial.md
CHANGED
@@ -83,8 +83,8 @@ foreman start -f Procfile.dev
|
|
83
83
|
|
84
84
|
![04](https://cloud.githubusercontent.com/assets/20628911/17464921/3c2fdb40-5cf2-11e6-9343-6afa53593a70.png)
|
85
85
|
|
86
|
-
Visit http://localhost:
|
87
|
-
Note, foreman defaults to PORT 5000 unless you set the value of PORT in your environment.
|
86
|
+
Visit http://localhost:3000/hello_world and see your **React On Rails** app running!
|
87
|
+
Note, foreman defaults to PORT 5000 unless you set the value of PORT in your environment or in the Procfile.
|
88
88
|
|
89
89
|
![05](https://cloud.githubusercontent.com/assets/20628911/17464920/3c2e8ae2-5cf2-11e6-9e30-5ec5f9e2cbc6.png)
|
90
90
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module ReactOnRails
|
4
4
|
module GitUtils
|
5
5
|
def self.uncommitted_changes?(message_handler)
|
6
|
-
return false if ENV["COVERAGE"]
|
6
|
+
return false if ENV["COVERAGE"] == "true"
|
7
7
|
status = `git status --porcelain`
|
8
8
|
return false if status.empty?
|
9
9
|
error = "You have uncommitted code. Please commit or stash your changes before continuing"
|
@@ -8,24 +8,30 @@ module ReactOnRails
|
|
8
8
|
js_code: nil, console_messages: nil)
|
9
9
|
message = "ERROR in SERVER PRERENDERING\n".dup
|
10
10
|
if err
|
11
|
-
|
12
|
-
|
11
|
+
# rubocop:disable Layout/IndentHeredoc
|
12
|
+
message << <<-MSG
|
13
|
+
Encountered error: \"#{err}\"
|
13
14
|
MSG
|
15
|
+
# rubocop:enable Layout/IndentHeredoc
|
14
16
|
backtrace = err.backtrace.join("\n")
|
15
17
|
else
|
16
18
|
backtrace = nil
|
17
19
|
end
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
# rubocop:disable Layout/IndentHeredoc
|
21
|
+
message << <<-MSG
|
22
|
+
when prerendering #{component_name} with props: #{props}
|
23
|
+
js_code was:
|
24
|
+
#{js_code}
|
22
25
|
MSG
|
26
|
+
# rubocop:enable Layout/IndentHeredoc
|
23
27
|
|
24
28
|
if console_messages
|
25
|
-
|
26
|
-
|
27
|
-
|
29
|
+
# rubocop:disable Layout/IndentHeredoc
|
30
|
+
message << <<-MSG
|
31
|
+
console messages:
|
32
|
+
#{console_messages}
|
28
33
|
MSG
|
34
|
+
# rubocop:enable Layout/IndentHeredoc
|
29
35
|
end
|
30
36
|
|
31
37
|
super([message, backtrace].compact.join("\n"))
|
data/package.json
CHANGED
data/rakelib/release.rake
CHANGED
@@ -22,6 +22,7 @@ which are installed via `bundle install` and `yarn`
|
|
22
22
|
|
23
23
|
Example: `rake release[2.1.0,false]`")
|
24
24
|
|
25
|
+
# rubocop:disable Metrics/BlockLength
|
25
26
|
task :release, %i[gem_version dry_run tools_install] do |_t, args|
|
26
27
|
class MessageHandler
|
27
28
|
def add_error(error)
|
@@ -66,4 +67,8 @@ task :release, %i[gem_version dry_run tools_install] do |_t, args|
|
|
66
67
|
|
67
68
|
# Release the new gem version
|
68
69
|
sh_in_dir(gem_root, "gem release") unless is_dry_run
|
70
|
+
|
71
|
+
# Update master with new npm version
|
72
|
+
sh_in_dir(Path.join(gem_root, "spec", "dummy", "client"), "yarn add react-on-rails@#{npm_version}")
|
73
|
+
sh_in_dir(gem_root, "git commit -am 'Updated spec/dummy/client/package.json latest version'") unless is_dry_run
|
69
74
|
end
|
data/rakelib/run_rspec.rake
CHANGED
@@ -49,7 +49,7 @@ namespace :run_rspec do
|
|
49
49
|
|
50
50
|
desc "(HACK) Run RSpec on spec/empty_spec in order to have SimpleCov generate a coverage report from cache"
|
51
51
|
task :empty do
|
52
|
-
sh %(COVERAGE=true rspec spec/empty_spec.rb)
|
52
|
+
sh %(#{ENV['USE_COVERALLS'] ? 'COVERAGE=true' : ''} rspec spec/empty_spec.rb)
|
53
53
|
end
|
54
54
|
|
55
55
|
Coveralls::RakeTask.new if ENV["USE_COVERALLS"] == "TRUE"
|
@@ -70,7 +70,7 @@ task :js_tests do
|
|
70
70
|
sh "yarn run test"
|
71
71
|
end
|
72
72
|
|
73
|
-
msg =
|
73
|
+
msg = <<-DESC.strip_heredoc
|
74
74
|
Runs all tests, run `rake -D run_rspec` to see all available test options.
|
75
75
|
"rake run_rspec:example_basic" is a good way to run only one generator test.
|
76
76
|
DESC
|
@@ -101,7 +101,8 @@ def run_tests_in(dir, options = {})
|
|
101
101
|
|
102
102
|
command_name = options.fetch(:command_name, path.basename)
|
103
103
|
rspec_args = options.fetch(:rspec_args, "")
|
104
|
-
env_vars = %(#{options.fetch(:env_vars, '')}
|
104
|
+
env_vars = %(#{options.fetch(:env_vars, '')} TEST_ENV_COMMAND_NAME="#{command_name}").dup
|
105
|
+
env_vars << "COVERAGE=true" if ENV["USE_COVERALLS"]
|
105
106
|
sh_in_dir(path.realpath, "#{env_vars} bundle exec rspec #{rspec_args}")
|
106
107
|
end
|
107
108
|
|
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: 8.0.
|
4
|
+
version: 8.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|