proscenium 0.19.0.beta5-aarch64-linux → 0.19.0.beta6-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7705cc1706aef4c4229d5eaac5bcf14f9dac7e3f1acf31b603cc0cfdbc5f0f1d
4
- data.tar.gz: 5796d86bb6b4f80514e42a0f1648ce81c25aaa3ad022db3357c30ea41ad435f9
3
+ metadata.gz: 6825d664ab67ba9a74bdfda8eef2bac5d3d37f09257a287be16915db4cb5b5eb
4
+ data.tar.gz: 84cabda91856611ca3d400334f77528bd03590c659df372976abf8a70d65699f
5
5
  SHA512:
6
- metadata.gz: b261c10f3c1251a0d07a52824cb1697757cb41e67f4f0fdf5981f659ba19fb7b07337a68a72e1be3a586cb932e11f6b094189905f5d512e17116dfb73112a7eb
7
- data.tar.gz: db956075000fc8e3bdb978201908c59a322f562d6e20ce32e6f99bff2fff1df060f7dee1d9d5888f24fab10881e6425df7e0b53bf9672902edea3f19ed7e06b6
6
+ metadata.gz: 7a3c24abafa585ecf589db7a6fdcfa88e6be2fd19390e9abf4d2e36297969929b99c606a067d1163b25f4af1e43025b0e4c999d2f34e9edb4c2d67bbc6b32cac
7
+ data.tar.gz: 8d88b244f18f4862e7e80eb30bee602c10f648ea3631fc6bdfbb3b742af7975c7f899b65ab4e5df12029c754a1d33172791c94e7bd87618086cb0145d62fb064
Binary file
@@ -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: aarch64-linux
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