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

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: 27b529fbf329a6849b5c834fcfcf12599d5edc059cca2f0d56bb3269a480fb60
4
- data.tar.gz: 7d7386041b2ddb41ddf440804637f69cb18cdd6250f8d0cc0ac30c3174c7a79d
3
+ metadata.gz: fe33e1c7343129ca87db28879c833bbd459a6e3d6b7de6c5266be51adcf9f165
4
+ data.tar.gz: d905ab92f8109b63f18490dccda7729e05658ed01935dad5fc9c0faf24b522dd
5
5
  SHA512:
6
- metadata.gz: 59dd253f7547786da13424a4696310b64d1d05fe03a3acaa6592c0b0bdecb91d8dd05a0ac44a021c84a9fca687888236cbbb84ed28058fbf87452c8d29748cd5
7
- data.tar.gz: 181c82159899d0f4b2ce659f0d49e86c45e79c5340d9141dba7c135f8b3ea191d8b10a2261f8117e12fd2a554a71fd8116a5e62a06ecb36e9f9b1e56bdfe1d23
6
+ metadata.gz: 80bfda2818c9bb8b78dca530c3e71c4870c948515a8838fe59fabbb243f68f3d85d6370101881458f44fd3973681b29b5ed6ad17d9e329a954de14d75907837e
7
+ data.tar.gz: 260e8b9c5e17db1bb0b664e696f9a7b6427676b94e4618485c453ad5a5e84e7c609501da7a6575dff60b6d35d7243afaf2af0b52f0f0784a3b71df5f5bce4245
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: x86_64-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