quilt_rails 3.2.1 → 3.3.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: e887915bb7068b86352c99c8f53b38a69bcc313c8859a058ceac543ef1ea1d79
4
- data.tar.gz: 8aa15f78b167b1513094d40b4714b7539164880cb7514884ce3ab40c03288325
3
+ metadata.gz: 368430de6c7c02cfc1a3c569997ca045cbd08afe6a463143740adf0c3d8c3989
4
+ data.tar.gz: c0e39d8dd544865e466ea919fe3414c722411c0d0f91757a82abac333fb17f2a
5
5
  SHA512:
6
- metadata.gz: 1138e0a191bd3412a5bfb735efdb2a45e24549660a5085922e8495427ebe5246baf5b5d2e216446975efd5cee9f77c25c4d79b35edbde462383495f70e709ea5
7
- data.tar.gz: 9d52ae742f44161da2486543e335d83a46c8ae70a21778e9a809d4b62ce029687c2571379ae9cc2f4adc87758135e5bdb448cddcf41b14ca2446b1bc7b25f059
6
+ metadata.gz: 65fec4f054fd578870567e4528ebd6b5e335877db8096d6af27775869a2fd7ecce8547ed6f0104c6e542cc58bb00ed98a2148a915198d4512f5eb769f2d023f8
7
+ data.tar.gz: c17031bff1b39d21b771e062dbdc5745e78b937a21989b444ca46d68cee1d6ead8b7b00e8b2c0131b6f0d656fa8fed962a37241e3c244f05716e7a19b4eb1c36
@@ -3,6 +3,11 @@
3
3
  module Quilt
4
4
  class UiController < ApplicationController
5
5
  include Quilt::ReactRenderable
6
+ layout(false)
7
+
8
+ rescue_from(Quilt::ReactRenderable::ReactServerNoResponseError) do
9
+ render(:react_render_error, status: :internal_server_error)
10
+ end
6
11
 
7
12
  def index
8
13
  render_react
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>React Render Error</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta http-equiv="refresh" content="3;URL='/'" />
7
+ <link rel="stylesheet" href="https://unpkg.com/@shopify/polaris@5.1.0/dist/styles.css" />
8
+ </head>
9
+ <body>
10
+ <div>
11
+ <div>
12
+ <h1>Waiting for React Sever to boot up.</h1>
13
+ <p>This page will refresh automatically.</p>
14
+ </div>
15
+ <p>
16
+ If this error persists, ensure <code>@shopify/react-server</code>
17
+ is running on <code>http://localhost:8081</code>.
18
+ </p>
19
+ </div>
20
+ </body>
21
+ </html>
@@ -3,5 +3,11 @@
3
3
  module Quilt
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Quilt
6
+
7
+ initializer(:mount_quilt, before: :add_builtin_route) do |app|
8
+ app.routes.append do
9
+ mount(Quilt::Engine, at: '/') unless has_named_route?(:quilt)
10
+ end
11
+ end
6
12
  end
7
13
  end
@@ -3,7 +3,7 @@
3
3
  module Quilt
4
4
  module Logger
5
5
  def self.log(string)
6
- if defined? Rails && Rails.logger.nil?
6
+ if Rails.logger.nil?
7
7
  puts string
8
8
  else
9
9
  Rails.logger.info(string)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Quilt
3
- VERSION = "3.2.1"
3
+ VERSION = "3.3.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: 3.2.1
4
+ version: 3.3.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: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -92,6 +92,7 @@ files:
92
92
  - Rakefile
93
93
  - app/controllers/quilt/performance_report_controller.rb
94
94
  - app/controllers/quilt/ui_controller.rb
95
+ - app/views/quilt/ui/react_render_error.html
95
96
  - config/routes.rb
96
97
  - lib/generators/quilt/USAGE
97
98
  - lib/generators/quilt/install_generator.rb