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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a11682ec07a267a79a700100c417432c8268dffcd6a99db8aa42cb00981b246c
4
- data.tar.gz: 855173ce5c38e34bcd2f505e24737ff7cd3670bc2d0df98b38fa07ff7a566b9e
3
+ metadata.gz: 1b23a36a0239e776095075477f86da4bfbdd412fac5afc0bdbcf31efd9f5f227
4
+ data.tar.gz: b7f76555603ddec515cdebd2c15e90852f6c9c836447c87715538151b3be0adf
5
5
  SHA512:
6
- metadata.gz: aa84eac5f4c6b850d5c1d205b3d7391ae4645a3797b1c59c36141e5125d53fde629dde0c65401071269a0f1038d4b2e8764cf9f70ff74ca7eb66a3473762baeb
7
- data.tar.gz: b0ca8815ff3f8cdae21319c888818b6c70806cea7dd51e7da4df4e35a5d1805e55c7a7dd0ae0df29094438197aa9a483c7006197f346a97054d919062fc0ef83
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
@@ -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
@@ -1,4 +1,4 @@
1
1
  module Recourse
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '4.6.2'
3
+ VERSION = '4.6.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recourse
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.2
4
+ version: 4.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob