bullet_train 1.7.10 → 1.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/account/onboarding/user_details/edit.html.erb +9 -10
- data/docs/heroku.md +43 -14
- data/lib/bullet_train/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cf4dc94c458016ed898f35f0e449ed501f10e13699105e835c2f658d63daae8
|
4
|
+
data.tar.gz: ecbaae25c2d09cf4e381c73c96a7d63bcadc828da8eab69dd61d3768d4fb31bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57e3131560e8f376692ff5a162d6cf8e6cd1e228875a71a04ea2f92278b40a56bb6f5bc7e5aceeb29749b48a721cb9637f85c1c296609869e93929893b670a31
|
7
|
+
data.tar.gz: e1ac7c6143ea697e980ca51dabeb959a4fcbf2099f19e69c954768b7e5153faa20a6395b8e80c26ddc04872f6cda967d73c004f59e6cf38aa1f22d94fd76211f
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<% end %>
|
49
49
|
|
50
50
|
<script type="text/javascript">
|
51
|
-
|
51
|
+
document.addEventListener('turbo:load', function() {
|
52
52
|
|
53
53
|
// generate a mapping of js timezones compared to rails timezones.
|
54
54
|
var jsTimezoneMapping = {
|
@@ -60,17 +60,16 @@
|
|
60
60
|
// figure out the rails timezone value.
|
61
61
|
var railsValue = jsTimezoneMapping[jstz.determine().name()];
|
62
62
|
|
63
|
-
var useBrowserTimeZone =
|
63
|
+
var useBrowserTimeZone = document.querySelector("#user_time_zone").dataset.useBrowserTimeZone
|
64
64
|
|
65
65
|
if (useBrowserTimeZone == "true") {
|
66
|
-
// set the form accordingly
|
67
|
-
var
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
$("#select2-user_time_zone-container").text($option.text());
|
66
|
+
// set the form accordingly if we can find a matching option in the dropdown
|
67
|
+
var option = document.querySelector("#user_time_zone option[value=\"" + railsValue + "\"]")
|
68
|
+
if(option){
|
69
|
+
document.querySelector("#user_time_zone").value = railsValue;
|
70
|
+
}else{
|
71
|
+
console.log('We were unable to find a timezone matching the rails detected value of ', railsValue);
|
72
|
+
}
|
74
73
|
}
|
75
74
|
|
76
75
|
});
|
data/docs/heroku.md
CHANGED
@@ -4,24 +4,29 @@ When you're ready to deploy to Heroku, it's highly recommended you use this butt
|
|
4
4
|
|
5
5
|
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=http://github.com/bullet-train-co/bullet_train)
|
6
6
|
|
7
|
-
This button leverages the configuration found in `app.json`, including sensible
|
7
|
+
This button leverages the configuration found in `app.json`, including sensible demo-ready defaults for dyno formation, third-party services, buildpack configuration, etc.
|
8
|
+
|
9
|
+
The resources provisioned will cost about **$22/month**.
|
10
|
+
|
11
|
+
**Please note:** The resources provisioned via `app.json` are intended to be used for quickly launching your brand new app so that you can demo it easily. When you're ready to go into production you'll want to make some changes to these resources. See the section at the bottom of this page.
|
8
12
|
|
9
13
|
## What's Included?
|
10
14
|
|
11
15
|
### Required Add-Ons
|
12
|
-
|
16
|
+
|
17
|
+
We've included the "entry-level" service tier across the board for:
|
13
18
|
|
14
19
|
- [Heroku Postgres](https://elements.heroku.com/addons/heroku-postgresql)
|
15
20
|
- [Heroku Redis](https://elements.heroku.com/addons/heroku-redis) to support Sidekiq and Action Cable.
|
16
21
|
- [Memcachier](https://elements.heroku.com/addons/memcachier) to support Rails Cache.
|
17
|
-
- [Bucketeer](https://elements.heroku.com/addons/bucketeer) to support off-server file uploads backed by AWS S3.
|
18
22
|
- [Cloudinary](https://cloudinary.com) to support off-server image uploads and ImageMagick processing.
|
19
23
|
- [Heroku Scheduler](https://elements.heroku.com/addons/scheduler) for cron jobs.
|
20
24
|
- [Rails Autoscale](https://railsautoscale.com) for best-of-breed reactive performance monitoring.
|
21
|
-
- [Honeybadger](https://www.honeybadger.io)
|
25
|
+
- [Honeybadger](https://www.honeybadger.io) for error tracking.
|
22
26
|
- [Expedited Security](https://expeditedsecurity.com)'s [Real Email](https://elements.heroku.com/addons/realemail) to reduce accounts created with fake and unreachable emails, which will subsequently hurt your email deliverability.
|
23
27
|
|
24
28
|
## Additional Required Steps
|
29
|
+
|
25
30
|
Even after using the above button, there are a few steps that need to be performed manually using the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli):
|
26
31
|
|
27
32
|
### 1. Add Heroku as a Remote in Your Local Repository
|
@@ -34,23 +39,17 @@ After this, you'll be able to deploy updates to your app like so:
|
|
34
39
|
|
35
40
|
```
|
36
41
|
git push heroku main
|
37
|
-
````
|
38
|
-
|
39
|
-
### 2. Enabling Runtime Dyno Metadata
|
40
|
-
We include [Honeybadger](http://honeybadger.io) and Sentry (both at a free tier) for redundant error tracking by default. Sentry requires the following Heroku labs feature to be enabled:
|
41
|
-
|
42
|
-
```
|
43
|
-
heroku labs:enable runtime-dyno-metadata
|
44
42
|
```
|
45
43
|
|
46
|
-
###
|
44
|
+
### 2. Improve Boot Time
|
45
|
+
|
47
46
|
You can cut your application boot time in half by enabling the following Heroku Labs feature. See [this blog post](https://dev.to/dbackeus/cut-your-rails-boot-times-on-heroku-in-half-with-a-single-command-514d) for more details.
|
48
47
|
|
49
48
|
```
|
50
49
|
heroku labs:enable build-in-app-dir
|
51
50
|
```
|
52
51
|
|
53
|
-
###
|
52
|
+
### 3. Adding Your Actual Domain
|
54
53
|
|
55
54
|
The most common use case for Bullet Train applications is to be hosted at some appropriate subdomain (e.g. `app.YOURDOMAIN.COM`) while a marketing site is hosted with a completely different service at the apex domain (e.g. just `YOURDOMAIN.COM`) or `www.YOURDOMAIN.COM`. To accomplish this, do the following in your shell:
|
56
55
|
|
@@ -82,7 +81,7 @@ heroku certs:auto
|
|
82
81
|
|
83
82
|
You should be done now and your app should be available at `https://app.YOURDOMAIN.COM/account` and any hits to `https://app.YOURDOMAIN.COM` (e.g. when users sign out, etc.) will be redirected to your marketing site.
|
84
83
|
|
85
|
-
###
|
84
|
+
### 4. Configure CORS on Your S3 Bucket
|
86
85
|
|
87
86
|
Before you can upload to your freshly provisioned S3 bucket, you need to run (on Heroku) a rake task we've created for you to set the appropriate CORS settings.
|
88
87
|
|
@@ -91,3 +90,33 @@ heroku run rake aws:set_cors
|
|
91
90
|
```
|
92
91
|
|
93
92
|
Note: If you change `ENV["BASE_URL"]`, you need to re-run this task.
|
93
|
+
|
94
|
+
## Getting ready for production
|
95
|
+
|
96
|
+
When you're ready to launch your app in production you probably don't want to use the entry-level resources that we provision via `app.json`
|
97
|
+
|
98
|
+
|
99
|
+
### 1. Use standard dynos instead of basic
|
100
|
+
|
101
|
+
To update your `web` and `worker` processes to use `standard-1` dynos instead of `basic`:
|
102
|
+
|
103
|
+
```
|
104
|
+
heroku ps:type web=standard-1x
|
105
|
+
heroku ps:type worker=standard-1x
|
106
|
+
```
|
107
|
+
|
108
|
+
### 2. Upgrade your database
|
109
|
+
|
110
|
+
Pick the plan that matches the features you need: https://elements.heroku.com/addons/heroku-postgresql
|
111
|
+
|
112
|
+
Then follow the instructions here: https://devcenter.heroku.com/articles/updating-heroku-postgres-databases
|
113
|
+
|
114
|
+
### 3. Upgrade your redis instance
|
115
|
+
|
116
|
+
Pick the plan that matches the features you need: https://elements.heroku.com/addons/heroku-redis
|
117
|
+
|
118
|
+
Then follow the instructions here: https://devcenter.heroku.com/articles/heroku-redis-version-upgrade
|
119
|
+
|
120
|
+
### 4. Upgrade any other resources
|
121
|
+
|
122
|
+
Use `heroku addons` to see which addons you currently have installed. Double check the features that are included with your current plan and make sure they're sufficient for your needs in production.
|
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.7.
|
4
|
+
version: 1.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|