bullet_train 1.2.15 → 1.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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: db9bf6373626523a2b56fae55a9d884db079f0b300bb97a83ae726597cc13a24
|
4
|
+
data.tar.gz: dcad48f627a911b4243697ef92550f39c8f40e386bf2c67c11e51b4b3a707a42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e99b9e93e5ea204b8ea9793f1960119c038a1c11dc9c49bc523c69dc887efff3fd810935f3abf5f515ca629cac43e12296cfeb588641ddc12b2f92aaa58c2ea1
|
7
|
+
data.tar.gz: 6187fb36affafd8baed716441a33f869ca88dfe382098cfde1e3668c01cfa30c1f36c54efdf200580161a161ae43c8f851b7410611673e66eae662ba62fecc3b
|
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
|