react-rails 2.6.0 → 2.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -10
- data/README.md +29 -15
- data/lib/assets/javascripts/react_ujs.js +92 -38
- data/lib/assets/react-source/development/react-server.js +2211 -1983
- data/lib/assets/react-source/development/react.js +23003 -19284
- data/lib/assets/react-source/production/react-server.js +4 -4
- data/lib/assets/react-source/production/react.js +8 -8
- data/lib/react/jsx/sprockets_strategy.rb +1 -1
- data/lib/react/rails/version.rb +1 -1
- data/lib/react/server_rendering/webpacker_manifest_container.rb +3 -3
- metadata +5 -11
@@ -23,7 +23,7 @@ module React
|
|
23
23
|
# @return [Symbol] based on the environment, return a method name to call with the sprockets environment
|
24
24
|
def detect_strategy
|
25
25
|
sprockets_version = Gem::Version.new(Sprockets::VERSION)
|
26
|
-
if sprockets_version >= Gem::Version.new('4.
|
26
|
+
if sprockets_version >= Gem::Version.new('4.a')
|
27
27
|
:register_processors
|
28
28
|
elsif sprockets_version >= Gem::Version.new('3.0.0')
|
29
29
|
:register_engine_with_mime_type
|
data/lib/react/rails/version.rb
CHANGED
@@ -9,7 +9,7 @@ module React
|
|
9
9
|
class WebpackerManifestContainer
|
10
10
|
|
11
11
|
begin
|
12
|
-
MAJOR, MINOR, PATCH, _ = Bundler.locked_gems.specs.find { |gem_spec| gem_spec.name == 'webpacker' }.version.segments
|
12
|
+
MAJOR, MINOR, PATCH, _ = Bundler.locked_gems.specs.find { |gem_spec| gem_spec.name == 'webpacker' || gem_spec.name == 'shakapacker' }.version.segments
|
13
13
|
rescue
|
14
14
|
MAJOR, MINOR, PATCH, _ = [0,0,0]
|
15
15
|
end
|
@@ -27,7 +27,7 @@ module React
|
|
27
27
|
asset_path = manifest.lookup(logical_path).to_s
|
28
28
|
if asset_path.start_with?('http')
|
29
29
|
# Get a file from the webpack-dev-server
|
30
|
-
dev_server_asset = open(asset_path).read
|
30
|
+
dev_server_asset = URI.open(asset_path).read
|
31
31
|
# Remove `webpack-dev-server/client/index.js` code which causes ExecJS to 💥
|
32
32
|
dev_server_asset.sub!(CLIENT_REQUIRE, '//\0')
|
33
33
|
dev_server_asset
|
@@ -44,7 +44,7 @@ module React
|
|
44
44
|
ds = Webpacker.dev_server
|
45
45
|
# Remove the protocol and host from the asset path. Sometimes webpacker includes this, sometimes it does not
|
46
46
|
asset_path.slice!("#{ds.protocol}://#{ds.host_with_port}")
|
47
|
-
dev_server_asset = open("#{ds.protocol}://#{ds.host_with_port}#{asset_path}").read
|
47
|
+
dev_server_asset = URI.open("#{ds.protocol}://#{ds.host_with_port}#{asset_path}").read
|
48
48
|
dev_server_asset.sub!(CLIENT_REQUIRE, '//\0')
|
49
49
|
dev_server_asset
|
50
50
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul O’Shannessy
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: appraisal
|
@@ -31,20 +31,14 @@ dependencies:
|
|
31
31
|
name: bundler
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- - "
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 1.2.2
|
37
|
-
- - "<"
|
34
|
+
- - "~>"
|
38
35
|
- !ruby/object:Gem::Version
|
39
36
|
version: '2.0'
|
40
37
|
type: :development
|
41
38
|
prerelease: false
|
42
39
|
version_requirements: !ruby/object:Gem::Requirement
|
43
40
|
requirements:
|
44
|
-
- - "
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 1.2.2
|
47
|
-
- - "<"
|
41
|
+
- - "~>"
|
48
42
|
- !ruby/object:Gem::Version
|
49
43
|
version: '2.0'
|
50
44
|
- !ruby/object:Gem::Dependency
|
@@ -375,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
375
369
|
- !ruby/object:Gem::Version
|
376
370
|
version: '0'
|
377
371
|
requirements: []
|
378
|
-
rubygems_version: 3.
|
372
|
+
rubygems_version: 3.1.6
|
379
373
|
signing_key:
|
380
374
|
specification_version: 4
|
381
375
|
summary: React integration for Ruby on Rails
|