bullet_train 1.2.14 → 1.2.15

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: 358e50b478a3dc8e59e119ce48bb7dadae9307c9ce6bde1126cb2a239078eb95
4
- data.tar.gz: ed9095ed50c53a6235dbf6b854137f20960e4ba3f79c8ce2092b2dc70a67bfb8
3
+ metadata.gz: c463276e19b14feeb9f7ccf1cb5f50942fa77e89a3023a4d51606f42c18a2dea
4
+ data.tar.gz: d56d1491bb9412849f63b371c0d4f0d3c2b7da60d912d5dca232d2ceaa8273ac
5
5
  SHA512:
6
- metadata.gz: 6501ad3fea38da957ffa0729aad517e13e0b330f2b11674a0acf1c30e2d1aa1f315f723f03a6664616ff17038b1435dbc36f114e8f8c78c4013a8cafe4296ac0
7
- data.tar.gz: 2546ccaa180b2f9001a9947de2cc1d3add2f4676f486cf8cb2799b6543f99be518b70aa782d071f4b6c8eaa2270a99df95b66ae7669816a6319af4fc4e980775
6
+ metadata.gz: 39ec0403861c83a9494675744a649eed2bf24d4cbf4f6b0fd53bc9d22c5a81ea91c8cafdd221f39059424a6db9fbdde800f48a175639b481185e709ebe599634
7
+ data.tar.gz: f1225aa6d34108876c6398d7c5062b713d85e42c9cd4de24363f6dd0b734ad7cc72bd6d9489d9ee27e7d64431ce374dd4a04db141a927553119e4e21c1f3c6cc
@@ -1,3 +1,3 @@
1
1
  module BulletTrain
2
- VERSION = "1.2.14"
2
+ VERSION = "1.2.15"
3
3
  end
data/lib/bullet_train.rb CHANGED
@@ -50,12 +50,14 @@ module BulletTrain
50
50
  end
51
51
 
52
52
  def default_url_options_from_base_url
53
- unless ENV["BASE_URL"].present?
54
- if Rails.env.development?
55
- ENV["BASE_URL"] ||= "http://localhost:3000"
56
- else
57
- 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)."
58
- end
53
+ ENV["BASE_URL"] ||= if ENV["HEROKU_APP_NAME"]
54
+ "https://#{ENV["HEROKU_APP_NAME"]}.herokuapp.com"
55
+ elsif ENV["RENDER_EXTERNAL_URL"]
56
+ ENV["RENDER_EXTERNAL_URL"]
57
+ elsif Rails.env.development?
58
+ "http://localhost:3000"
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)."
59
61
  end
60
62
 
61
63
  parsed_base_url = URI.parse(ENV["BASE_URL"])
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.2.14
4
+ version: 1.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard