bullet_train 1.11.0 → 1.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 892c29ff71cfaa92f465dcdda297c34c767123aebc2a9b9950b04136dd327eef
4
- data.tar.gz: be30f624783ec02d7924d7312c0697097e1f968cc28e34ca878d86add2d2cc40
3
+ metadata.gz: 7a7d2a3ad862f57f8b91e0db97982d672c8c73c896f24f1af13a398ccb3b2a96
4
+ data.tar.gz: 3ec97fc6cc70d9701ad1b4cef65276d14b8e188b0b3fcf63e3a7151b8c976d4f
5
5
  SHA512:
6
- metadata.gz: a2f4d79b3f5dcbcc89d7058836bbb7ff22c41b47917a82caadb051f11fd4cfc03e34f7bedb1ea94ed538525d60c0be9f0c09373c920f3a8fded04659944142f3
7
- data.tar.gz: 0eb2e4f26cb7eb9f84523b01717698e5f672d74fa2c5e3b319b7258b0c0318c76d33828ce520e768c137c1c6bc9351b7db5a72c833b5e90ffcb692fafe5ae7cb
6
+ metadata.gz: 72de63a2467f4753c80706dac5b23d51afc7d197c4e6fbc43945e447a19dd0b3cf90372eb2aa1dfb0fdf9a08d6f11986615606a7fc72c669e786e274c9870ca8
7
+ data.tar.gz: f95130d7f6e2fd446e532239bc6543c4581cf1f63958969e3ae2855d1bb7f057ebea73247a53f3c2bef61832114742e916edb1fd8b523c2b0c1243efb3006162
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.11.0"
2
+ VERSION = "1.12.1"
3
3
  end
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
- ENV["HEROKU_APP_NAME"].present?
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.11.0
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-11-25 00:00:00.000000000 Z
11
+ date: 2024-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: simplecov
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rails
29
43
  requirement: !ruby/object:Gem::Requirement