proscenium 0.19.0.beta5-arm64-darwin → 0.19.0.beta6-arm64-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: a1c4ffc52b555dc5ae84ce2369341331b4e048c07f91db5b9e8c8aad79b2f2fe
4
- data.tar.gz: 822bb09b0be3fc5e879f9e81cac37b7f33a87d6b33c4b9da9ce894fd2cf6c4fe
3
+ metadata.gz: f3c6d979009796ee291585c2e5c229c6ad894b7861ed0e6771b2376dee0b29be
4
+ data.tar.gz: be6f8c87c387225c306142e09bb517a47e4b31d0a70e4973c3710d1ca6a8c0d2
5
5
  SHA512:
6
- metadata.gz: d89b2fb2c06d8c46a9a7c4f3a092d8b673aba7e72da62f7bf6236806719bc8a6049cadcd5b969bca5d2be66b750f2a8b779d07f25e0ba21b7ec9719ae6a7f0b4
7
- data.tar.gz: e3907818028b6290703e582d4a7dd1d8e1e2331aaec2c3ceec281e29501772ca131ac337aead463616580af518b2a16bf6017bf35928fbd93916a9555daa9025
6
+ metadata.gz: d12060a40b22e1353cff66cf276c9caf4963153e4b315530a4bc768a72188299bef188b0c0ff9a706ded739fe407a7014a96a42ba00bfe0297492ea2262406ba
7
+ data.tar.gz: b4ef71bae7c0f66dfeb3873b3fe8c3d544a70bad29cd76d591a32aa6e6d2aecad81222a6f61c2e889b79226c2c761aaac3ff50540c17dd8b089af9bb6d6fffed
@@ -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
@@ -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
@@ -84,7 +84,7 @@ module Proscenium::UI
84
84
  def label(**kwargs, &block)
85
85
  content = attributes.delete(:label)
86
86
 
87
- super(**kwargs) do
87
+ super do
88
88
  captured = capture do
89
89
  div do
90
90
  span { content || translate_label } if content != false
@@ -115,7 +115,7 @@ module Proscenium::UI::Form::Fields
115
115
  return value
116
116
  end
117
117
 
118
- options.filter { |k, _v| value.include?(k) }.values
118
+ options.slice(*value).values
119
119
  end
120
120
 
121
121
  def options
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.19.0.beta5'
4
+ VERSION = '0.19.0.beta6'
5
5
  end
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.beta5
4
+ version: 0.19.0.beta6
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport