track_relay 1.3.0 → 1.4.0
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 +12 -0
- data/lib/tasks/track_relay.rake +1 -1
- data/lib/track_relay/configuration.rb +3 -1
- data/lib/track_relay/manifest.rb +9 -0
- data/lib/track_relay/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: d7fca8b3efc2716f3ba667aecdadd66bf58f2cbbd18a76f28dd04784a521ffdf
|
|
4
|
+
data.tar.gz: 01103c51038bf8fbefd95e63b513223ea93407e6583f4925ed3756805209a670
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a36d9e2d83ea2215798bc5ed963b0e618aa29436c83ad6e0d72ee0f46472435300fcfe0ae4fb9eecc29e491c25ca258e5f7cc6b85110f17f959cd6e9af3c4cc1
|
|
7
|
+
data.tar.gz: 0b855b5604793c877501ee2892a1f0d374384b257391b27f5cc1f453f8064a885acb5b874b5df8de97340dab64deb4ac808c625d749ed3961f8d213db8afc68d
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.4.0] - 2026-07-31
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `config.manifest_path` — hosts can relocate the generated event-schema
|
|
14
|
+
manifest outside the public web root (the on-disk catalog discloses
|
|
15
|
+
internal event names/params when served world-readable). Defaults to
|
|
16
|
+
`nil`, preserving the existing `public/track_relay_catalog.json`
|
|
17
|
+
behavior. The `track_relay:manifest` rake task, the development
|
|
18
|
+
catalog hot-reload regeneration, and the `assets:precompile` chaining
|
|
19
|
+
all honor it, since every default-path write flows through
|
|
20
|
+
`TrackRelay::Manifest.write!`.
|
|
21
|
+
|
|
10
22
|
## [1.3.0] - 2026-07-31
|
|
11
23
|
|
|
12
24
|
### Added
|
data/lib/tasks/track_relay.rake
CHANGED
|
@@ -64,7 +64,7 @@ namespace :track_relay do
|
|
|
64
64
|
exit(clean ? 0 : 1)
|
|
65
65
|
end
|
|
66
66
|
|
|
67
|
-
desc "Generate public/track_relay_catalog.json
|
|
67
|
+
desc "Generate the catalog manifest (config.manifest_path, default public/track_relay_catalog.json)"
|
|
68
68
|
task manifest: :environment do
|
|
69
69
|
# Footgun guard (RISK-04): an empty manifest tells the JS client
|
|
70
70
|
# "no schema, accept everything" — silently. Abort loudly so the
|
|
@@ -87,7 +87,8 @@ module TrackRelay
|
|
|
87
87
|
:ga4_enrich_page_context,
|
|
88
88
|
:track_gate,
|
|
89
89
|
:signed_client_token_secret,
|
|
90
|
-
:signed_client_token_ttl
|
|
90
|
+
:signed_client_token_ttl,
|
|
91
|
+
:manifest_path
|
|
91
92
|
|
|
92
93
|
# @return [Array] registered subscriber instances, in insertion order
|
|
93
94
|
attr_reader :subscribers
|
|
@@ -116,6 +117,7 @@ module TrackRelay
|
|
|
116
117
|
@track_gate = nil
|
|
117
118
|
@signed_client_token_secret = nil
|
|
118
119
|
@signed_client_token_ttl = 30.days
|
|
120
|
+
@manifest_path = nil
|
|
119
121
|
end
|
|
120
122
|
|
|
121
123
|
# Append a subscriber to the registry.
|
data/lib/track_relay/manifest.rb
CHANGED
|
@@ -74,6 +74,15 @@ module TrackRelay
|
|
|
74
74
|
private
|
|
75
75
|
|
|
76
76
|
def default_path
|
|
77
|
+
# `config.manifest_path` lets hosts keep the event schema out of
|
|
78
|
+
# the public web root; the rake task, dev reload, and
|
|
79
|
+
# assets:precompile chaining all resolve through here. The
|
|
80
|
+
# respond_to? guard keeps this file loadable standalone (the
|
|
81
|
+
# rake file require_relative's it without the umbrella require).
|
|
82
|
+
if TrackRelay.respond_to?(:config) && (configured = TrackRelay.config.manifest_path)
|
|
83
|
+
return configured
|
|
84
|
+
end
|
|
85
|
+
|
|
77
86
|
unless defined?(Rails) && Rails.respond_to?(:root) && Rails.root
|
|
78
87
|
raise ArgumentError,
|
|
79
88
|
"TrackRelay::Manifest.write! requires a `path:` argument when Rails.root is unavailable"
|
data/lib/track_relay/version.rb
CHANGED