quilt_rails 1.4.1 → 1.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 +3 -3
- data/lib/quilt_rails/react_renderable.rb +8 -0
- data/lib/quilt_rails/version.rb +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: 9c16733d68449d4f24bbb9e007537b1c679dc18c801823afded7e2d13ff7ad06
|
4
|
+
data.tar.gz: aea20cc2f46de9c08a4a3b3bf1332e3e31ec21cf2dcb1029812c6c30f3254860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24a89f2f889b0cc3334746bb6362a973a76a1b03ca81472e52ee1da425161a2cff51b6a6d6bded69e4d6663d438299d79fa5f80da40c8a51e4d71b9493a1515b
|
7
|
+
data.tar.gz: 945937d84d52991a2a382ac6b93e45f14e81b5bc98f02123b44077f2eb7239f30528eb1ffd69c187edd6e34bd001e0e7e9c1df0020e23b256567c1d50f935448
|
data/README.md
CHANGED
@@ -103,7 +103,7 @@ Have your routes wired up to default to your react controller.
|
|
103
103
|
```tsx
|
104
104
|
// app/ui/index.tsx
|
105
105
|
|
106
|
-
import
|
106
|
+
import React from 'react';
|
107
107
|
import {AppProvider, Page, Card} from '@shopify/polaris';
|
108
108
|
|
109
109
|
function App() {
|
@@ -140,7 +140,7 @@ React-server sets up [@shopify/react-network](https://github.com/Shopify/quilt/b
|
|
140
140
|
```tsx
|
141
141
|
// app/ui/index.tsx
|
142
142
|
|
143
|
-
import
|
143
|
+
import React from 'react';
|
144
144
|
import {AppProvider, Page, Card} from '@shopify/polaris';
|
145
145
|
import {useRequestHeader} from '@shopify/react-network';
|
146
146
|
|
@@ -166,7 +166,7 @@ export default App;
|
|
166
166
|
```tsx
|
167
167
|
// app/ui/index.tsx
|
168
168
|
|
169
|
-
import
|
169
|
+
import React from 'react';
|
170
170
|
import {AppProvider, Page, Card} from '@shopify/polaris';
|
171
171
|
import {useRedirect} from '@shopify/react-network';
|
172
172
|
|
@@ -7,6 +7,8 @@ module Quilt
|
|
7
7
|
include ReverseProxy::Controller
|
8
8
|
|
9
9
|
def render_react
|
10
|
+
raise DoNotIntegrationTestError if Rails.env.test?
|
11
|
+
|
10
12
|
if defined? ShopifySecurityBase
|
11
13
|
ShopifySecurityBase::HTTPHostRestriction.whitelist([Quilt.configuration.react_server_host]) do
|
12
14
|
proxy
|
@@ -39,5 +41,11 @@ module Quilt
|
|
39
41
|
super "Errno::ECONNREFUSED: Waiting for React server to boot up. If this error presists verify that @shopify/react-server is configured on #{url}"
|
40
42
|
end
|
41
43
|
end
|
44
|
+
|
45
|
+
class DoNotIntegrationTestError < StandardError
|
46
|
+
def initialize
|
47
|
+
super "Do not try to use Rails integration tests on your quilt_rails app. Instead use Jest and @shopify/react-testing to test your React application directly."
|
48
|
+
end
|
49
|
+
end
|
42
50
|
end
|
43
51
|
end
|
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: 1.
|
4
|
+
version: 1.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: 2019-
|
11
|
+
date: 2019-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|