bullet_train 1.2.15 → 1.2.17
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/docs/heroku.md +3 -11
- data/lib/bullet_train/version.rb +1 -1
- data/lib/bullet_train.rb +10 -8
- 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: db64e5d7fcc268dc9ce6f416f7fe118421806cbd2a182e5555454f02aeef5e0e
|
4
|
+
data.tar.gz: 7016b846224bc4287b7ea79a4527e8d5aea2a230d746eb11801cf8d335592e1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7b95318cf456e148e6dd4ebbb150bf1546fc8fcdfac00b628934d5b1ae2d17936055b1d1d5979662310c5b1f7a948b4d5c545b331b8f149129c8f6b72ef1cd
|
7
|
+
data.tar.gz: 8d713f56429fc441dfb463e84e74fad2fb95697111e4f00f8d2cef4dbd55f632b8f9afd44c261421a1e3c73c83e4a168f728d016285b13ab9714a09b7a00c7c8
|
data/docs/heroku.md
CHANGED
@@ -36,29 +36,21 @@ After this, you'll be able to deploy updates to your app like so:
|
|
36
36
|
git push heroku main
|
37
37
|
````
|
38
38
|
|
39
|
-
### 2.
|
40
|
-
We've decided not to configure the application to automatically run database migrations after a deploy for the time being. For that reason, you'll need to run the migrations and seeds manually, like so:
|
41
|
-
|
42
|
-
```
|
43
|
-
heroku run rake db:migrate
|
44
|
-
heroku run rake db:seed
|
45
|
-
```
|
46
|
-
|
47
|
-
### 3. Enabling Runtime Dyno Metadata
|
39
|
+
### 2. Enabling Runtime Dyno Metadata
|
48
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:
|
49
41
|
|
50
42
|
```
|
51
43
|
heroku labs:enable runtime-dyno-metadata
|
52
44
|
```
|
53
45
|
|
54
|
-
###
|
46
|
+
### 3. Improve Boot Time
|
55
47
|
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.
|
56
48
|
|
57
49
|
```
|
58
50
|
heroku labs:enable build-in-app-dir
|
59
51
|
```
|
60
52
|
|
61
|
-
###
|
53
|
+
### 4. Adding Your Actual Domain
|
62
54
|
|
63
55
|
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:
|
64
56
|
|
data/lib/bullet_train/version.rb
CHANGED
data/lib/bullet_train.rb
CHANGED
@@ -50,14 +50,12 @@ module BulletTrain
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def default_url_options_from_base_url
|
53
|
-
ENV["BASE_URL"]
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
else
|
60
|
-
raise "you need to define the value of ENV['BASE_URL'] in your environment. if you're on heroku, you can do this with `heroku config:add BASE_URL=https://your-app-name.herokuapp.com` (or whatever your configured domain is)."
|
53
|
+
unless ENV["BASE_URL"].present?
|
54
|
+
if Rails.env.development?
|
55
|
+
ENV["BASE_URL"] = "http://localhost:3000"
|
56
|
+
else
|
57
|
+
return {}
|
58
|
+
end
|
61
59
|
end
|
62
60
|
|
63
61
|
parsed_base_url = URI.parse(ENV["BASE_URL"])
|
@@ -74,6 +72,10 @@ def default_url_options_from_base_url
|
|
74
72
|
default_url_options
|
75
73
|
end
|
76
74
|
|
75
|
+
def heroku?
|
76
|
+
ENV["PATH"]&.include?("/app/.heroku/")
|
77
|
+
end
|
78
|
+
|
77
79
|
def inbound_email_enabled?
|
78
80
|
ENV["INBOUND_EMAIL_DOMAIN"].present?
|
79
81
|
end
|