dotenvx 5.1.8-aarch64-linux → 5.1.10-aarch64-linux
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/CHANGELOG.md +9 -0
- data/README.md +26 -4
- data/lib/dotenvx/dotenvx_native.so +0 -0
- data/lib/dotenvx/rails.rb +1 -1
- data/lib/dotenvx/version.rb +1 -1
- data/lib/dotenvx.rb +8 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e109191e3d5f8420784e640469c8a8c2919c88c0dda76ad12ca58f2eb2e46dc8
|
|
4
|
+
data.tar.gz: c06bb062e3141d3b6b58edd54093fd46609c08a02bc86e7ded3dc71f825f3cfa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a73b566e23146d1f6b1be38e525a4d2ed5370e35ae61e6cbed9465c7a1c7cee1d50d704d999592ac87a0560ba8012bec9414cd729e43b25bfa4c9b5fb90a900
|
|
7
|
+
data.tar.gz: 4ee28390f107fbb742a9a3746dbc24fa6e67546781574081f12e5cd7c38c89c3f6e47eea92481313a4016c5920c4b9a27ccedbd95b0922f4223fac363ba90d3f
|
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](
|
|
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
|
|
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*
|
|
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.
|
|
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
|
|
Binary file
|
data/lib/dotenvx/rails.rb
CHANGED
data/lib/dotenvx/version.rb
CHANGED
data/lib/dotenvx.rb
CHANGED
|
@@ -16,7 +16,7 @@ module Dotenvx
|
|
|
16
16
|
class << self
|
|
17
17
|
attr_accessor :instrumenter
|
|
18
18
|
|
|
19
|
-
def load(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false)
|
|
19
|
+
def load(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false, cwd: Dir.pwd)
|
|
20
20
|
env, summary, secrets = parse_files(
|
|
21
21
|
*filenames,
|
|
22
22
|
overwrite: overwrite,
|
|
@@ -25,7 +25,8 @@ module Dotenvx
|
|
|
25
25
|
convention: convention,
|
|
26
26
|
environment: environment,
|
|
27
27
|
key_files: key_files,
|
|
28
|
-
resolve_references: resolve_references
|
|
28
|
+
resolve_references: resolve_references,
|
|
29
|
+
cwd: cwd
|
|
29
30
|
)
|
|
30
31
|
changed = update(env, overwrite: overwrite)
|
|
31
32
|
Output.install(secrets)
|
|
@@ -47,7 +48,7 @@ module Dotenvx
|
|
|
47
48
|
end
|
|
48
49
|
alias overload! overwrite!
|
|
49
50
|
|
|
50
|
-
def parse(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false)
|
|
51
|
+
def parse(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false, cwd: Dir.pwd)
|
|
51
52
|
parse_files(
|
|
52
53
|
*filenames,
|
|
53
54
|
overwrite: overwrite,
|
|
@@ -56,7 +57,8 @@ module Dotenvx
|
|
|
56
57
|
convention: convention,
|
|
57
58
|
environment: environment,
|
|
58
59
|
key_files: key_files,
|
|
59
|
-
resolve_references: resolve_references
|
|
60
|
+
resolve_references: resolve_references,
|
|
61
|
+
cwd: cwd
|
|
60
62
|
).first
|
|
61
63
|
end
|
|
62
64
|
|
|
@@ -82,13 +84,13 @@ module Dotenvx
|
|
|
82
84
|
|
|
83
85
|
private
|
|
84
86
|
|
|
85
|
-
def parse_files(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false)
|
|
87
|
+
def parse_files(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false, cwd: Dir.pwd)
|
|
86
88
|
filenames = filenames.flatten
|
|
87
89
|
ignored_codes = Array(ignore).grep(String)
|
|
88
90
|
ignored_codes << "MISSING_ENV_FILE" if ignore == true
|
|
89
91
|
result = JSON.parse(Native.load_env(JSON.generate(
|
|
90
92
|
sources: filenames.map { |filename| { type: "file", value: filename.to_s } },
|
|
91
|
-
cwd:
|
|
93
|
+
cwd: cwd,
|
|
92
94
|
convention: convention,
|
|
93
95
|
environment_name: environment,
|
|
94
96
|
key_files: key_files.nil? ? nil : Array(key_files).map(&:to_s),
|