quilt_rails 3.5.0 → 3.5.5

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: 1aedbb7a0485b28dcddfb679cdec0197d8da16e2934b61d435a47ece1402f025
4
- data.tar.gz: 49124ea67fcf5ed1aaa0ed3c76b6b56332aab8b2ed6e54033e36708ca4ec9f62
3
+ metadata.gz: 592c0b080cb38e2f3441388b089c9de398f1ac6d9a8374fcc0e07497d3105311
4
+ data.tar.gz: f24e29204dbd946dd4c97182f7e61888e769790097295443f8c8f1bcb8ba46e0
5
5
  SHA512:
6
- metadata.gz: '082b47b61be965938a4b882fe92e459b5651abadc753ef737840de1f62b18b011fbe8fd87b26c1168674ee33291dc1831806ffad3ab0145497a8db6ce66abe7e'
7
- data.tar.gz: f9a2d1195fec698f192b091fac540a408e8e05721c3322f936c221da5b319a2a849955a6546b11ff13f48aebfe5299757c14c190ef309d8f3824ae0c91e496a3
6
+ metadata.gz: fae414a9e0d56917e5bbe809e21eda522215a182bb144f8849c1cdf27eb6c7b1514e400e8b51e30ee6de798ac296e29e083b964dd94068f0e6908b8c7f938d01
7
+ data.tar.gz: 9de5aa59ffee287534e46e13c430d4400e78e70953fd363cd60fb7d9b8069e2b4c8ca33f5ccfdb811b98859a5058c60cc6d1f8f19a48a025d3d97a90f351c365
@@ -5,12 +5,15 @@ module Quilt
5
5
  include Quilt::Performance::Reportable
6
6
  protect_from_forgery with: :null_session
7
7
 
8
+ MAX_THREADS = 25
9
+
8
10
  def create
9
- process_report
11
+ Thread.new do
12
+ process_report
13
+ rescue # rubocop:disable Lint/SuppressedException
14
+ end if Thread.list.count < MAX_THREADS
10
15
 
11
- render(json: { result: 'success' }, status: 200)
12
- rescue ActionController::ParameterMissing => error
13
- render(json: { error: error.message, status: 422 })
16
+ render(plain: '{"result":"success"}', status: 200)
14
17
  end
15
18
  end
16
19
  end
@@ -40,9 +40,10 @@ module Quilt
40
40
  end
41
41
 
42
42
  begin
43
+ data_json = JSON.generate(data.as_json, ascii_only: true)
43
44
  reverse_proxy(
44
45
  url,
45
- headers: headers.merge('X-Request-ID': request.request_id, 'X-Quilt-Data': data.to_json)
46
+ headers: headers.merge('X-Request-ID': request.request_id, 'X-Quilt-Data': data_json)
46
47
  ) do |callbacks|
47
48
  callbacks.on_response do |status_code, _response|
48
49
  Quilt.logger.info("[ReactRenderable] #{url} returned #{status_code}")
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Quilt
3
- VERSION = "3.5.0"
3
+ VERSION = "3.5.5"
4
4
  end
data/lib/quilt_rails.rb CHANGED
@@ -2,6 +2,8 @@
2
2
  module Quilt
3
3
  end
4
4
 
5
+ require "statsd-instrument"
6
+
5
7
  require "quilt_rails/version"
6
8
  require "quilt_rails/logger"
7
9
  require "quilt_rails/configuration"
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.5.0
4
+ version: 3.5.5
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-06-23 00:00:00.000000000 Z
11
+ date: 2022-01-10 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.2.17
160
+ rubygems_version: 3.2.20
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: A turn-key solution for integrating server-rendered React into your Rails