dotenv 3.0.0.beta → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +53 -5
  3. data/lib/dotenv/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d7ea2bf102098cea8bc5db5886a82aa785d0ac6e562eb32c3d3ec520d76ccb7
4
- data.tar.gz: bf7cb575727a86a963eeaf45f7e70e6a2c261cc410dca488b89463a64dc0c3aa
3
+ metadata.gz: 3963c1ba53e439322c807f8312b8a8f9ebd0766e4d03757b41e5ce6b4bb43bc5
4
+ data.tar.gz: a7f026d236de3dbac4a1bd08a28cee474159abedb750ff5a6b3e545f1aa5cf15
5
5
  SHA512:
6
- metadata.gz: de5756728ae8844f682425398405dac1564caec8d55bb21ec1ff2dd36ac8e9f13183624d4b426d95ba68fabbf0c1fee8e5da90acf98946b411c7192962d7c0ac
7
- data.tar.gz: ab787a65cf7b939f5b400090a000b15ad7fea63203575cb3d04aa7547045a5bef828f3b1b807223ef7c396ad6be06f245efe18271a3eba7fea1d654dcd4b92fb
6
+ metadata.gz: 9bd6a081fb16b6115340a1d0751e5886a8333137061121c7adbe6c2757d8199cf3c23ae374bc9fa2dcac7faeb6c4533a30ce28f5e5eb34eac9fce1b9308cf10c
7
+ data.tar.gz: deeb7d87a65e8e7f1af595a822abd1b81ade441a46fbe1b7188e1d511ad621ceb3c45b1509580e5ceab7c957b7b49ea2d3686eef0c91fb43d914c4a58f9d975c
data/README.md CHANGED
@@ -56,7 +56,7 @@ Dotenv.load('file1.env', 'file2.env')
56
56
 
57
57
  ## Autorestore in tests
58
58
 
59
- Since 3.0, dotenv in a Rails app will automatically restore `ENV` to its original state before each test. This means you can modify `ENV` in your tests without fear of leaking state to other tests. It works with both `ActiveSupport::TestCase` and `Rspec`.
59
+ Since 3.0, dotenv in a Rails app will automatically restore `ENV` after each test. This means you can modify `ENV` in your tests without fear of leaking state to other tests. It works with both `ActiveSupport::TestCase` and `Rspec`.
60
60
 
61
61
  To disable this behavior, set `config.dotenv.autorestore = false` in `config/application.rb` or `config/environments/test.rb`.
62
62
 
@@ -107,11 +107,59 @@ gem 'gem-that-requires-env-variables'
107
107
 
108
108
  ### Customizing Rails
109
109
 
110
- Dotenv will load the following files depending on `RAILS_ENV`, with the last file listed having the highest precedence:
110
+ Dotenv will load the following files depending on `RAILS_ENV`, with the first file having the highest precedence, and `.env` having the lowest precedence:
111
+
112
+ <table>
113
+ <thead>
114
+ <tr>
115
+ <th>Priority</th>
116
+ <th colspan="3">Environment</th>
117
+ <th><code>.gitignore</code>it?</th>
118
+ <th>Notes</th>
119
+ </tr>
120
+ <tr>
121
+ <th></th>
122
+ <th>development</th>
123
+ <th>test</th>
124
+ <th>production</th>
125
+ <th></th>
126
+ <th></th>
127
+ </tr>
128
+ </thead>
129
+ <tr>
130
+ <td>highest</td>
131
+ <td><code>.env.development.local</code></td>
132
+ <td><code>.env.test.local</code></td>
133
+ <td><code>.env.production.local</code></td>
134
+ <td>Yes</td>
135
+ <td>Environment-specific local overrides</td>
136
+ </tr>
137
+ <tr>
138
+ <td>2nd</td>
139
+ <td><code>.env.local</code></td>
140
+ <td><strong>N/A</strong></td>
141
+ <td><code>.env.local</code></td>
142
+ <td>Yes</td>
143
+ <td>Local overrides</td>
144
+ </tr>
145
+ <tr>
146
+ <td>3rd</td>
147
+ <td><code>.env.development</code></td>
148
+ <td><code>.env.test</code></td>
149
+ <td><code>.env.production</code></td>
150
+ <td>No</td>
151
+ <td>Shared environment-specific variables</td>
152
+ </tr>
153
+ <tr>
154
+ <td>last</td>
155
+ <td><code>.env</code></td>
156
+ <td><code>.env</code></td>
157
+ <td><code>.env</code></td>
158
+ <td><a href="#should-i-commit-my-env-file">Maybe</a></td>
159
+ <td>Shared for all environments</td>
160
+ </tr>
161
+ </table>
111
162
 
112
- * **development**: `.env`, `.env.development`, `.env.local`, `.env.development.local`
113
- * **test**: `.env`, `.env.test`, `.env.test.local` - Note that it will **not** load `.env.local`.
114
- * **development**: `.env`, `.env.production`, `.env.local`, `.env.production.local`
115
163
 
116
164
  These files are loaded during the `before_configuration` callback, which is fired when the `Application` constant is defined in `config/application.rb` with `class Application < Rails::Application`. If you need it to be initialized sooner, or need to customize the loading process, you can do so at the top of `application.rb`
117
165
 
@@ -1,3 +1,3 @@
1
1
  module Dotenv
2
- VERSION = "3.0.0.beta".freeze
2
+ VERSION = "3.0.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.beta
4
+ version: 3.0.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: 2024-01-25 00:00:00.000000000 Z
11
+ date: 2024-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake