appydays 0.4.0 → 0.5.0

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: fa853f6dccbb995b590e7a13204f7e02f7c8bb992630fa19344a15e751149bcf
4
- data.tar.gz: 235896b58a7e3a1fac6fa742cf01dfd8d129a54182d09ae1dfb65ad31b60448c
3
+ metadata.gz: ab72febd501e6dada1c4738598be500f24b98ab57183a8674e93e6622a82aaf4
4
+ data.tar.gz: c906e8cc5af47912035269aada22d832dfcb338079ac210207c2cfa26ac3bc64
5
5
  SHA512:
6
- metadata.gz: 931e7d037f44b697864b519f3efe6577a02f9923e814c2201f4c1ab1aea9430416f3cfc6dd63b26f116916b32ba08d608b03919cb7be52f173b11514e73d860a
7
- data.tar.gz: 161d5c8a250623e558426ee6be2dae1135717c6599de90d4ff38e2276f2d5b2b65de729eaf16443ae18e92f6bb923771762d9c92ab8c2bec33731c7ed154645d
6
+ metadata.gz: 65b183daf0a109fe1dc95f06a4bb1e842489541fd1fab7ec1c2794766a664334dd53e8b7adb8da5a80446fffe46bad7ff41c8e6076465d4fea05182c0956906b
7
+ data.tar.gz: 4608508c05777a02fa77983b9d91cb597e4f995cd1b78af7ea363a301d91ec31245357f97610f658e25a577d9a96778a6fd5b798af3f62ef9a81cd6a8a450187
@@ -9,8 +9,17 @@ require "appydays/version"
9
9
  # (by convention, .env.<env>.local, .env.<env>, and .env).
10
10
  #
11
11
  # It can be called multiple times for the same environment.
12
+ # There are a couple special cases for RACK_ENV and PORT variables:
12
13
  #
13
- # NOTE: Foreman assigns the $PORT environment variable BEFORE we load config
14
+ # RACK_ENV variable: Dotenviable defaults the $RACK_ENV variable to whatever
15
+ # is used for dotfile loading (ie, the `rack_env` or `default_rack_env` value).
16
+ # This avoids the surprising behavior where a caller does not have RACK_ENV set,
17
+ # they call +Dotenviable.load+, and RACK_ENV is still not set,
18
+ # though it had some implied usage within this method.
19
+ # If for some reason you do not want +ENV['RACK_ENV']+ to be set,
20
+ # you can store its value before calling `load` and set it back after.
21
+ #
22
+ # PORT variable: Foreman assigns the $PORT environment variable BEFORE we load config
14
23
  # (get to what is defined in worker, like puma.rb), so even if we have it in the .env files,
15
24
  # it won't get used, because .env files don't stomp what is already in the environment
16
25
  # (we don't want to use `overload`).
@@ -26,5 +35,6 @@ module Appydays::Dotenviable
26
35
  ]
27
36
  Dotenv.load(*paths)
28
37
  env["PORT"] ||= original_port
38
+ env["RACK_ENV"] ||= rack_env
29
39
  end
30
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Appydays
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydays
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lithic Tech
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-19 00:00:00.000000000 Z
11
+ date: 2022-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv