bullet_train 1.12.0 → 1.12.1
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 +27 -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: 7a7d2a3ad862f57f8b91e0db97982d672c8c73c896f24f1af13a398ccb3b2a96
|
4
|
+
data.tar.gz: 3ec97fc6cc70d9701ad1b4cef65276d14b8e188b0b3fcf63e3a7151b8c976d4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72de63a2467f4753c80706dac5b23d51afc7d197c4e6fbc43945e447a19dd0b3cf90372eb2aa1dfb0fdf9a08d6f11986615606a7fc72c669e786e274c9870ca8
|
7
|
+
data.tar.gz: f95130d7f6e2fd446e532239bc6543c4581cf1f63958969e3ae2855d1bb7f057ebea73247a53f3c2bef61832114742e916edb1fd8b523c2b0c1243efb3006162
|
data/lib/bullet_train/version.rb
CHANGED
data/lib/bullet_train.rb
CHANGED
@@ -73,7 +73,33 @@ def default_url_options_from_base_url
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def heroku?
|
76
|
-
|
76
|
+
# This is a value we set in `app.json` so anyone using the "Deploy to Heroku" button
|
77
|
+
# should have it. This is kind of a brute force method that should be future-proofed
|
78
|
+
# against changes that Heroku might make to their runtime environment. We'll fallback
|
79
|
+
# to some additional checks if this isn't here, to maintain backwards compatibility
|
80
|
+
# for existing apps.
|
81
|
+
if ENV["BT_IS_IN_HEROKU"].present?
|
82
|
+
ENV["BT_IS_IN_HEROKU"] == "true"
|
83
|
+
else
|
84
|
+
# This requires the app to run `heroku labs:enable runtime-dyno-metadata` and then
|
85
|
+
# deploy at least once before the ENV var is set. Many existing BT apps have enabled
|
86
|
+
# this feature, and this used to be the only detection method that we had. We're
|
87
|
+
# keeping it for backwards compability reasons because it's probably more stable
|
88
|
+
# than the following fallbacks.
|
89
|
+
ENV["HEROKU_APP_NAME"].present? ||
|
90
|
+
# And finally we fallback to checking for some artifacts that Heroku happens to leave
|
91
|
+
# lying around. These may change in the future, so who knows how long they'll be good.
|
92
|
+
#
|
93
|
+
# If there's a `DYNO` ENV var, then we're probably on Heroku. Will they _always_ set
|
94
|
+
# this variable?
|
95
|
+
ENV["DYNO"].present? ||
|
96
|
+
# Finally we look for the the existence of the `/app/.heroku` directory.
|
97
|
+
# This should make detection work for apps that don't have any of the above ENV vars, for
|
98
|
+
# whatever reasons. But, in the future Heroku could decide to remove `/app/.heroku`
|
99
|
+
# which will break this fallback method and then we'll have to come up with something else.
|
100
|
+
# This is currently our last line of defense.
|
101
|
+
File.directory?("/app/.heroku")
|
102
|
+
end
|
77
103
|
end
|
78
104
|
|
79
105
|
def inbound_email_enabled?
|
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.12.
|
4
|
+
version: 1.12.1
|
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-12-
|
11
|
+
date: 2024-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|