dotenv-rails 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +28 -6
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e919ac045eaf29163f767080ac21c201e91fe366e77aea3eafdceb0f088d1f84
|
4
|
+
data.tar.gz: 82745ab4e48e7f79d366351d8aa44b44e94a7ba859b08a4ec9093ea5eff76e96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e61d18e243b7025ac832048fa1f68cd6eef7c4cfc3949c8e24402c2b6c1d9f25e4338252ba1f5eb2e4101173cd2a8751d543dcee09c42a2dee2ae7f14d9e5e2
|
7
|
+
data.tar.gz: 1146bc5f56f10d03657aa76d8cadc35f8b5a986dcf98b2e94c97b40e7d29f1d9259248757cd08a423ed34b4ad22723e5d7c402af988da0d5f81fa16b14243cd9
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# dotenv [](https://travis-ci.org/bkeepers/dotenv) [](https://badge.fury.io/rb/dotenv) [](https://gitter.im/bkeepers/dotenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
2
2
|
|
3
3
|
Shim to load environment variables from `.env` into `ENV` in *development*.
|
4
4
|
|
@@ -163,6 +163,21 @@ SECRET_KEY=YOURSECRETKEYGOESHERE # comment
|
|
163
163
|
SECRET_HASH="something-with-a-#-hash"
|
164
164
|
```
|
165
165
|
|
166
|
+
### Required Keys
|
167
|
+
|
168
|
+
If a particular configuration value is required but not set, it's appropriate to raise an error.
|
169
|
+
|
170
|
+
To require configuration keys:
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
# config/initializers/dotenv.rb
|
174
|
+
|
175
|
+
Dotenv.require_keys("SERVICE_APP_ID", "SERVICE_KEY", "SERVICE_SECRET")
|
176
|
+
```
|
177
|
+
|
178
|
+
If any of the configuration keys above are not set, your application will raise an error during initialization. This method is preferred because it prevents runtime errors in a production application due to improper configuration.
|
179
|
+
|
180
|
+
|
166
181
|
## Frequently Answered Questions
|
167
182
|
|
168
183
|
### Can I use dotenv in production?
|
@@ -175,12 +190,19 @@ If you use this gem to handle env vars for multiple Rails environments (developm
|
|
175
190
|
|
176
191
|
### What other .env* files can I use?
|
177
192
|
|
178
|
-
`dotenv-rails` will
|
193
|
+
`dotenv-rails` will override in the following order (highest defined varible overrides lower):
|
194
|
+
|
195
|
+
| Hierarchy Priority | Filename | Environment | Should I `.gitignore`it? | Notes |
|
196
|
+
| ------------------ | ------------------------ | -------------------- | --------------------------------------------------- | ------------------------------------------------------------ |
|
197
|
+
| 1st (highest) | `.env.development.local` | Development | Yes! | Local overrides of environment-specific settings. |
|
198
|
+
| 1st | `.env.test.local` | Test | Yes! | Local overrides of environment-specific settings. |
|
199
|
+
| 1st | `.env.production.local` | Production | Yes! | Local overrides of environment-specific settings. |
|
200
|
+
| 2nd | `.env.local` | Wherever the file is | Definitely. | Local overrides. This file is loaded for all environments _except_ `test`. |
|
201
|
+
| 3rd | `.env.development` | Development | No. | Shared environment-specific settings |
|
202
|
+
| 3rd | `.env.test` | Test | No. | Shared environment-specific settings |
|
203
|
+
| 3rd | `.env.production` | Production | No. | Shared environment-specific settings |
|
204
|
+
| Last | `.env` | All Environments | Depends (See [below](#should-i-commit-my-env-file)) | The Original® |
|
179
205
|
|
180
|
-
- `.env` - The Original®
|
181
|
-
- `.env.development`, `.env.test`, `.env.production` - Environment-specific settings.
|
182
|
-
- `.env.local` - Local overrides. This file is loaded for all environments _except_ `test`.
|
183
|
-
- `.env.development.local`, `.env.test.local`, `.env.production.local` - Local overrides of environment-specific settings.
|
184
206
|
|
185
207
|
### Should I commit my .env file?
|
186
208
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotenv-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.6.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.6.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6
|
93
|
+
rubygems_version: 2.7.6
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Autoload dotenv in Rails.
|