quilt_rails 3.4.2 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/quilt_rails/configuration.rb +1 -0
- data/lib/quilt_rails/react_renderable.rb +5 -2
- data/lib/quilt_rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aedbb7a0485b28dcddfb679cdec0197d8da16e2934b61d435a47ece1402f025
|
4
|
+
data.tar.gz: 49124ea67fcf5ed1aaa0ed3c76b6b56332aab8b2ed6e54033e36708ca4ec9f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '082b47b61be965938a4b882fe92e459b5651abadc753ef737840de1f62b18b011fbe8fd87b26c1168674ee33291dc1831806ffad3ab0145497a8db6ce66abe7e'
|
7
|
+
data.tar.gz: f9a2d1195fec698f192b091fac540a408e8e05721c3322f936c221da5b319a2a849955a6546b11ff13f48aebfe5299757c14c190ef309d8f3824ae0c91e496a3
|
data/README.md
CHANGED
@@ -171,7 +171,7 @@ In some cases you may want to send basic data from Rails to your React server. Q
|
|
171
171
|
|
172
172
|
**Note:** The data passed should be data that is unlikely or will never change over the course of the session before they render any React components.
|
173
173
|
|
174
|
-
**Note:** Please note the minimal dependencies require to use this feature is listed in [CHANGELOG](./CHANGELOG.md#
|
174
|
+
**Note:** Please note the minimal dependencies require to use this feature is listed in [CHANGELOG](./CHANGELOG.md#1.12.0-2020-05-07)
|
175
175
|
|
176
176
|
```ruby
|
177
177
|
class ReactController < ApplicationController
|
@@ -7,7 +7,9 @@ module Quilt
|
|
7
7
|
include ReverseProxy::Controller
|
8
8
|
|
9
9
|
def render_react(headers: {}, data: {})
|
10
|
-
|
10
|
+
if Rails.env.test? && !Quilt.configuration.allow_integration_test
|
11
|
+
raise DoNotIntegrationTestError
|
12
|
+
end
|
11
13
|
|
12
14
|
# Allow concurrent loading to prevent this thread from blocking class
|
13
15
|
# loading in controllers called by the Node server.
|
@@ -20,7 +22,8 @@ module Quilt
|
|
20
22
|
|
21
23
|
def call_proxy(headers, data)
|
22
24
|
if defined? ShopifySecurityBase
|
23
|
-
ShopifySecurityBase::HTTPHostRestriction.
|
25
|
+
allowlist = ShopifySecurityBase::HTTPHostRestriction.respond_to?(:allowlist) ? :allowlist : :whitelist
|
26
|
+
ShopifySecurityBase::HTTPHostRestriction.send(allowlist, [Quilt.configuration.react_server_host]) do
|
24
27
|
proxy(headers, data)
|
25
28
|
end
|
26
29
|
else
|
data/lib/quilt_rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quilt_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathew Allen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
160
|
+
rubygems_version: 3.2.17
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: A turn-key solution for integrating server-rendered React into your Rails
|