dotenvx-rails 5.1.8 → 5.1.10

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0583d12afddc90398346539c33388e64240ab1dd935fee570119d7cc88bd540c'
4
- data.tar.gz: 492b7289d126bdd883341d6b2438f0ce9a2dad19a1dff2ece095a6b5d6a9f94d
3
+ metadata.gz: 8edc44f4a22ffddfb08b8283b487ac9dac33691d30a647059cfac0c96bd374de
4
+ data.tar.gz: e709c32db11beeeee0cf75e30b1e6be0d253d3fa0b37225a7cf1f4559535de50
5
5
  SHA512:
6
- metadata.gz: ec8dc1d76ccece2fc3a6794110111b95357e0c93a3784ce285d0a8b11988575fee075fcfa76b4345baa83dbf47386b3f433a4ecefc567307a07d75bdb60535af
7
- data.tar.gz: 9aca780e93bd1c23d67fb4e1ef4710524554bc605363351864080b0280860261fa2f4f7e99fb72eedbe88afb4055a83387a1771a03f55035cfae4ee523536f26
6
+ metadata.gz: 45288074710f78a8fc048e0b149498333e52d63984e896ececa7dbde5efea2c937567f6d10f23e06c47381d323d89c81658028791ca339cfa4722d76b86f6fda
7
+ data.tar.gz: 83be5000ece06bffd94505551f1f9ae270fdacee40f5e7a2197afdc7d8bfdf83275775ca9eac9c5fd9104eb78078ea61eea89f1f733c4c8f6cf0b8381be9854a
data/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. See [standa
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 5.1.10 (2026-11-30)
8
+
9
+ - Add the example `.env` file and run command to the Ruby quickstart, and show how to supply its private key in production.
10
+
11
+ ## 5.1.9 (2026-11-30)
12
+
13
+ - **Behavior change:** Remove automatic Rails env-file layering. Rails now uses the shared SDK defaults: `DOTENV_FILE` / `DOTENV_PATH`, exported private-key file inference, then `.env`. Set `DOTENV_CONVENTION=rails` to opt back into Rails layering.
14
+ - Honor file-selection environment variables relative to the Rails app root, without changing the process working directory.
15
+
7
16
  ## 5.1.8 (2026-11-30)
8
17
 
9
18
  - Point the `dotenvx` and `dotenvx-rails` gem homepages to the GitHub README.
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  * Commit
7
7
  * Ship
8
8
 
9
- [Install](https://dotenvx.com/docs/install) · [Quickstart](https://dotenvx.com/docs/quickstart)
9
+ [Install](https://dotenvx.com/docs/install) · [Quickstart](#quickstart) · [Changelog](CHANGELOG.md)
10
10
 
11
11
  ## Quickstart
12
12
 
@@ -14,6 +14,13 @@
14
14
  gem install dotenvx
15
15
  ```
16
16
 
17
+ Create a `.env` file next to your Ruby script.
18
+
19
+ ```dotenv
20
+ # .env
21
+ HELLO=World
22
+ ```
23
+
17
24
  ```ruby
18
25
  # index.rb
19
26
  require "dotenvx"
@@ -23,6 +30,13 @@ Dotenvx.load
23
30
  puts "Hello #{ENV["HELLO"]}"
24
31
  ```
25
32
 
33
+ Run the script from that directory.
34
+
35
+ ```sh
36
+ ruby index.rb
37
+ # Hello World
38
+ ```
39
+
26
40
   
27
41
 
28
42
  ## Rails Quickstart
@@ -39,9 +53,17 @@ Then install it:
39
53
  bundle install
40
54
  ```
41
55
 
42
- Dotenvx automatically loads your `.env` files when your Rails app boots, before
56
+ Dotenvx automatically loads your environment when your Rails app boots, before
43
57
  application configuration. You do not need to call `Dotenvx.load` yourself.
44
58
 
59
+ Rails uses the same file selection as the other SDKs, with no automatic layering:
60
+ `DOTENV_FILE` (or `DOTENV_PATH`) selects the files to load. Otherwise, exported
61
+ private-key names select their matching files (for example,
62
+ `DOTENV_PRIVATE_KEY_PRODUCTION` selects `.env.production`); without either,
63
+ Dotenvx loads `.env`. `RAILS_ENV=production` alone does not select `.env.production`.
64
+ Paths are resolved from your Rails app root. Layering is opt-in through
65
+ `DOTENV_CONVENTION`.
66
+
45
67
   
46
68
 
47
69
  ## Usage
@@ -60,14 +82,14 @@ $ dotenvx encrypt
60
82
  ◈ encrypted .env (039 BCA) via .env.keys ⛉
61
83
  ```
62
84
 
63
- *Commit* your encrypted `.env` files with your code. It's safe. Now you can securely share secrets through git.
85
+ *Commit* the encrypted `.env` with your code. Keep the generated `.env.keys` file out of version control.
64
86
 
65
87
  ```sh
66
88
  $ git add .env
67
89
  $ git commit -m "encrypt .env"
68
90
  ```
69
91
 
70
- *Ship* your code and secrets together. Dotenvx uses your private key to decrypt and inject your secrets just-in-time to your code.
92
+ *Ship* your code and secrets together. For this `.env` file, set `DOTENV_PRIVATE_KEY` in your deployment environment to the matching key from `.env.keys`. Dotenvx uses it when your app starts.
71
93
 
72
94
  ```sh
73
95
  $ ruby index.rb
data/lib/dotenvx/rails.rb CHANGED
@@ -39,7 +39,7 @@ module Dotenvx
39
39
  def load
40
40
  return if @loaded
41
41
 
42
- Dotenvx.load(root.to_s, convention: "rails", environment: Rails.env.to_s)
42
+ Dotenvx.load(cwd: root.to_s, environment: Rails.env.to_s)
43
43
  @loaded = true
44
44
  end
45
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenvx-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.8
4
+ version: 5.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - motdotla
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 5.1.8
18
+ version: 5.1.10
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: 5.1.8
25
+ version: 5.1.10
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: railties
28
28
  requirement: !ruby/object:Gem::Requirement