dotenvx 5.1.8-x86_64-linux → 5.1.9-x86_64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba08df7fbaf8b0999c3bda23938487815bc7c9ffaac2b6194a3a4428ce6352f4
4
- data.tar.gz: b87a52591d7b72df82cab149c65435cb54e1e41742d47e4e041982a9b66191bd
3
+ metadata.gz: 24a305941951b2cc38c55f7ba9d909252226107758cdec203b6f34ba06ca1eab
4
+ data.tar.gz: 1f5b81aa4896ca7ebd523cf83692130ca90b1350801b11d1d474295a57e06cbb
5
5
  SHA512:
6
- metadata.gz: 4a9ff3ec44cac98f40ba12616d65587764df600107ba0507feaea0e815a19e91dbaf8d52ef7e007c6ebdc0cf6c0ff4880249771ef384f5054e07884a28a40896
7
- data.tar.gz: ad295f1898175a54e1937d2069d7a084b7503be4007e6c9b59184ac68f6cf4cbab4fc176de21301b1366087ff9ca262f51ac19f0b3714ecfb6bfecf0ce6fe561
6
+ metadata.gz: 65d51264180497ba0d5800bbfb161c38a298c53c7eb43e45c79eafac3cc3ff3efac3f4c7dfb1939952169d677ec2f294de2b074cda0974271b2b1bb5628c665d
7
+ data.tar.gz: bbdfba96243f34ebc5b902a7a4d91d27c2f6d498dd26ec19924fa2342c194246e58628d528d981dbee96fa1958e0c5e3efafb0d139df5bd88273d372e28fe25d
data/CHANGELOG.md CHANGED
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. See [standa
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 5.1.9 (2026-11-30)
8
+
9
+ - **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.
10
+ - Honor file-selection environment variables relative to the Rails app root, without changing the process working directory.
11
+
7
12
  ## 5.1.8 (2026-11-30)
8
13
 
9
14
  - Point the `dotenvx` and `dotenvx-rails` gem homepages to the GitHub README.
data/README.md CHANGED
@@ -39,9 +39,17 @@ Then install it:
39
39
  bundle install
40
40
  ```
41
41
 
42
- Dotenvx automatically loads your `.env` files when your Rails app boots, before
42
+ Dotenvx automatically loads your environment when your Rails app boots, before
43
43
  application configuration. You do not need to call `Dotenvx.load` yourself.
44
44
 
45
+ Rails uses the same file selection as the other SDKs, with no automatic layering:
46
+ `DOTENV_FILE` (or `DOTENV_PATH`) selects the files to load. Otherwise, exported
47
+ private-key names select their matching files (for example,
48
+ `DOTENV_PRIVATE_KEY_PRODUCTION` selects `.env.production`); without either,
49
+ Dotenvx loads `.env`. `RAILS_ENV=production` alone does not select `.env.production`.
50
+ Paths are resolved from your Rails app root. Layering is opt-in through
51
+ `DOTENV_CONVENTION`.
52
+
45
53
   
46
54
 
47
55
  ## Usage
Binary file
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
 
@@ -1,3 +1,3 @@
1
1
  module Dotenvx
2
- VERSION = "5.1.8"
2
+ VERSION = "5.1.9"
3
3
  end
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: Dir.pwd,
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),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenvx
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.8
4
+ version: 5.1.9
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - motdotla