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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30c0bb97264a063694f11ea9b30ee06bf742e1471a5fe7fdbdcf18bcabe31706
4
- data.tar.gz: ca1c6069fd225db57c7841fc702ecb2a84167d5095665c321f2b3a7bd29d1b12
3
+ metadata.gz: 9c16733d68449d4f24bbb9e007537b1c679dc18c801823afded7e2d13ff7ad06
4
+ data.tar.gz: aea20cc2f46de9c08a4a3b3bf1332e3e31ec21cf2dcb1029812c6c30f3254860
5
5
  SHA512:
6
- metadata.gz: a6c6030b7c21bfb472200481c3ee4b627d04209d3c5488cd64dd8fa3039a6de722365955063d545aa8d0ea38786e00150d5ff439a7b457369df3ef79162ae39b
7
- data.tar.gz: a14282cb5e80077da8a32e7e01557265794de9824bc0ebd91932b9d40d34a1ca50c7f94bef9755c2050fcac2cd716a9ea7461be74c3034b5374ca53c9aca2e06
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 * as React from 'react';
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 * as React from 'react';
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 * as React from 'react';
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Quilt
3
- VERSION = "1.4.1"
3
+ VERSION = "1.5.0"
4
4
  end
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.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-08-22 00:00:00.000000000 Z
11
+ date: 2019-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties