dotenv-rails 3.1.8 → 3.2.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 +4 -4
- data/README.md +7 -6
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04d36b9b6116f28f935965844d3fd5916ad780fda54f3cc652ed9f32ab229e4b
|
|
4
|
+
data.tar.gz: 56189def0feb6f6199cf633b4098f13fe71f7704b9d70fcfcacce32980d7a24b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fde31902ef88b2cccfb6e20f6c68ae5f0331d2b0c5222c58b3b2a6b28a82f325686c55cdf1dc6b90fc44669af687f090349b7a710c2c53bd2fbcef420acf65d9
|
|
7
|
+
data.tar.gz: cab09cf88978eddf7e1f0f0477a68e87cd48e036f0e1ba354884cee7a190f45ff775df66c1839ad2f23e5c7359615acda78c6314bf890f82de3d355765c96344
|
data/README.md
CHANGED
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Shim to load environment variables from `.env` into `ENV` in *development*.
|
|
4
4
|
|
|
5
|
-
<img align="left" src="https://github.com/user-attachments/assets/0052ed0b-00d2-416a-bdaa-0466c0226933" width="80" />
|
|
6
|
-
<div><sup>Dotenv is proud to be <a href="https://github.com/sponsors/bkeepers">sponsored by</a>:</sup></div>
|
|
7
|
-
<strong><a href="https://bit.ly/dotenv-stoked-seagull">Stoked Seagull Software</a></strong>
|
|
8
|
-
<div>Need help with a software project but don't know where to begin? <a href="https://bit.ly/dotenv-stoked-seagull">Stoked Seagull can help.</a></div><br><br>
|
|
9
|
-
|
|
10
5
|
Storing [configuration in the environment](http://12factor.net/config) is one of the tenets of a [twelve-factor app](http://12factor.net). Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
|
|
11
6
|
|
|
12
7
|
But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. dotenv loads variables from a `.env` file into `ENV` when the environment is bootstrapped.
|
|
@@ -52,7 +47,10 @@ require 'dotenv'
|
|
|
52
47
|
Dotenv.load
|
|
53
48
|
```
|
|
54
49
|
|
|
55
|
-
By default, `load` will look for a file called `.env` in the current working directory.
|
|
50
|
+
By default, `load` will look for a file called `.env` in the current working directory.
|
|
51
|
+
Pass in multiple files and they will be loaded in order.
|
|
52
|
+
The first value set for a variable will win.
|
|
53
|
+
Existing environment variables will not be overwritten unless you set `overwrite: true`.
|
|
56
54
|
|
|
57
55
|
```ruby
|
|
58
56
|
require 'dotenv'
|
|
@@ -319,6 +317,9 @@ Personally, I prefer to commit the `.env` file with development-only settings. T
|
|
|
319
317
|
|
|
320
318
|
By default, it **won't** overwrite existing environment variables as dotenv assumes the deployment environment has more knowledge about configuration than the application does. To overwrite existing environment variables you can use `Dotenv.load files, overwrite: true`.
|
|
321
319
|
|
|
320
|
+
To warn when a value was not overwritten (e.g. to make users aware of this gotcha),
|
|
321
|
+
use `Dotenv.load files, overwrite: :warn`.
|
|
322
|
+
|
|
322
323
|
You can also use the `-o` or `--overwrite` flag on the dotenv cli to overwrite existing `ENV` variables.
|
|
323
324
|
|
|
324
325
|
```console
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dotenv-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brandon Keepers
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: dotenv
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 3.
|
|
18
|
+
version: 3.2.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 3.
|
|
25
|
+
version: 3.2.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: railties
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
requirements: []
|
|
84
|
-
rubygems_version: 3.6.
|
|
84
|
+
rubygems_version: 3.6.9
|
|
85
85
|
specification_version: 4
|
|
86
86
|
summary: Autoload dotenv in Rails.
|
|
87
87
|
test_files: []
|