trek 2.6.0 → 2.7.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/AGENTS.md +12 -11
- data/CHANGELOG.md +51 -0
- data/Gemfile.lock +124 -126
- data/Makefile +7 -1
- data/README.md +17 -21
- data/app/components/trek/form/content_editor_component/content_editor_component.css +4 -8
- data/app/components/trek/form/image_field_component/image_field_component.js +1 -2
- data/app/components/trek/form/password_strength_component/password_strength_component.css +2 -0
- data/app/components/trek/form/sound_field_component/sound_field_component.js +1 -2
- data/app/components/trek/security_check_component/security_check_component.css +69 -0
- data/app/components/trek/security_check_component/security_check_component.html.slim +19 -0
- data/app/components/trek/security_check_component/security_check_component.js +15 -0
- data/app/components/trek/security_check_component.rb +19 -0
- data/app/content/trek/content/cleaner.rb +1 -1
- data/app/content/trek/content/list_item.rb +1 -1
- data/app/content/trek/content/paragraph.rb +7 -2
- data/app/controllers/concerns/trek/auditable.rb +5 -2
- data/app/controllers/concerns/trek/localization.rb +6 -2
- data/app/jobs/trek/purge_expired_sign_in_codes_job.rb +15 -0
- data/app/policies/trek/security_check_policy.rb +8 -0
- data/app/uploaders/image_uploader.rb +77 -15
- data/config/locales/trek.en.yml +71 -0
- data/config/locales/trek.fr.yml +71 -0
- data/docs/.vitepress/config.mjs +1 -0
- data/docs/background-jobs.md +10 -5
- data/docs/deploy.md +69 -6
- data/docs/getting-started.md +15 -17
- data/docs/index.md +1 -1
- data/docs/personal-data.md +61 -0
- data/docs/proxies.md +2 -2
- data/docs/reference/components.md +2 -2
- data/docs/reference/concerns/fragmentable.md +12 -6
- data/docs/reference/concerns/orderable.md +2 -2
- data/docs/reference/concerns/search-engine-optimizable.md +1 -1
- data/docs/reference/concerns/searchable.md +14 -1
- data/docs/reference/concerns/sectionable.md +7 -3
- data/docs/reference/concerns/versionable.md +1 -1
- data/docs/reference/controllers.md +33 -1
- data/docs/reference/environment-variables.md +2 -2
- data/docs/reference/formatters.md +2 -1
- data/docs/reference/forms.md +6 -3
- data/docs/reference/generators/admin-user.md +1 -1
- data/docs/reference/generators/audit-log.md +12 -13
- data/docs/reference/generators/install.md +20 -9
- data/docs/reference/generators/public-accounts.md +21 -3
- data/docs/reference/generators/scaffold.md +28 -9
- data/docs/reference/generators/security-headers.md +4 -3
- data/docs/reference/generators/taxonomies.md +1 -1
- data/docs/reference/icons.md +5 -3
- data/docs/reference/index.md +10 -8
- data/docs/reference/models/current.md +5 -3
- data/docs/reference/models/page-version.md +1 -1
- data/docs/reference/models/user.md +5 -8
- data/docs/reference/uploaders.md +25 -0
- data/docs/reference/validators.md +1 -1
- data/docs/security.md +30 -9
- data/docs/what-is-trek.md +3 -3
- data/lib/generators/trek/USAGE +1 -1
- data/lib/generators/trek/audit_log_generator.rb +8 -0
- data/lib/generators/trek/helpers.rb +17 -0
- data/lib/generators/trek/install/admin/routes_generator.rb +2 -1
- data/lib/generators/trek/install/admin/security_check_generator.rb +36 -0
- data/lib/generators/trek/install/ci_generator.rb +19 -0
- data/lib/generators/trek/install/postcss_generator.rb +1 -2
- data/lib/generators/trek/install/translations_generator.rb +1 -2
- data/lib/generators/trek/install_generator.rb +8 -7
- data/lib/generators/trek/public_accounts_generator.rb +34 -7
- data/lib/generators/trek/scaffold_generator.rb +22 -21
- data/lib/generators/trek/scalingo_generator.rb +13 -1
- data/lib/generators/trek/templates/.gitlab-ci.yml +10 -1
- data/lib/generators/trek/templates/AGENTS.md +2 -2
- data/lib/generators/trek/templates/Makefile +1 -0
- data/lib/generators/trek/templates/config/i18n-tasks.yml.erb +0 -8
- data/lib/generators/trek/templates/controllers/admin/security_checks_controller.rb +11 -0
- data/lib/generators/trek/templates/controllers/concerns/trek/authentication.rb +13 -4
- data/lib/generators/trek/templates/initializers/good_job.rb.tt +7 -5
- data/lib/generators/trek/templates/layouts/admin.html.slim +5 -0
- data/lib/generators/trek/templates/policies/security_check.rb +4 -0
- data/lib/generators/trek/templates/public_accounts/api/controllers/sessions_controller.rb.tt +13 -1
- data/lib/generators/trek/templates/public_accounts/api/controllers/sign_in_codes_controller.rb.tt +5 -0
- data/lib/generators/trek/templates/public_accounts/jobs/sign_in_code_job.rb.tt +10 -0
- data/lib/generators/trek/templates/public_accounts/locales/accounts.en.yml.tt +10 -0
- data/lib/generators/trek/templates/public_accounts/locales/accounts.fr.yml.tt +10 -0
- data/lib/generators/trek/templates/public_accounts/models/account.rb.tt +16 -2
- data/lib/generators/trek/templates/public_accounts/spec/api/sign_ins_spec.rb.tt +30 -0
- data/lib/generators/trek/templates/public_accounts/spec/models/account/sign_in_code_spec.rb.tt +10 -0
- data/lib/generators/trek/templates/public_accounts/spec/models/account_spec.rb.tt +21 -1
- data/lib/generators/trek/templates/public_accounts/spec/web/sign_ins_spec.rb.tt +22 -0
- data/lib/generators/trek/templates/public_accounts/web/authentication.rb.tt +1 -1
- data/lib/generators/trek/templates/public_accounts/web/controllers/sessions_controller.rb.tt +8 -1
- data/lib/generators/trek/templates/public_accounts/web/controllers/sign_in_codes_controller.rb.tt +5 -0
- data/lib/generators/trek/templates/public_accounts/web/views/password_resets/edit.html.slim.tt +4 -1
- data/lib/generators/trek/templates/public_accounts/web/views/passwords/edit.html.slim.tt +4 -1
- data/lib/generators/trek/templates/public_accounts/web/views/registrations/new.html.slim.tt +3 -1
- data/lib/generators/trek/templates/public_accounts/web/views/sessions/new.html.slim.tt +3 -1
- data/lib/generators/trek/templates/spec/requests/admin/pages_spec.rb +11 -0
- data/lib/generators/trek/templates/spec/requests/admin/security_checks_spec.rb +24 -0
- data/lib/generators/trek/templates/spec/requests/admin/sign_in_notices_spec.rb +33 -0
- data/lib/generators/trek/templates/views/admin/pages/_form.html.slim +1 -1
- data/lib/generators/trek/templates/views/admin/security_checks/show.html.slim +9 -0
- data/lib/generators/trek/templates/views/admin/user_password_resets/edit.html.slim +6 -1
- data/lib/generators/trek/templates/views/admin/user_sessions/new.html.slim +4 -1
- data/lib/tasks/trek/attachments.rake +12 -0
- data/lib/tasks/trek/security.rake +10 -0
- data/lib/trek/disposable_email_domains.rb +9 -20
- data/lib/trek/engine.rb +5 -0
- data/lib/trek/json_compatibility.rb +20 -0
- data/lib/trek/security_check.rb +241 -0
- data/lib/trek/stored_image_metadata.rb +88 -0
- data/lib/trek/version.rb +1 -1
- data/lib/trek.rb +2 -1
- data/package.json +5 -6
- data/postcss.config.js +0 -3
- data/trek.gemspec +5 -6
- data/yarn.lock +983 -1042
- metadata +33 -31
data/Gemfile.lock
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
trek (2.
|
|
4
|
+
trek (2.7.0)
|
|
5
5
|
action_policy (~> 0.6)
|
|
6
6
|
actioncable
|
|
7
7
|
acts_as_list (~> 1.1)
|
|
8
8
|
aws-sdk-s3 (~> 1.117)
|
|
9
9
|
blurhash (~> 0.1)
|
|
10
10
|
closure_tree (~> 9.0)
|
|
11
|
-
deepl-rb (~> 3.0)
|
|
12
11
|
dry-initializer (~> 3.1)
|
|
13
12
|
email_validator (~> 2.2)
|
|
14
13
|
fastimage (~> 2.2)
|
|
15
14
|
http_accept_language (~> 2.1)
|
|
16
15
|
i18n-tasks (~> 1.0)
|
|
17
16
|
image_processing (~> 1.8)
|
|
18
|
-
json (< 3)
|
|
19
17
|
kaminari
|
|
20
18
|
listen
|
|
21
19
|
lookbook (>= 2.3.13)
|
|
22
20
|
mobility (~> 1.3.2)
|
|
23
21
|
phonelib (~> 0.8)
|
|
24
22
|
postmark-rails
|
|
23
|
+
prism (< 2)
|
|
25
24
|
prosemirror (>= 1.0, < 2)
|
|
26
25
|
rails (>= 8.0, < 8.2)
|
|
27
26
|
rails-healthcheck
|
|
@@ -32,7 +31,7 @@ PATH
|
|
|
32
31
|
strip_attributes (~> 2.0)
|
|
33
32
|
time_for_a_boolean (~> 0.3)
|
|
34
33
|
turbo-rails (>= 1.0)
|
|
35
|
-
valid_email2 (~> 7.
|
|
34
|
+
valid_email2 (~> 7.2)
|
|
36
35
|
view_component (< 5.0)
|
|
37
36
|
view_component-form (~> 0.3)
|
|
38
37
|
webauthn (~> 3.4)
|
|
@@ -41,33 +40,33 @@ PATH
|
|
|
41
40
|
GEM
|
|
42
41
|
remote: https://rubygems.org/
|
|
43
42
|
specs:
|
|
44
|
-
action_policy (0.7.
|
|
43
|
+
action_policy (0.7.8)
|
|
45
44
|
ruby-next-core (>= 1.0)
|
|
46
45
|
action_text-trix (2.1.19)
|
|
47
46
|
railties
|
|
48
|
-
actioncable (8.1.4)
|
|
49
|
-
actionpack (= 8.1.4)
|
|
50
|
-
activesupport (= 8.1.4)
|
|
47
|
+
actioncable (8.1.4.1)
|
|
48
|
+
actionpack (= 8.1.4.1)
|
|
49
|
+
activesupport (= 8.1.4.1)
|
|
51
50
|
nio4r (~> 2.0)
|
|
52
51
|
websocket-driver (>= 0.6.1)
|
|
53
52
|
zeitwerk (~> 2.6)
|
|
54
|
-
actionmailbox (8.1.4)
|
|
55
|
-
actionpack (= 8.1.4)
|
|
56
|
-
activejob (= 8.1.4)
|
|
57
|
-
activerecord (= 8.1.4)
|
|
58
|
-
activestorage (= 8.1.4)
|
|
59
|
-
activesupport (= 8.1.4)
|
|
53
|
+
actionmailbox (8.1.4.1)
|
|
54
|
+
actionpack (= 8.1.4.1)
|
|
55
|
+
activejob (= 8.1.4.1)
|
|
56
|
+
activerecord (= 8.1.4.1)
|
|
57
|
+
activestorage (= 8.1.4.1)
|
|
58
|
+
activesupport (= 8.1.4.1)
|
|
60
59
|
mail (>= 2.8.0)
|
|
61
|
-
actionmailer (8.1.4)
|
|
62
|
-
actionpack (= 8.1.4)
|
|
63
|
-
actionview (= 8.1.4)
|
|
64
|
-
activejob (= 8.1.4)
|
|
65
|
-
activesupport (= 8.1.4)
|
|
60
|
+
actionmailer (8.1.4.1)
|
|
61
|
+
actionpack (= 8.1.4.1)
|
|
62
|
+
actionview (= 8.1.4.1)
|
|
63
|
+
activejob (= 8.1.4.1)
|
|
64
|
+
activesupport (= 8.1.4.1)
|
|
66
65
|
mail (>= 2.8.0)
|
|
67
66
|
rails-dom-testing (~> 2.2)
|
|
68
|
-
actionpack (8.1.4)
|
|
69
|
-
actionview (= 8.1.4)
|
|
70
|
-
activesupport (= 8.1.4)
|
|
67
|
+
actionpack (8.1.4.1)
|
|
68
|
+
actionview (= 8.1.4.1)
|
|
69
|
+
activesupport (= 8.1.4.1)
|
|
71
70
|
nokogiri (>= 1.8.5)
|
|
72
71
|
rack (>= 2.2.4)
|
|
73
72
|
rack-session (>= 1.0.1)
|
|
@@ -75,36 +74,36 @@ GEM
|
|
|
75
74
|
rails-dom-testing (~> 2.2)
|
|
76
75
|
rails-html-sanitizer (~> 1.6)
|
|
77
76
|
useragent (~> 0.16)
|
|
78
|
-
actiontext (8.1.4)
|
|
77
|
+
actiontext (8.1.4.1)
|
|
79
78
|
action_text-trix (~> 2.1.15)
|
|
80
|
-
actionpack (= 8.1.4)
|
|
81
|
-
activerecord (= 8.1.4)
|
|
82
|
-
activestorage (= 8.1.4)
|
|
83
|
-
activesupport (= 8.1.4)
|
|
79
|
+
actionpack (= 8.1.4.1)
|
|
80
|
+
activerecord (= 8.1.4.1)
|
|
81
|
+
activestorage (= 8.1.4.1)
|
|
82
|
+
activesupport (= 8.1.4.1)
|
|
84
83
|
globalid (>= 0.6.0)
|
|
85
84
|
nokogiri (>= 1.8.5)
|
|
86
|
-
actionview (8.1.4)
|
|
87
|
-
activesupport (= 8.1.4)
|
|
85
|
+
actionview (8.1.4.1)
|
|
86
|
+
activesupport (= 8.1.4.1)
|
|
88
87
|
builder (~> 3.1)
|
|
89
88
|
erubi (~> 1.11)
|
|
90
89
|
rails-dom-testing (~> 2.2)
|
|
91
|
-
rails-html-sanitizer (~> 1.6)
|
|
92
|
-
activejob (8.1.4)
|
|
93
|
-
activesupport (= 8.1.4)
|
|
90
|
+
rails-html-sanitizer (~> 1.6, >= 1.7.2)
|
|
91
|
+
activejob (8.1.4.1)
|
|
92
|
+
activesupport (= 8.1.4.1)
|
|
94
93
|
globalid (>= 0.3.6)
|
|
95
|
-
activemodel (8.1.4)
|
|
96
|
-
activesupport (= 8.1.4)
|
|
97
|
-
activerecord (8.1.4)
|
|
98
|
-
activemodel (= 8.1.4)
|
|
99
|
-
activesupport (= 8.1.4)
|
|
94
|
+
activemodel (8.1.4.1)
|
|
95
|
+
activesupport (= 8.1.4.1)
|
|
96
|
+
activerecord (8.1.4.1)
|
|
97
|
+
activemodel (= 8.1.4.1)
|
|
98
|
+
activesupport (= 8.1.4.1)
|
|
100
99
|
timeout (>= 0.4.0)
|
|
101
|
-
activestorage (8.1.4)
|
|
102
|
-
actionpack (= 8.1.4)
|
|
103
|
-
activejob (= 8.1.4)
|
|
104
|
-
activerecord (= 8.1.4)
|
|
105
|
-
activesupport (= 8.1.4)
|
|
100
|
+
activestorage (8.1.4.1)
|
|
101
|
+
actionpack (= 8.1.4.1)
|
|
102
|
+
activejob (= 8.1.4.1)
|
|
103
|
+
activerecord (= 8.1.4.1)
|
|
104
|
+
activesupport (= 8.1.4.1)
|
|
106
105
|
marcel (~> 1.0)
|
|
107
|
-
activesupport (8.1.4)
|
|
106
|
+
activesupport (8.1.4.1)
|
|
108
107
|
base64
|
|
109
108
|
bigdecimal
|
|
110
109
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -120,14 +119,14 @@ GEM
|
|
|
120
119
|
acts_as_list (1.2.6)
|
|
121
120
|
activerecord (>= 6.1)
|
|
122
121
|
activesupport (>= 6.1)
|
|
123
|
-
addressable (2.9.
|
|
122
|
+
addressable (2.9.2)
|
|
124
123
|
public_suffix (>= 2.0.2, < 8.0)
|
|
125
124
|
android_key_attestation (0.3.0)
|
|
126
125
|
ast (2.4.3)
|
|
127
|
-
aws-eventstream (1.4.
|
|
128
|
-
aws-partitions (1.
|
|
129
|
-
aws-sdk-core (3.
|
|
130
|
-
aws-eventstream (~> 1, >= 1.
|
|
126
|
+
aws-eventstream (1.4.1)
|
|
127
|
+
aws-partitions (1.1305.0)
|
|
128
|
+
aws-sdk-core (3.268.0)
|
|
129
|
+
aws-eventstream (~> 1, >= 1.4.1)
|
|
131
130
|
aws-partitions (~> 1, >= 1.992.0)
|
|
132
131
|
aws-sigv4 (~> 1.9)
|
|
133
132
|
base64
|
|
@@ -135,11 +134,11 @@ GEM
|
|
|
135
134
|
jmespath (~> 1, >= 1.6.1)
|
|
136
135
|
logger
|
|
137
136
|
rexml (~> 3.4, >= 3.4.2)
|
|
138
|
-
aws-sdk-kms (1.
|
|
139
|
-
aws-sdk-core (~> 3, >= 3.
|
|
137
|
+
aws-sdk-kms (1.143.0)
|
|
138
|
+
aws-sdk-core (~> 3, >= 3.268.0)
|
|
140
139
|
aws-sigv4 (~> 1.5)
|
|
141
|
-
aws-sdk-s3 (1.
|
|
142
|
-
aws-sdk-core (~> 3, >= 3.
|
|
140
|
+
aws-sdk-s3 (1.242.0)
|
|
141
|
+
aws-sdk-core (~> 3, >= 3.268.0)
|
|
143
142
|
aws-sdk-kms (~> 1)
|
|
144
143
|
aws-sigv4 (~> 1.5)
|
|
145
144
|
aws-sigv4 (1.12.1)
|
|
@@ -164,7 +163,7 @@ GEM
|
|
|
164
163
|
rack-test (>= 0.6.3)
|
|
165
164
|
regexp_parser (>= 1.5, < 3.0)
|
|
166
165
|
xpath (~> 3.2)
|
|
167
|
-
cbor (0.
|
|
166
|
+
cbor (0.6.2.2)
|
|
168
167
|
closure_tree (9.8.0)
|
|
169
168
|
activerecord (>= 7.2.0)
|
|
170
169
|
with_advisory_lock (>= 7.6.0)
|
|
@@ -172,22 +171,21 @@ GEM
|
|
|
172
171
|
concurrent-ruby (1.3.8)
|
|
173
172
|
connection_pool (3.0.2)
|
|
174
173
|
content_disposition (1.0.0)
|
|
175
|
-
cose (1.
|
|
176
|
-
cbor (~> 0.
|
|
174
|
+
cose (1.4.0)
|
|
175
|
+
cbor (~> 0.6.2.2)
|
|
177
176
|
openssl-signature_algorithm (~> 1.0)
|
|
178
177
|
crass (1.0.8)
|
|
179
|
-
css_parser (3.
|
|
178
|
+
css_parser (3.4.0)
|
|
180
179
|
addressable
|
|
181
180
|
base64
|
|
182
181
|
ssrf_filter (~> 1.5)
|
|
183
|
-
cuprite (0.
|
|
182
|
+
cuprite (0.20.1)
|
|
184
183
|
capybara (~> 3.0)
|
|
185
|
-
ferrum (~> 0.
|
|
184
|
+
ferrum (~> 0.20.1)
|
|
186
185
|
date (3.6.0)
|
|
187
|
-
deepl-rb (3.9.0)
|
|
188
186
|
diff-lcs (1.6.2)
|
|
189
187
|
docile (1.4.1)
|
|
190
|
-
down (5.6.
|
|
188
|
+
down (5.6.2)
|
|
191
189
|
addressable (~> 2.8)
|
|
192
190
|
base64 (~> 0.3)
|
|
193
191
|
drb (2.2.3)
|
|
@@ -224,8 +222,8 @@ GEM
|
|
|
224
222
|
activemodel
|
|
225
223
|
erb (6.0.7)
|
|
226
224
|
erubi (1.13.1)
|
|
227
|
-
fastimage (2.4.
|
|
228
|
-
ferrum (0.
|
|
225
|
+
fastimage (2.4.3)
|
|
226
|
+
ferrum (0.20.1)
|
|
229
227
|
addressable (~> 2.5)
|
|
230
228
|
base64 (~> 0.2)
|
|
231
229
|
concurrent-ruby (~> 1.1)
|
|
@@ -242,14 +240,14 @@ GEM
|
|
|
242
240
|
http_accept_language (2.1.1)
|
|
243
241
|
i18n (1.15.2)
|
|
244
242
|
concurrent-ruby (~> 1.0)
|
|
245
|
-
i18n-tasks (1.1
|
|
243
|
+
i18n-tasks (1.2.1)
|
|
246
244
|
activesupport (>= 4.0.2)
|
|
247
245
|
ast (>= 2.1.0)
|
|
248
246
|
erubi
|
|
249
247
|
highline (>= 3.0.0)
|
|
250
248
|
i18n
|
|
251
249
|
parser (>= 3.2.2.1)
|
|
252
|
-
prism
|
|
250
|
+
prism (>= 0.28)
|
|
253
251
|
rails-i18n
|
|
254
252
|
rainbow (>= 2.2.2, < 4.0)
|
|
255
253
|
ruby-progressbar (~> 1.8, >= 1.8.1)
|
|
@@ -257,28 +255,28 @@ GEM
|
|
|
257
255
|
image_processing (1.14.0)
|
|
258
256
|
mini_magick (>= 4.9.5, < 6)
|
|
259
257
|
ruby-vips (>= 2.0.17, < 3)
|
|
260
|
-
io-console (0.9.
|
|
261
|
-
irb (1.
|
|
258
|
+
io-console (0.9.5)
|
|
259
|
+
irb (1.19.0)
|
|
262
260
|
pp (>= 0.6.0)
|
|
263
261
|
prism (>= 1.3.0)
|
|
264
262
|
rdoc (>= 4.0.0)
|
|
265
263
|
reline (>= 0.4.2)
|
|
266
264
|
jmespath (1.6.2)
|
|
267
|
-
json (
|
|
265
|
+
json (3.1.0)
|
|
268
266
|
jwt (3.3.0)
|
|
269
267
|
base64
|
|
270
|
-
kaminari (1.3.
|
|
268
|
+
kaminari (1.3.3)
|
|
271
269
|
activesupport (>= 4.1.0)
|
|
272
|
-
kaminari-actionview (= 1.3.
|
|
273
|
-
kaminari-activerecord (= 1.3.
|
|
274
|
-
kaminari-core (= 1.3.
|
|
275
|
-
kaminari-actionview (1.3.
|
|
270
|
+
kaminari-actionview (= 1.3.3)
|
|
271
|
+
kaminari-activerecord (= 1.3.3)
|
|
272
|
+
kaminari-core (= 1.3.3)
|
|
273
|
+
kaminari-actionview (1.3.3)
|
|
276
274
|
actionview
|
|
277
|
-
kaminari-core (= 1.3.
|
|
278
|
-
kaminari-activerecord (1.3.
|
|
275
|
+
kaminari-core (= 1.3.3)
|
|
276
|
+
kaminari-activerecord (1.3.3)
|
|
279
277
|
activerecord
|
|
280
|
-
kaminari-core (= 1.3.
|
|
281
|
-
kaminari-core (1.3.
|
|
278
|
+
kaminari-core (= 1.3.3)
|
|
279
|
+
kaminari-core (1.3.3)
|
|
282
280
|
language_server-protocol (3.17.0.6)
|
|
283
281
|
lint_roller (1.1.0)
|
|
284
282
|
listen (3.10.1)
|
|
@@ -288,9 +286,9 @@ GEM
|
|
|
288
286
|
literal (1.9.0)
|
|
289
287
|
zeitwerk
|
|
290
288
|
logger (1.7.0)
|
|
291
|
-
loofah (2.25.
|
|
289
|
+
loofah (2.25.3)
|
|
292
290
|
crass (~> 1.0.2)
|
|
293
|
-
nokogiri (>= 1.
|
|
291
|
+
nokogiri (>= 1.19.5)
|
|
294
292
|
lookbook (2.3.15)
|
|
295
293
|
activemodel
|
|
296
294
|
css_parser
|
|
@@ -314,9 +312,9 @@ GEM
|
|
|
314
312
|
mini_magick (5.4.0)
|
|
315
313
|
logger
|
|
316
314
|
mini_mime (1.1.5)
|
|
317
|
-
minitest (6.0
|
|
315
|
+
minitest (6.1.0)
|
|
318
316
|
drb (~> 2.0)
|
|
319
|
-
prism (
|
|
317
|
+
prism (>= 1.5, < 3)
|
|
320
318
|
mobility (1.3.2)
|
|
321
319
|
i18n (>= 0.6.10, < 2)
|
|
322
320
|
request_store (~> 1.0)
|
|
@@ -330,18 +328,18 @@ GEM
|
|
|
330
328
|
net-smtp (0.5.2)
|
|
331
329
|
net-protocol
|
|
332
330
|
nio4r (2.7.5)
|
|
333
|
-
nokogiri (1.19.
|
|
331
|
+
nokogiri (1.19.7-arm64-darwin)
|
|
334
332
|
racc (~> 1.4)
|
|
335
|
-
nokogiri (1.19.
|
|
333
|
+
nokogiri (1.19.7-x86_64-darwin)
|
|
336
334
|
racc (~> 1.4)
|
|
337
|
-
nokogiri (1.19.
|
|
335
|
+
nokogiri (1.19.7-x86_64-linux-gnu)
|
|
338
336
|
racc (~> 1.4)
|
|
339
337
|
oaken (1.0.0)
|
|
340
338
|
openssl (4.0.2)
|
|
341
339
|
openssl-signature_algorithm (1.3.0)
|
|
342
340
|
openssl (> 2.0)
|
|
343
341
|
parallel (2.3.0)
|
|
344
|
-
parser (3.3.
|
|
342
|
+
parser (3.3.13.0)
|
|
345
343
|
ast (~> 2.4.1)
|
|
346
344
|
racc
|
|
347
345
|
pg (1.7.0-arm64-darwin)
|
|
@@ -350,7 +348,7 @@ GEM
|
|
|
350
348
|
phlex (2.4.1)
|
|
351
349
|
refract (~> 1.0)
|
|
352
350
|
zeitwerk (~> 2.7)
|
|
353
|
-
phonelib (0.
|
|
351
|
+
phonelib (0.11.0)
|
|
354
352
|
postmark (1.25.1)
|
|
355
353
|
json
|
|
356
354
|
postmark-rails (0.22.1)
|
|
@@ -365,31 +363,31 @@ GEM
|
|
|
365
363
|
phlex (~> 2.4)
|
|
366
364
|
zeitwerk (~> 2.6)
|
|
367
365
|
public_suffix (7.0.5)
|
|
368
|
-
puma (8.
|
|
366
|
+
puma (8.1.1)
|
|
369
367
|
nio4r (~> 2.0)
|
|
370
368
|
racc (1.8.1)
|
|
371
|
-
rack (3.2.
|
|
369
|
+
rack (3.2.8)
|
|
372
370
|
rack-session (2.1.2)
|
|
373
371
|
base64 (>= 0.1.0)
|
|
374
372
|
rack (>= 3.0.0)
|
|
375
|
-
rack-test (2.
|
|
373
|
+
rack-test (2.3.0)
|
|
376
374
|
rack (>= 1.3)
|
|
377
375
|
rackup (2.3.1)
|
|
378
376
|
rack (>= 3)
|
|
379
|
-
rails (8.1.4)
|
|
380
|
-
actioncable (= 8.1.4)
|
|
381
|
-
actionmailbox (= 8.1.4)
|
|
382
|
-
actionmailer (= 8.1.4)
|
|
383
|
-
actionpack (= 8.1.4)
|
|
384
|
-
actiontext (= 8.1.4)
|
|
385
|
-
actionview (= 8.1.4)
|
|
386
|
-
activejob (= 8.1.4)
|
|
387
|
-
activemodel (= 8.1.4)
|
|
388
|
-
activerecord (= 8.1.4)
|
|
389
|
-
activestorage (= 8.1.4)
|
|
390
|
-
activesupport (= 8.1.4)
|
|
377
|
+
rails (8.1.4.1)
|
|
378
|
+
actioncable (= 8.1.4.1)
|
|
379
|
+
actionmailbox (= 8.1.4.1)
|
|
380
|
+
actionmailer (= 8.1.4.1)
|
|
381
|
+
actionpack (= 8.1.4.1)
|
|
382
|
+
actiontext (= 8.1.4.1)
|
|
383
|
+
actionview (= 8.1.4.1)
|
|
384
|
+
activejob (= 8.1.4.1)
|
|
385
|
+
activemodel (= 8.1.4.1)
|
|
386
|
+
activerecord (= 8.1.4.1)
|
|
387
|
+
activestorage (= 8.1.4.1)
|
|
388
|
+
activesupport (= 8.1.4.1)
|
|
391
389
|
bundler (>= 1.15.0)
|
|
392
|
-
railties (= 8.1.4)
|
|
390
|
+
railties (= 8.1.4.1)
|
|
393
391
|
rails-dom-testing (2.3.0)
|
|
394
392
|
activesupport (>= 5.0.0)
|
|
395
393
|
minitest
|
|
@@ -397,15 +395,15 @@ GEM
|
|
|
397
395
|
rails-healthcheck (1.4.0)
|
|
398
396
|
actionpack
|
|
399
397
|
railties
|
|
400
|
-
rails-html-sanitizer (1.7.
|
|
401
|
-
loofah (~> 2.25, >= 2.25.
|
|
398
|
+
rails-html-sanitizer (1.7.2)
|
|
399
|
+
loofah (~> 2.25, >= 2.25.3)
|
|
402
400
|
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
403
401
|
rails-i18n (8.1.0)
|
|
404
402
|
i18n (>= 0.7, < 2)
|
|
405
403
|
railties (>= 8.0.0, < 9)
|
|
406
|
-
railties (8.1.4)
|
|
407
|
-
actionpack (= 8.1.4)
|
|
408
|
-
activesupport (= 8.1.4)
|
|
404
|
+
railties (8.1.4.1)
|
|
405
|
+
actionpack (= 8.1.4.1)
|
|
406
|
+
activesupport (= 8.1.4.1)
|
|
409
407
|
irb (~> 1.13)
|
|
410
408
|
rackup (>= 1.0.0)
|
|
411
409
|
rake (>= 12.2)
|
|
@@ -448,18 +446,18 @@ GEM
|
|
|
448
446
|
rspec-core (~> 3.13.0)
|
|
449
447
|
rspec-expectations (~> 3.13.0)
|
|
450
448
|
rspec-mocks (~> 3.13.0)
|
|
451
|
-
rspec-core (3.13.
|
|
449
|
+
rspec-core (3.13.7)
|
|
452
450
|
rspec-support (~> 3.13.0)
|
|
453
|
-
rspec-expectations (3.13.
|
|
451
|
+
rspec-expectations (3.13.6)
|
|
454
452
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
455
453
|
rspec-support (~> 3.13.0)
|
|
456
454
|
rspec-html-matchers (0.10.0)
|
|
457
455
|
nokogiri (~> 1)
|
|
458
456
|
rspec (>= 3.0.0.a)
|
|
459
|
-
rspec-mocks (3.13.
|
|
457
|
+
rspec-mocks (3.13.9)
|
|
460
458
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
461
459
|
rspec-support (~> 3.13.0)
|
|
462
|
-
rspec-rails (8.0
|
|
460
|
+
rspec-rails (8.1.0)
|
|
463
461
|
actionpack (>= 7.2)
|
|
464
462
|
activesupport (>= 7.2)
|
|
465
463
|
railties (>= 7.2)
|
|
@@ -467,10 +465,10 @@ GEM
|
|
|
467
465
|
rspec-expectations (>= 3.13.0, < 5.0.0)
|
|
468
466
|
rspec-mocks (>= 3.13.0, < 5.0.0)
|
|
469
467
|
rspec-support (>= 3.13.0, < 5.0.0)
|
|
470
|
-
rspec-support (3.13.
|
|
471
|
-
rspec_junit_formatter (0.
|
|
472
|
-
rspec-core (>=
|
|
473
|
-
rubocop (1.92.
|
|
468
|
+
rspec-support (3.13.8)
|
|
469
|
+
rspec_junit_formatter (0.8.0)
|
|
470
|
+
rspec-core (>= 3.13, < 4)
|
|
471
|
+
rubocop (1.92.2)
|
|
474
472
|
json (>= 2.3)
|
|
475
473
|
language_server-protocol (~> 3.17.0.2)
|
|
476
474
|
lint_roller (~> 1.1.0)
|
|
@@ -481,9 +479,9 @@ GEM
|
|
|
481
479
|
rubocop-ast (>= 1.49.0, < 2.0)
|
|
482
480
|
ruby-progressbar (~> 1.7)
|
|
483
481
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
484
|
-
rubocop-ast (1.
|
|
482
|
+
rubocop-ast (1.51.0)
|
|
485
483
|
parser (>= 3.3.7.2)
|
|
486
|
-
prism (
|
|
484
|
+
prism (>= 1.7)
|
|
487
485
|
rubocop-minitest (0.41.0)
|
|
488
486
|
lint_roller (~> 1.1)
|
|
489
487
|
rubocop (>= 1.89.0, < 2.0)
|
|
@@ -568,23 +566,23 @@ GEM
|
|
|
568
566
|
unicode-emoji (4.3.0)
|
|
569
567
|
uri (1.1.2)
|
|
570
568
|
useragent (0.16.11)
|
|
571
|
-
valid_email2 (7.
|
|
569
|
+
valid_email2 (7.2.0)
|
|
572
570
|
activemodel (>= 6.0)
|
|
573
571
|
mail (~> 2.5)
|
|
574
|
-
view_component (4.
|
|
572
|
+
view_component (4.24.0)
|
|
575
573
|
actionview (>= 7.1.0)
|
|
576
574
|
activesupport (>= 7.1.0)
|
|
577
|
-
|
|
578
|
-
view_component-form (0.
|
|
579
|
-
actionview (>=
|
|
580
|
-
activesupport (>=
|
|
581
|
-
view_component (>=
|
|
575
|
+
prism (>= 1.0)
|
|
576
|
+
view_component-form (0.4.0)
|
|
577
|
+
actionview (>= 8.1.0)
|
|
578
|
+
activesupport (>= 8.1.0)
|
|
579
|
+
view_component (>= 4.0.0, < 5.0)
|
|
582
580
|
zeitwerk (~> 2.5)
|
|
583
|
-
webauthn (3.
|
|
581
|
+
webauthn (3.5.1)
|
|
584
582
|
android_key_attestation (~> 0.3.0)
|
|
585
583
|
bindata (~> 2.4)
|
|
586
|
-
cbor (~> 0.
|
|
587
|
-
cose (~> 1.
|
|
584
|
+
cbor (~> 0.6.2.2)
|
|
585
|
+
cose (~> 1.4)
|
|
588
586
|
openssl (>= 2.2)
|
|
589
587
|
safety_net_attestation (~> 0.5.0)
|
|
590
588
|
tpm-key_attestation (~> 0.14.0)
|
data/Makefile
CHANGED
|
@@ -25,7 +25,7 @@ lint-i18n:
|
|
|
25
25
|
bundle exec i18n-tasks missing -t diff
|
|
26
26
|
|
|
27
27
|
# One target per tool, as for lint
|
|
28
|
-
security: security-brakeman security-bundler-audit
|
|
28
|
+
security: security-brakeman security-bundler-audit security-npm-audit
|
|
29
29
|
|
|
30
30
|
security-brakeman:
|
|
31
31
|
bundle exec brakeman --no-exit-on-error
|
|
@@ -33,6 +33,12 @@ security-brakeman:
|
|
|
33
33
|
security-bundler-audit:
|
|
34
34
|
bundle exec bundle-audit check --update
|
|
35
35
|
|
|
36
|
+
# Advisories and deprecations, whatever their severity as bundler-audit, on the npm packages host apps
|
|
37
|
+
# bundle (`dependencies`, with their own), not on the tooling (`devDependencies`). Skipped ones are
|
|
38
|
+
# listed in .yarnrc.yml.
|
|
39
|
+
security-npm-audit:
|
|
40
|
+
yarn npm audit --recursive --environment production
|
|
41
|
+
|
|
36
42
|
fix:
|
|
37
43
|
bundle exec rubocop --autocorrect
|
|
38
44
|
yarn eslint "app/**/*.js" --fix
|
data/README.md
CHANGED
|
@@ -29,10 +29,10 @@ You don't have to set them up yourself, but you can customize their configuratio
|
|
|
29
29
|
|
|
30
30
|
### Prerequisites
|
|
31
31
|
|
|
32
|
-
Make sure your default Rails version is
|
|
32
|
+
Make sure your default Rails version is 8.0+
|
|
33
33
|
|
|
34
34
|
$ rails -v
|
|
35
|
-
Rails 8.1.
|
|
35
|
+
Rails 8.1.4
|
|
36
36
|
|
|
37
37
|
If not, run `gem install rails` to upgrade.
|
|
38
38
|
|
|
@@ -41,11 +41,16 @@ Make sure your default Yarn version is 4.x
|
|
|
41
41
|
$ yarn -v
|
|
42
42
|
4.17.0
|
|
43
43
|
|
|
44
|
-
If not,
|
|
44
|
+
If not, install it with corepack (Node 25 and later no longer ship it, hence the first command):
|
|
45
45
|
|
|
46
|
+
npm install --global corepack
|
|
46
47
|
corepack enable
|
|
47
48
|
corepack install --global yarn@4
|
|
48
49
|
|
|
50
|
+
Or, if you manage your tools with [mise](https://mise.jdx.dev):
|
|
51
|
+
|
|
52
|
+
mise use --global yarn@4
|
|
53
|
+
|
|
49
54
|
Create your Rails project (replace `helloworld` with your own project name):
|
|
50
55
|
|
|
51
56
|
export TREK_PROJECT_NAME=helloworld
|
|
@@ -71,7 +76,7 @@ Now you're ready to install Trek. This will:
|
|
|
71
76
|
|
|
72
77
|
Run:
|
|
73
78
|
|
|
74
|
-
rails g trek:install
|
|
79
|
+
bin/rails g trek:install
|
|
75
80
|
|
|
76
81
|
#### Configure Postmark
|
|
77
82
|
|
|
@@ -85,16 +90,6 @@ You can also do it manually after running the installer by running:
|
|
|
85
90
|
|
|
86
91
|
EDITOR="code --wait" bin/rails credentials:edit
|
|
87
92
|
|
|
88
|
-
#### Configure Deepl
|
|
89
|
-
|
|
90
|
-
DeepL can be use to translate locale files automatically when running the scaffold generator.
|
|
91
|
-
|
|
92
|
-
To use this feature, specify your DeepL credentials by defining the following ENV variables, prior to running the installer:
|
|
93
|
-
|
|
94
|
-
export DEEPL_AUTH_KEY=YOUR_TOKEN
|
|
95
|
-
|
|
96
|
-
If the ENV variable is not found, translations won't happen automatically and you will have to manually edit each locale file (except English).
|
|
97
|
-
|
|
98
93
|
## Usage
|
|
99
94
|
|
|
100
95
|
### Customize branding
|
|
@@ -124,7 +119,7 @@ en:
|
|
|
124
119
|
|
|
125
120
|
Customize the credentials with `ADMIN_EMAIL` and `ADMIN_PASSWORD` ENV variables in `.env`
|
|
126
121
|
|
|
127
|
-
rails g trek:admin:user
|
|
122
|
+
bin/rails g trek:admin:user
|
|
128
123
|
|
|
129
124
|
## Development
|
|
130
125
|
|
|
@@ -192,9 +187,10 @@ The docs, based on [VitePress](https://vitepress.dev), are embedded in the `/doc
|
|
|
192
187
|
|
|
193
188
|
This will:
|
|
194
189
|
|
|
195
|
-
1.
|
|
196
|
-
2.
|
|
197
|
-
3.
|
|
198
|
-
4.
|
|
199
|
-
5.
|
|
200
|
-
6.
|
|
190
|
+
1. Check that you're signed in to npm (`npm whoami`), and stop otherwise: run `npm login` first, as a maintainer of the `trek` package
|
|
191
|
+
2. Prompt for the new version number (showing the current version)
|
|
192
|
+
3. Update the version in `lib/trek/version.rb` and `package.json`, and stamp the CHANGELOG's `[Unreleased]` section with it and the date
|
|
193
|
+
4. Run `bundle` to update the lockfile
|
|
194
|
+
5. Commit all changes with message "Version X.Y.Z"
|
|
195
|
+
6. Prompt for a RubyGems OTP code (leave it empty if MFA is off), then run `bundle exec rake release` (creates git tag, pushes commits/tag, pushes gem to [rubygems.org](https://rubygems.org))
|
|
196
|
+
7. Prompt for an npm OTP code, then run `npm publish` (publishes the [npm package](https://www.npmjs.com/package/trek) to npmjs.com)
|
|
@@ -147,19 +147,15 @@
|
|
|
147
147
|
width: 2rem;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
/* app/assets/icons/trek/arrow-bar-left.svg and arrow-bar-right.svg, inlined: a host app builds this
|
|
151
|
+
file from its own directory, where a plugin loading Trek's icons wouldn't find them */
|
|
153
152
|
.content-image[data-size="larger"]::before {
|
|
154
|
-
content: svg-
|
|
153
|
+
content: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E %3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E %3Cline x1='4' y1='12' x2='14' y2='12'/%3E %3Cline x1='4' y1='12' x2='8' y2='16'/%3E %3Cline x1='4' y1='12' x2='8' y2='8'/%3E %3Cline x1='20' y1='4' x2='20' y2='20'/%3E %3C/svg%3E");
|
|
155
154
|
margin-right: 1rem;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
@svg-load arrow-bar-right url("trek/arrow-bar-right.svg") {
|
|
159
|
-
}
|
|
160
|
-
|
|
161
157
|
.content-image[data-size="larger"]::after {
|
|
162
|
-
content: svg-
|
|
158
|
+
content: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke-width='2' stroke='currentColor' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E %3Cpath stroke='none' d='M0 0h24v24H0z' fill='none'/%3E %3Cline x1='20' y1='12' x2='10' y2='12'/%3E %3Cline x1='20' y1='12' x2='16' y2='16'/%3E %3Cline x1='20' y1='12' x2='16' y2='8'/%3E %3Cline x1='4' y1='4' x2='4' y2='20'/%3E %3C/svg%3E");
|
|
163
159
|
margin-left: 1rem;
|
|
164
160
|
}
|
|
165
161
|
|
|
@@ -5,7 +5,6 @@ import Uppy from "@uppy/core";
|
|
|
5
5
|
import ThumbnailGenerator from "@uppy/thumbnail-generator";
|
|
6
6
|
import XHRUpload from "@uppy/xhr-upload";
|
|
7
7
|
import French from "@uppy/locales/lib/fr_FR";
|
|
8
|
-
import "@uppy/core/dist/style.css";
|
|
9
8
|
|
|
10
9
|
export class Controller extends BaseController {
|
|
11
10
|
static targets = [
|
|
@@ -69,7 +68,7 @@ export class Controller extends BaseController {
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
disconnect() {
|
|
72
|
-
this.uppy.
|
|
71
|
+
this.uppy.destroy();
|
|
73
72
|
this.uppy = null;
|
|
74
73
|
}
|
|
75
74
|
|
|
@@ -23,9 +23,11 @@
|
|
|
23
23
|
transition: background-color 0.15s ease-out;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/* Room for the longest label, and its line before one is typed: the field doesn't move when it appears */
|
|
26
27
|
.label {
|
|
27
28
|
color: var(--slate-11);
|
|
28
29
|
font-size: 0.8em;
|
|
30
|
+
min-height: 1lh;
|
|
29
31
|
min-width: 8ch;
|
|
30
32
|
text-align: right;
|
|
31
33
|
}
|
|
@@ -5,7 +5,6 @@ import Uppy from "@uppy/core";
|
|
|
5
5
|
import ThumbnailGenerator from "@uppy/thumbnail-generator";
|
|
6
6
|
import XHRUpload from "@uppy/xhr-upload";
|
|
7
7
|
import French from "@uppy/locales/lib/fr_FR";
|
|
8
|
-
import "@uppy/core/dist/style.css";
|
|
9
8
|
|
|
10
9
|
export class Controller extends BaseController {
|
|
11
10
|
static targets = ["fileInput", "hiddenInput"];
|
|
@@ -48,7 +47,7 @@ export class Controller extends BaseController {
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
disconnect() {
|
|
51
|
-
this.uppy.
|
|
50
|
+
this.uppy.destroy();
|
|
52
51
|
this.uppy = null;
|
|
53
52
|
}
|
|
54
53
|
|