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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e87c2d5daec14b131563f66b8813aadc20962b0
4
- data.tar.gz: d04373277451a8cd984a63e1e325fa520b7c932e
3
+ metadata.gz: 980e63fa85b8221f7773b8e4cc43b19d3d6188f5
4
+ data.tar.gz: a5e71d9a44e77c888d92619ad9c3dc849949364e
5
5
  SHA512:
6
- metadata.gz: 7779155e1479945571bcf199003b158c78422a8f61ae0bde697544132e78e6a48e42617b0662cb664a455b2f305da7badd53286776206b54b55d6eed5fa19f02
7
- data.tar.gz: 656b9484ca39ab1b67d26dcaf3e1d38f695c8b8e5be6a1bf8836be392614146eac2c0e8e05576408cee9222d19398372623342f877c4fa026b085a9b7a1cc0ad
6
+ metadata.gz: 1aa2a2935544f0b058e9d3f0d9dbfae8c205fc086d57b43de6bcc68134db3914edb6879c36f4f7865eb279c5e0be1f780811334d85c6371abc29b19c274f672b
7
+ data.tar.gz: ab4eaf6ec4ef2f01895f385cc236207c5660f394e200a1222f9af045c919f94ea9f51df6034f22b06322c482bd5f4421983bd322ee66994e6d7b6f60d33de609
@@ -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.2...master
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.
@@ -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:5000/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.
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Starts SimpleCov for code coverage.
4
4
 
5
- if ENV["COVERAGE"]
5
+ if ENV["COVERAGE"] == "true"
6
6
  require "simplecov"
7
7
 
8
8
  # Using a command name prevents results from getting clobbered by other test suites
@@ -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
- message << <<~MSG
12
- Encountered error: \"#{err}\"
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
- message << <<~MSG
19
- when prerendering #{component_name} with props: #{props}
20
- js_code was:
21
- #{js_code}
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
- message << <<~MSG
26
- console messages:
27
- #{console_messages}
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"))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReactOnRails
4
- VERSION = "8.0.2"
4
+ VERSION = "8.0.3"
5
5
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "8.0.2",
3
+ "version": "8.0.3",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
@@ -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
@@ -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 = <<~DESC
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, '')} COVERAGE=true TEST_ENV_COMMAND_NAME="#{command_name}")
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.2
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-05 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow