recourse 4.6.2 → 4.6.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/recourse/engine.rb +12 -4
- data/lib/recourse/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b23a36a0239e776095075477f86da4bfbdd412fac5afc0bdbcf31efd9f5f227
|
|
4
|
+
data.tar.gz: b7f76555603ddec515cdebd2c15e90852f6c9c836447c87715538151b3be0adf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 381e938adcd70bd902a381ccd73967683dbd443a3e253aacab608e7ddd1eabdad779a4252885257e9bb9f0f7511b3d631ea54e042d7b676a15eb1459be412182
|
|
7
|
+
data.tar.gz: 0b7b0f1b3516dccee6b54cae0214baa8bacc6d0f1046065d7160783e6dc132011054633126ac5cd5c7a0c5641c32e28d354c4a3184767e9b312afe40f1319adb
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
For more information about changelogs, check [Keep a Changelog](http://keepachangelog.com) and
|
|
6
6
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
7
7
|
|
|
8
|
+
## 4.6.3 - 2026-09-08
|
|
9
|
+
|
|
10
|
+
* [Fix] The gem's scripts and stylesheets are revalidated on every full load, so a browser runs the version the host deployed rather than the one it fetched hours ago
|
|
11
|
+
|
|
8
12
|
## 4.6.2 - 2026-09-08
|
|
9
13
|
|
|
10
14
|
* [Fix] A filter menu on a page under a record no longer counts each option: the counts were of the whole table, not of the record's share of it
|
data/lib/recourse/engine.rb
CHANGED
|
@@ -14,6 +14,12 @@ module Recourse
|
|
|
14
14
|
# `start_with?`, so dropping the slash would swallow `/recourses` itself.
|
|
15
15
|
STATIC_URLS = %w[/recourse/].freeze
|
|
16
16
|
|
|
17
|
+
# Every file is asked for again on every full load, and answered `304 Not Modified`
|
|
18
|
+
# while it stands. The URL of a file never changes between versions of the gem, so
|
|
19
|
+
# a browser told to keep one for hours ran the previous version's script — with the
|
|
20
|
+
# tooltip a release had just taken away — until the hours were up.
|
|
21
|
+
STATIC_HEADERS = [[:all, { 'cache-control' => 'no-cache' }]].freeze
|
|
22
|
+
|
|
17
23
|
# Initializers all run before routes are drawn, so `recourses` exists in time.
|
|
18
24
|
initializer 'recourse.routes' do
|
|
19
25
|
ActionDispatch::Routing::Mapper.include Scopes, Routes
|
|
@@ -34,15 +40,17 @@ module Recourse
|
|
|
34
40
|
# to find, since a page here cannot do without it.
|
|
35
41
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
36
42
|
urls: { '/recourse/turbo.min.js' => 'turbo.min.js' },
|
|
37
|
-
root: Turbo::Engine.root.join('app/assets/javascripts').to_s
|
|
43
|
+
root: Turbo::Engine.root.join('app/assets/javascripts').to_s,
|
|
44
|
+
header_rules: STATIC_HEADERS
|
|
38
45
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
39
46
|
urls: STATIC_URLS, root: Engine.root.join('vendor'),
|
|
40
|
-
cascade: true
|
|
47
|
+
header_rules: STATIC_HEADERS, cascade: true
|
|
41
48
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
42
49
|
urls: STATIC_URLS, root: Engine.root.join('app/javascript'),
|
|
43
|
-
cascade: true
|
|
50
|
+
header_rules: STATIC_HEADERS, cascade: true
|
|
44
51
|
app.middleware.insert_before Rails::Rack::Logger, Rack::Static,
|
|
45
|
-
urls: STATIC_URLS, root: Engine.root.join('app/stylesheets')
|
|
52
|
+
urls: STATIC_URLS, root: Engine.root.join('app/stylesheets'),
|
|
53
|
+
header_rules: STATIC_HEADERS
|
|
46
54
|
end
|
|
47
55
|
end
|
|
48
56
|
end
|
data/lib/recourse/version.rb
CHANGED