bullet_train 1.0.71 → 1.0.75
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bt-link +0 -0
- data/app/controllers/concerns/root_redirect.rb +1 -5
- data/app/controllers/turbo_devise_controller.rb +19 -0
- data/app/views/layouts/mailer.html.erb +1 -425
- data/config/initializers/concerns/turbo_failure_app.rb +14 -0
- data/docs/field-partials.md +1 -1
- data/lib/bullet_train/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b293f3471c55d1a0ba3427a46a0e7b94c0115d1fd3da880d55e68acfb2462724
|
4
|
+
data.tar.gz: 22a63347cdaf4805348e26ce9f117c8e7e5955de73dc7a14f47aebc8723dcef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d84de4b0a827f9e6f87f4e4028d81c5267ebcfad34e3393834f6865e7368deafef81778ab42a27da5c39ebd1294e0ee78c06064e8386f55c91e0977df32bd812
|
7
|
+
data.tar.gz: 9694b9b4002a6c33906115f5d098241a6605d3b86dbcb6e30a8a9de7e0a1a78addc518fd48a5e4f3752c83eecc011627c56f585169315df92859b45b28d34b89
|
data/.bt-link
ADDED
File without changes
|
@@ -2,10 +2,6 @@ module RootRedirect
|
|
2
2
|
extend ActiveSupport::Concern
|
3
3
|
|
4
4
|
def index
|
5
|
-
|
6
|
-
redirect_to ENV["MARKETING_SITE_URL"]
|
7
|
-
else
|
8
|
-
redirect_to new_user_session_path
|
9
|
-
end
|
5
|
+
redirect_to ENV["MARKETING_SITE_URL"] || new_user_session_path
|
10
6
|
end
|
11
7
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# NOTE: This is a workaround to get Devise working with Turbo
|
2
|
+
class TurboDeviseController < ApplicationController
|
3
|
+
class Responder < ActionController::Responder
|
4
|
+
def to_turbo_stream
|
5
|
+
controller.render(options.merge(formats: :html))
|
6
|
+
rescue ActionView::MissingTemplate => error
|
7
|
+
if get?
|
8
|
+
raise error
|
9
|
+
elsif has_errors? && default_action
|
10
|
+
render rendering_options.merge(formats: :html, status: :unprocessable_entity)
|
11
|
+
else
|
12
|
+
redirect_to navigation_location
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
self.responder = Responder
|
18
|
+
respond_to :html, :turbo_stream
|
19
|
+
end
|
@@ -1,425 +1 @@
|
|
1
|
-
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
-
<title>Welcome to <%= t('application.name') %>!</title>
|
7
|
-
<% # TODO This is not what we want to do long-term. Would love to see this powered by Tailwind CSS. %>
|
8
|
-
<style type="text/css">
|
9
|
-
*:not(br):not(tr):not(html) {
|
10
|
-
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
11
|
-
box-sizing: border-box;
|
12
|
-
}
|
13
|
-
|
14
|
-
body {
|
15
|
-
width: 100% !important;
|
16
|
-
height: 100%;
|
17
|
-
margin: 0;
|
18
|
-
line-height: 1.4;
|
19
|
-
background-color: #F6F7F8;
|
20
|
-
color: #3E4B5B;
|
21
|
-
font-size: 16px;
|
22
|
-
-webkit-text-size-adjust: none;
|
23
|
-
}
|
24
|
-
|
25
|
-
p,
|
26
|
-
ul,
|
27
|
-
ol,
|
28
|
-
blockquote {
|
29
|
-
line-height: 1.4;
|
30
|
-
text-align: left;
|
31
|
-
}
|
32
|
-
|
33
|
-
a {
|
34
|
-
color: #047BF8;
|
35
|
-
}
|
36
|
-
|
37
|
-
a img {
|
38
|
-
border: none;
|
39
|
-
}
|
40
|
-
/* Layout ------------------------------ */
|
41
|
-
|
42
|
-
.email-wrapper {
|
43
|
-
width: 100%;
|
44
|
-
margin: 0;
|
45
|
-
padding: 0;
|
46
|
-
background-color: #F6F7F8;
|
47
|
-
}
|
48
|
-
|
49
|
-
.email-content {
|
50
|
-
width: 100%;
|
51
|
-
margin: 0;
|
52
|
-
padding: 0;
|
53
|
-
}
|
54
|
-
/* Masthead ----------------------- */
|
55
|
-
|
56
|
-
.email-masthead {
|
57
|
-
padding: 25px 0;
|
58
|
-
text-align: center;
|
59
|
-
}
|
60
|
-
|
61
|
-
.email-masthead_logo {
|
62
|
-
width: 94px;
|
63
|
-
}
|
64
|
-
|
65
|
-
.email-masthead_name {
|
66
|
-
font-size: 16px;
|
67
|
-
/*font-weight: bold;*/
|
68
|
-
color: #bbbfc3;
|
69
|
-
text-decoration: none;
|
70
|
-
/*text-shadow: 0 1px 0 white;*/
|
71
|
-
}
|
72
|
-
/* Body ------------------------------ */
|
73
|
-
|
74
|
-
.email-body {
|
75
|
-
width: 100%;
|
76
|
-
margin: 0;
|
77
|
-
padding: 0;
|
78
|
-
border-top: 1px solid #EDEFF2;
|
79
|
-
border-bottom: 1px solid #EDEFF2;
|
80
|
-
background-color: #FFFFFF;
|
81
|
-
|
82
|
-
}
|
83
|
-
|
84
|
-
.email-body_inner {
|
85
|
-
width: 570px;
|
86
|
-
margin: 0 auto;
|
87
|
-
padding: 0;
|
88
|
-
background-color: #FFFFFF;
|
89
|
-
}
|
90
|
-
|
91
|
-
.email-footer {
|
92
|
-
width: 570px;
|
93
|
-
margin: 0 auto;
|
94
|
-
padding: 0;
|
95
|
-
text-align: center;
|
96
|
-
}
|
97
|
-
|
98
|
-
.email-footer p {
|
99
|
-
color: #AAAAAA;
|
100
|
-
}
|
101
|
-
|
102
|
-
.body-action {
|
103
|
-
width: 100%;
|
104
|
-
margin: 30px auto;
|
105
|
-
padding: 0;
|
106
|
-
text-align: center;
|
107
|
-
}
|
108
|
-
|
109
|
-
.body-sub {
|
110
|
-
margin-top: 25px;
|
111
|
-
padding-top: 25px;
|
112
|
-
border-top: 1px solid #EDEFF2;
|
113
|
-
}
|
114
|
-
|
115
|
-
.content-cell {
|
116
|
-
padding: 35px;
|
117
|
-
}
|
118
|
-
|
119
|
-
.preheader {
|
120
|
-
display: none !important;
|
121
|
-
}
|
122
|
-
/* Attribute list ------------------------------ */
|
123
|
-
|
124
|
-
.attributes {
|
125
|
-
margin: 0 0 21px;
|
126
|
-
}
|
127
|
-
|
128
|
-
.attributes_content {
|
129
|
-
background-color: #EDEFF2;
|
130
|
-
padding: 16px;
|
131
|
-
}
|
132
|
-
|
133
|
-
.attributes_item {
|
134
|
-
padding: 0;
|
135
|
-
}
|
136
|
-
/* Related Items ------------------------------ */
|
137
|
-
|
138
|
-
.related {
|
139
|
-
width: 100%;
|
140
|
-
margin: 0;
|
141
|
-
padding: 25px 0 0 0;
|
142
|
-
}
|
143
|
-
|
144
|
-
.related_item {
|
145
|
-
padding: 10px 0;
|
146
|
-
color: #3E4B5B;
|
147
|
-
font-size: 15px;
|
148
|
-
line-height: 18px;
|
149
|
-
}
|
150
|
-
|
151
|
-
.related_item-title {
|
152
|
-
display: block;
|
153
|
-
margin: .5em 0 0;
|
154
|
-
}
|
155
|
-
|
156
|
-
.related_item-thumb {
|
157
|
-
display: block;
|
158
|
-
padding-bottom: 10px;
|
159
|
-
}
|
160
|
-
|
161
|
-
.related_heading {
|
162
|
-
border-top: 1px solid #EDEFF2;
|
163
|
-
text-align: center;
|
164
|
-
padding: 25px 0 10px;
|
165
|
-
}
|
166
|
-
/* Discount Code ------------------------------ */
|
167
|
-
|
168
|
-
.discount {
|
169
|
-
width: 100%;
|
170
|
-
margin: 0;
|
171
|
-
padding: 24px;
|
172
|
-
background-color: #EDEFF2;
|
173
|
-
border: 2px dashed #9BA2AB;
|
174
|
-
}
|
175
|
-
|
176
|
-
.discount_heading {
|
177
|
-
text-align: center;
|
178
|
-
}
|
179
|
-
|
180
|
-
.discount_body {
|
181
|
-
text-align: center;
|
182
|
-
font-size: 15px;
|
183
|
-
}
|
184
|
-
/* Social Icons ------------------------------ */
|
185
|
-
|
186
|
-
.social {
|
187
|
-
width: auto;
|
188
|
-
}
|
189
|
-
|
190
|
-
.social td {
|
191
|
-
padding: 0;
|
192
|
-
width: auto;
|
193
|
-
}
|
194
|
-
|
195
|
-
.social_icon {
|
196
|
-
height: 20px;
|
197
|
-
margin: 0 8px 10px 8px;
|
198
|
-
padding: 0;
|
199
|
-
}
|
200
|
-
/* Data table ------------------------------ */
|
201
|
-
|
202
|
-
.purchase {
|
203
|
-
width: 100%;
|
204
|
-
margin: 0;
|
205
|
-
padding: 35px 0;
|
206
|
-
}
|
207
|
-
|
208
|
-
.purchase_content {
|
209
|
-
width: 100%;
|
210
|
-
margin: 0;
|
211
|
-
padding: 25px 0 0 0;
|
212
|
-
}
|
213
|
-
|
214
|
-
.purchase_item {
|
215
|
-
padding: 10px 0;
|
216
|
-
color: #3E4B5B;
|
217
|
-
font-size: 15px;
|
218
|
-
line-height: 18px;
|
219
|
-
}
|
220
|
-
|
221
|
-
.purchase_heading {
|
222
|
-
padding-bottom: 8px;
|
223
|
-
border-bottom: 1px solid #EDEFF2;
|
224
|
-
}
|
225
|
-
|
226
|
-
.purchase_heading p {
|
227
|
-
margin: 0;
|
228
|
-
color: #9BA2AB;
|
229
|
-
font-size: 12px;
|
230
|
-
}
|
231
|
-
|
232
|
-
.purchase_footer {
|
233
|
-
padding-top: 15px;
|
234
|
-
border-top: 1px solid #EDEFF2;
|
235
|
-
}
|
236
|
-
|
237
|
-
.purchase_total {
|
238
|
-
margin: 0;
|
239
|
-
text-align: right;
|
240
|
-
/*font-weight: bold;*/
|
241
|
-
color: #3E4B5B;
|
242
|
-
}
|
243
|
-
|
244
|
-
.purchase_total--label {
|
245
|
-
padding: 0 15px 0 0;
|
246
|
-
}
|
247
|
-
/* Utilities ------------------------------ */
|
248
|
-
|
249
|
-
.align-right {
|
250
|
-
text-align: right;
|
251
|
-
}
|
252
|
-
|
253
|
-
.align-left {
|
254
|
-
text-align: left;
|
255
|
-
}
|
256
|
-
|
257
|
-
.align-center {
|
258
|
-
text-align: center;
|
259
|
-
}
|
260
|
-
/*Media Queries ------------------------------ */
|
261
|
-
|
262
|
-
@media only screen and (max-width: 600px) {
|
263
|
-
.email-body_inner,
|
264
|
-
.email-footer {
|
265
|
-
width: 100% !important;
|
266
|
-
}
|
267
|
-
}
|
268
|
-
|
269
|
-
@media only screen and (max-width: 500px) {
|
270
|
-
.button {
|
271
|
-
width: 100% !important;
|
272
|
-
}
|
273
|
-
}
|
274
|
-
/* Buttons ------------------------------ */
|
275
|
-
|
276
|
-
.button {
|
277
|
-
background-color: #047BF8;
|
278
|
-
border-top: 10px solid #047BF8;
|
279
|
-
border-right: 18px solid #047BF8;
|
280
|
-
border-bottom: 10px solid #047BF8;
|
281
|
-
border-left: 18px solid #047BF8;
|
282
|
-
display: inline-block;
|
283
|
-
color: #FFF;
|
284
|
-
text-decoration: none;
|
285
|
-
border-radius: 3px;
|
286
|
-
-webkit-text-size-adjust: none;
|
287
|
-
line-height: 22px;
|
288
|
-
font-size: 16px;
|
289
|
-
color: #FFF;
|
290
|
-
}
|
291
|
-
|
292
|
-
.button--link {
|
293
|
-
background-color: transparent;
|
294
|
-
border-top: 10px solid transparent;
|
295
|
-
border-right: 18px solid transparent;
|
296
|
-
border-bottom: 10px solid transparent;
|
297
|
-
border-left: 18px solid transparent;
|
298
|
-
display: inline-block;
|
299
|
-
color: #047BF8;
|
300
|
-
text-decoration: underline;
|
301
|
-
border-radius: 3px;
|
302
|
-
/*box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);*/
|
303
|
-
-webkit-text-size-adjust: none;
|
304
|
-
}
|
305
|
-
|
306
|
-
.button--green {
|
307
|
-
background-color: #22BC66;
|
308
|
-
border-top: 10px solid #22BC66;
|
309
|
-
border-right: 18px solid #22BC66;
|
310
|
-
border-bottom: 10px solid #22BC66;
|
311
|
-
border-left: 18px solid #22BC66;
|
312
|
-
}
|
313
|
-
|
314
|
-
.button--red {
|
315
|
-
background-color: #FF6136;
|
316
|
-
border-top: 10px solid #FF6136;
|
317
|
-
border-right: 18px solid #FF6136;
|
318
|
-
border-bottom: 10px solid #FF6136;
|
319
|
-
border-left: 18px solid #FF6136;
|
320
|
-
}
|
321
|
-
/* Type ------------------------------ */
|
322
|
-
|
323
|
-
h1 {
|
324
|
-
margin-top: 0;
|
325
|
-
color: #3E4B5B;
|
326
|
-
font-size: 19px;
|
327
|
-
font-weight: bold;
|
328
|
-
text-align: left;
|
329
|
-
}
|
330
|
-
|
331
|
-
h2 {
|
332
|
-
margin-top: 0;
|
333
|
-
color: #3E4B5B;
|
334
|
-
font-size: 16px;
|
335
|
-
font-weight: bold;
|
336
|
-
text-align: left;
|
337
|
-
}
|
338
|
-
|
339
|
-
h3 {
|
340
|
-
margin-top: 0;
|
341
|
-
color: #3E4B5B;
|
342
|
-
font-size: 14px;
|
343
|
-
font-weight: bold;
|
344
|
-
text-align: left;
|
345
|
-
}
|
346
|
-
|
347
|
-
p {
|
348
|
-
margin-top: 0;
|
349
|
-
color: #3E4B5B;
|
350
|
-
font-size: 16px;
|
351
|
-
line-height: 1.5em;
|
352
|
-
text-align: left;
|
353
|
-
}
|
354
|
-
|
355
|
-
p.sub {
|
356
|
-
font-size: 12px;
|
357
|
-
}
|
358
|
-
|
359
|
-
p.center {
|
360
|
-
text-align: center;
|
361
|
-
}
|
362
|
-
|
363
|
-
.body-action.less-footer {
|
364
|
-
margin-bottom: 10px;
|
365
|
-
}
|
366
|
-
</style>
|
367
|
-
</head>
|
368
|
-
<body>
|
369
|
-
<% if content_for? :preheader %>
|
370
|
-
<span class="preheader"><% yield :preheader %></span>
|
371
|
-
<% end %>
|
372
|
-
<table class="email-wrapper" width="100%" cellpadding="0" cellspacing="0">
|
373
|
-
<tr>
|
374
|
-
<td align="center">
|
375
|
-
<table class="email-content" width="100%" cellpadding="0" cellspacing="0">
|
376
|
-
<tr>
|
377
|
-
<td class="email-masthead">
|
378
|
-
<a href="<%= root_url %>" class="email-masthead_name">
|
379
|
-
<%= email_image_tag("logo/logo.png", width: image_width_for_height("logo/logo.png", BulletTrain::Themes.logo_height), height: BulletTrain::Themes.logo_height, style: "width: #{image_width_for_height('logo/logo.png', BulletTrain::Themes.logo_height)}px; height: #{BulletTrain::Themes.logo_height}px;") %>
|
380
|
-
</a>
|
381
|
-
</td>
|
382
|
-
</tr>
|
383
|
-
<!-- Email Body -->
|
384
|
-
<tr>
|
385
|
-
<td class="email-body" width="100%" cellpadding="0" cellspacing="0">
|
386
|
-
<table class="email-body_inner" align="center" width="570" cellpadding="0" cellspacing="0">
|
387
|
-
<!-- Body content -->
|
388
|
-
<tr>
|
389
|
-
<td class="content-cell">
|
390
|
-
|
391
|
-
<%= yield %>
|
392
|
-
|
393
|
-
<% if false %>
|
394
|
-
<!-- Sub copy -->
|
395
|
-
<table class="body-sub">
|
396
|
-
<tr>
|
397
|
-
<td>
|
398
|
-
<p class="sub"><%= t('.trouble') %></p>
|
399
|
-
<p class="sub">{{action_url}}</p>
|
400
|
-
</td>
|
401
|
-
</tr>
|
402
|
-
</table>
|
403
|
-
<% end %>
|
404
|
-
</td>
|
405
|
-
</tr>
|
406
|
-
</table>
|
407
|
-
</td>
|
408
|
-
</tr>
|
409
|
-
<tr>
|
410
|
-
<td>
|
411
|
-
<table class="email-footer" align="center" width="570" cellpadding="0" cellspacing="0">
|
412
|
-
<tr>
|
413
|
-
<td class="content-cell" align="center">
|
414
|
-
<p class="sub align-center">© <%= t('.all_rights_reserved', year: Date.today.year, product_name: t('application.name')) %></p>
|
415
|
-
</td>
|
416
|
-
</tr>
|
417
|
-
</table>
|
418
|
-
</td>
|
419
|
-
</tr>
|
420
|
-
</table>
|
421
|
-
</td>
|
422
|
-
</tr>
|
423
|
-
</table>
|
424
|
-
</body>
|
425
|
-
</html>
|
1
|
+
<%= render "themes/#{current_theme}/layouts/mailer" %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# NOTE: This is a workaround to get Devise working with Turbo
|
2
|
+
class TurboFailureApp < Devise::FailureApp
|
3
|
+
def respond
|
4
|
+
if request_format == :turbo_stream
|
5
|
+
redirect
|
6
|
+
else
|
7
|
+
super
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def skip_format?
|
12
|
+
%w[html turbo_stream */*].include? request_format.to_s
|
13
|
+
end
|
14
|
+
end
|
data/docs/field-partials.md
CHANGED
@@ -76,7 +76,7 @@ When you're including multiple fields, you can DRY up redundant settings (e.g. `
|
|
76
76
|
```
|
77
77
|
|
78
78
|
## Field partials that integrate with third-party service providers
|
79
|
-
- `cloudinary` makes it trivial to upload photos and images to [Cloudinary](https://cloudinary.com) and store their resulting Cloudinary ID as an attribute of the model backing the form.
|
79
|
+
- `cloudinary` makes it trivial to upload photos and images to [Cloudinary](https://cloudinary.com) and store their resulting Cloudinary ID as an attribute of the model backing the form. To enable this field partial, sign up for Cloudinary and copy the "Cloudinary URL" they provide you with into your `config/application.yml` as `CLOUDINARY_URL`. If you use our [Heroku app.json] to provision your production environment, this will happen in that environment automatically.
|
80
80
|
|
81
81
|
## Yaml Configuration
|
82
82
|
The localization Yaml file (where you configure label and option values for a field) is automatically generated when you run Super Scaffolding for a model. If you haven't done this yet, the localization Yaml file for `Scaffolding::CompletelyConcrete::TangibleThing` serves as a good example. Under `en.scaffolding/completely_concrete/tangible_things.fields` you'll see definitions like this:
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -423,6 +423,7 @@ executables: []
|
|
423
423
|
extensions: []
|
424
424
|
extra_rdoc_files: []
|
425
425
|
files:
|
426
|
+
- ".bt-link"
|
426
427
|
- MIT-LICENSE
|
427
428
|
- README.md
|
428
429
|
- Rakefile
|
@@ -452,6 +453,7 @@ files:
|
|
452
453
|
- app/controllers/concerns/sessions/controller_base.rb
|
453
454
|
- app/controllers/registrations_controller.rb
|
454
455
|
- app/controllers/sessions_controller.rb
|
456
|
+
- app/controllers/turbo_devise_controller.rb
|
455
457
|
- app/helpers/account/buttons_helper.rb
|
456
458
|
- app/helpers/account/dates_helper.rb
|
457
459
|
- app/helpers/account/forms_helper.rb
|
@@ -554,6 +556,7 @@ files:
|
|
554
556
|
- app/views/user_mailer/invited.html.erb
|
555
557
|
- app/views/user_mailer/welcome.html.erb
|
556
558
|
- config/initializers/concerns/inflections_base.rb
|
559
|
+
- config/initializers/concerns/turbo_failure_app.rb
|
557
560
|
- config/locales/en/base.yml
|
558
561
|
- config/locales/en/devise.en.yml
|
559
562
|
- config/locales/en/doorkeeper.en.yml
|
@@ -664,7 +667,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
664
667
|
- !ruby/object:Gem::Version
|
665
668
|
version: '0'
|
666
669
|
requirements: []
|
667
|
-
rubygems_version: 3.
|
670
|
+
rubygems_version: 3.3.7
|
668
671
|
signing_key:
|
669
672
|
specification_version: 4
|
670
673
|
summary: Bullet Train
|