proscenium 0.19.0.beta5-x86_64-darwin → 0.19.0.beta6-x86_64-darwin
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2063f3f3085ec3854871bdc091d818c221dbf0c80ec0f0cd648803bb74c34023
|
4
|
+
data.tar.gz: 1f4ccbba306aab6b5b44fe2680b1b841efbe9f6820eb0b50ffa317a7b55037f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5665dc3b8926dc1f45561d05d4b51b57ca199648d003a6399d993ea9a23b604621b395397a9390cc6333eeb12ba8f87575d6ed6b450bfb8b1bff439479e896e5
|
7
|
+
data.tar.gz: 6a3021de6eaed178d111972923b5d4e982334869e325e89d846c3db115ef8fed9cd16703172bb35466834ae854d6536402051d84a17f9feab2fb47a921f49ea7
|
@@ -88,6 +88,11 @@ module Proscenium
|
|
88
88
|
response.cache! Proscenium.config.cache_max_age
|
89
89
|
end
|
90
90
|
|
91
|
+
cache_proc = Proscenium.config.cache_middleware_response
|
92
|
+
if cache_proc.is_a?(Proc) && cache_proc.call(path_to_build)
|
93
|
+
response.cache! Proscenium.config.cache_max_age
|
94
|
+
end
|
95
|
+
|
91
96
|
yield response if block_given?
|
92
97
|
|
93
98
|
response.finish
|
data/lib/proscenium/railtie.rb
CHANGED
@@ -24,6 +24,13 @@ module Proscenium
|
|
24
24
|
config.proscenium.cache_query_string = Rails.env.production? && ENV.fetch('REVISION', nil)
|
25
25
|
config.proscenium.cache_max_age = 2_592_000 # 30 days
|
26
26
|
|
27
|
+
# A proc that will be given the path to build, and should return a boolean indicating whether to
|
28
|
+
# cache the response.
|
29
|
+
#
|
30
|
+
# Example:
|
31
|
+
# cache_middleware_response = ->(path) { path.start_with?('node_modules/') }
|
32
|
+
config.proscenium.cache_middleware_response = nil
|
33
|
+
|
27
34
|
# List of environment variable names that should be passed to the builder, which will then be
|
28
35
|
# passed to esbuild's `Define` option. Being explicit about which environment variables are
|
29
36
|
# defined means a faster build, as esbuild will have less to do.
|
@@ -68,8 +75,8 @@ module Proscenium
|
|
68
75
|
|
69
76
|
initializer 'proscenium.middleware' do |app|
|
70
77
|
app.middleware.insert_after ActionDispatch::Static, Proscenium::Middleware
|
71
|
-
app.middleware.insert_after ActionDispatch::Static, Rack::ETag, 'no-cache'
|
72
|
-
app.middleware.insert_after ActionDispatch::Static, Rack::ConditionalGet
|
78
|
+
# app.middleware.insert_after ActionDispatch::Static, Rack::ETag, 'no-cache'
|
79
|
+
# app.middleware.insert_after ActionDispatch::Static, Rack::ConditionalGet
|
73
80
|
end
|
74
81
|
|
75
82
|
initializer 'proscenium.sideloading' do
|
data/lib/proscenium/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proscenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.0.
|
4
|
+
version: 0.19.0.beta6
|
5
5
|
platform: x86_64-darwin
|
6
6
|
authors:
|
7
7
|
- Joel Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|