dotenv-merge 1.0.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.
data/README.md ADDED
@@ -0,0 +1,820 @@
1
+ | 📍 NOTE |
2
+ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3
+ | RubyGems (the [GitHub org][rubygems-org], not the website) [suffered][draper-security] a [hostile takeover][ellen-takeover] in September 2025. |
4
+ | Ultimately [4 maintainers][simi-removed] were [hard removed][martin-removed] and a reason has been given for only 1 of those, while 2 others resigned in protest. |
5
+ | It is a [complicated story][draper-takeover] which is difficult to [parse quickly][draper-lies]. |
6
+ | Simply put - there was active policy for adding or removing maintainers/owners of [rubygems][rubygems-maint-policy] and [bundler][bundler-maint-policy], and those [policies were not followed][policy-fail]. |
7
+ | I'm adding notes like this to gems because I [don't condone theft][draper-theft] of repositories or gems from their rightful owners. |
8
+ | If a similar theft happened with my repos/gems, I'd hope some would stand up for me. |
9
+ | Disenfranchised former-maintainers have started [gem.coop][gem-coop]. |
10
+ | Once available I will publish there exclusively; unless RubyCentral makes amends with the community. |
11
+ | The ["Technology for Humans: Joel Draper"][reinteractive-podcast] podcast episode by [reinteractive][reinteractive] is the most cogent summary I'm aware of. |
12
+ | See [here][gem-naming], [here][gem-coop] and [here][martin-ann] for more info on what comes next. |
13
+ | What I'm doing: A (WIP) proposal for [bundler/gem scopes][gem-scopes], and a (WIP) proposal for a federated [gem server][gem-server]. |
14
+
15
+ [rubygems-org]: https://github.com/rubygems/
16
+ [draper-security]: https://joel.drapper.me/p/ruby-central-security-measures/
17
+ [draper-takeover]: https://joel.drapper.me/p/ruby-central-takeover/
18
+ [ellen-takeover]: https://pup-e.com/blog/goodbye-rubygems/
19
+ [simi-removed]: https://www.reddit.com/r/ruby/s/gOk42POCaV
20
+ [martin-removed]: https://bsky.app/profile/martinemde.com/post/3m3occezxxs2q
21
+ [draper-lies]: https://joel.drapper.me/p/ruby-central-fact-check/
22
+ [draper-theft]: https://joel.drapper.me/p/ruby-central/
23
+ [reinteractive]: https://reinteractive.com/ruby-on-rails
24
+ [gem-coop]: https://gem.coop
25
+ [gem-naming]: https://github.com/gem-coop/gem.coop/issues/12
26
+ [martin-ann]: https://martinemde.com/2025/10/05/announcing-gem-coop.html
27
+ [gem-scopes]: https://github.com/galtzo-floss/bundle-namespace
28
+ [gem-server]: https://github.com/galtzo-floss/gem-server
29
+ [reinteractive-podcast]: https://youtu.be/_H4qbtC5qzU?si=BvuBU90R2wAqD2E6
30
+ [bundler-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/bundler/playbooks/TEAM_CHANGES.md
31
+ [rubygems-maint-policy]: https://github.com/ruby/rubygems/blob/b1ab33a3d52310a84d16b193991af07f5a6a07c0/doc/rubygems/POLICIES.md?plain=1#L187-L196
32
+ [policy-fail]: https://www.reddit.com/r/ruby/comments/1ove9vp/rubycentral_hates_this_one_fact/
33
+
34
+ [![Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0][🖼️galtzo-i]][🖼️galtzo-discord] [![ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5][🖼️ruby-lang-i]][🖼️ruby-lang] [![kettle-rb Logo by Aboling0, CC BY-SA 4.0][🖼️kettle-rb-i]][🖼️kettle-rb]
35
+
36
+ [🖼️galtzo-i]: https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg
37
+ [🖼️galtzo-discord]: https://discord.gg/3qme4XHNKN
38
+ [🖼️ruby-lang-i]: https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg
39
+ [🖼️ruby-lang]: https://www.ruby-lang.org/
40
+ [🖼️kettle-rb-i]: https://logos.galtzo.com/assets/images/kettle-rb/avatar-192px.svg
41
+ [🖼️kettle-rb]: https://github.com/kettle-rb
42
+
43
+ # ☯️ Dotenv::Merge
44
+
45
+ [![Version][👽versioni]][👽version] [![GitHub tag (latest SemVer)][⛳️tag-img]][⛳️tag] [![License: MIT][📄license-img]][📄license-ref] [![Downloads Rank][👽dl-ranki]][👽dl-rank] [![Open Source Helpers][👽oss-helpi]][👽oss-help] [![CodeCov Test Coverage][🏀codecovi]][🏀codecov] [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls] [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov] [![QLTY Maintainability][🏀qlty-mnti]][🏀qlty-mnt] [![CI Heads][🚎3-hd-wfi]][🚎3-hd-wf] [![CI Runtime Dependencies @ HEAD][🚎12-crh-wfi]][🚎12-crh-wf] [![CI Current][🚎11-c-wfi]][🚎11-c-wf] [![CI Truffle Ruby][🚎9-t-wfi]][🚎9-t-wf] [![Deps Locked][🚎13-🔒️-wfi]][🚎13-🔒️-wf] [![Deps Unlocked][🚎14-🔓️-wfi]][🚎14-🔓️-wf] [![CI Supported][🚎6-s-wfi]][🚎6-s-wf] [![CI Test Coverage][🚎2-cov-wfi]][🚎2-cov-wf] [![CI Style][🚎5-st-wfi]][🚎5-st-wf] [![CodeQL][🖐codeQL-img]][🖐codeQL] [![Apache SkyWalking Eyes License Compatibility Check][🚎15-🪪-wfi]][🚎15-🪪-wf]
46
+
47
+ `if ci_badges.map(&:color).detect { it != "green"}` ☝️ [let me know][🖼️galtzo-discord], as I may have missed the [discord notification][🖼️galtzo-discord].
48
+
49
+ ---
50
+
51
+ `if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.
52
+
53
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate at ko-fi.com][🖇kofi-img]][🖇kofi]
54
+
55
+ ## 🌻 Synopsis
56
+
57
+ Dotenv::Merge is a standalone Ruby module that intelligently merges two versions of a dotenv (`.env`) file. It's like a smart "git merge" specifically designed for environment configuration files. Built on top of [ast-merge](https://github.com/kettle-rb/ast-merge), it shares the same architecture as [prism-merge](https://github.com/kettle-rb/prism-merge) for Ruby source files.
58
+
59
+ ### Key Features
60
+
61
+ - **Dotenv-Aware**: Understands dotenv file format (KEY=value, comments, exports)
62
+ - **Intelligent**: Matches environment variables by key name
63
+ - **Comment-Preserving**: Comments and blank lines are preserved in their context
64
+ - **Freeze Block Support**: Respects freeze markers (default: `dotenv-merge:freeze` / `dotenv-merge:unfreeze`) for merge control - customizable to match your project's conventions
65
+ - **Full Provenance**: Tracks origin of every line
66
+ - **Standalone**: Minimal dependencies - just `ast-merge`
67
+ - **Customizable**:
68
+ - `signature_generator` - callable custom signature generators
69
+ - `preference` - setting of `:template`, `:destination`, or a Hash for per-node-type preferences
70
+ - `node_splitter` - Hash mapping node types to callables for per-node-type merge customization (see [ast-merge](https://github.com/kettle-rb/ast-merge) docs)
71
+ - `add_template_only_nodes` - setting to retain variables that do not exist in destination
72
+ - `freeze_token` - customize freeze block markers (default: `"dotenv-merge"`)
73
+
74
+ ### Supported Line Types
75
+
76
+ | Line Type | Format | Matching Behavior |
77
+ |-----------|--------|-------------------|
78
+ | Assignment | `KEY=value` | Variables match by key name |
79
+ | Export | `export KEY=value` | Treated as assignment with export flag |
80
+ | Comment | `# comment text` | Preserved in context |
81
+ | Blank | (empty line) | Preserved for readability |
82
+ | Double-quoted | `KEY="value with\nescapes"` | Escape sequences processed |
83
+ | Single-quoted | `KEY='literal value'` | No escape processing |
84
+ | Inline comment | `KEY=value # comment` | Comment stripped from value |
85
+
86
+ ### Example
87
+
88
+ ```ruby
89
+ require "dotenv/merge"
90
+
91
+ template = File.read("template.env")
92
+ destination = File.read("destination.env")
93
+
94
+ merger = Dotenv::Merge::SmartMerger.new(template, destination)
95
+ result = merger.merge
96
+
97
+ File.write("merged.env", result.to_s)
98
+ ```
99
+
100
+ ### Part of a gem family
101
+
102
+ | Gem | File Type | Parser |
103
+ |-----|-----------|--------|
104
+ | [ast-merge](https://github.com/kettle-rb/ast-merge) | Text | internal |
105
+ | [prism-merge](https://github.com/kettle-rb/prism-merge) | Ruby | Prism |
106
+ | [psych-merge](https://github.com/kettle-rb/psych-merge) | YAML | Psych |
107
+ | [json-merge](https://github.com/kettle-rb/json-merge) | JSON | tree-sitter-json |
108
+ | [jsonc-merge](https://github.com/kettle-rb/jsonc-merge) | JSONC | ⚠️ [tree-sitter-jsonc](https://gitlab.com/WhyNotHugo/tree-sitter-jsonc) (PoC) |
109
+ | [bash-merge](https://github.com/kettle-rb/bash-merge) | Shell | tree-sitter-bash |
110
+ | [rbs-merge](https://github.com/kettle-rb/rbs-merge) | RBS Types | RBS |
111
+ | **dotenv-merge** | Dotenv | internal |
112
+ | [toml-merge](https://github.com/kettle-rb/toml-merge) | TOML | tree-sitter-toml |
113
+ | [markdown-merge](https://github.com/kettle-rb/markdown-merge) | Markdown | _base classes_ |
114
+ | [markly-merge](https://github.com/kettle-rb/markly-merge) | Markdown | Markly (cmark-gfm) |
115
+ | [commonmarker-merge](https://github.com/kettle-rb/commonmarker-merge) | Markdown | Commonmarker (Comrak) |
116
+
117
+ **Example implementations** for the gem templating use case:
118
+
119
+ | Gem | Purpose |
120
+ |-----|---------|
121
+ | [kettle-dev](https://github.com/kettle-rb/kettle-dev) | Gem templating tool |
122
+ | [kettle-jem](https://github.com/kettle-rb/kettle-jem) | Gem template library |
123
+
124
+ ### Configuration
125
+
126
+ ```ruby
127
+ merger = Dotenv::Merge::SmartMerger.new(
128
+ template_content,
129
+ dest_content,
130
+ # Which version to prefer when variables match
131
+ # :destination (default) - keep destination values
132
+ # :template - use template values
133
+ preference: :destination,
134
+
135
+ # Whether to add template-only variables to the result
136
+ # false (default) - only include variables that exist in destination
137
+ # true - include all template variables
138
+ add_template_only_nodes: false,
139
+
140
+ # Token for freeze block markers
141
+ # Default: "dotenv-merge"
142
+ # Looks for: # dotenv-merge:freeze / # dotenv-merge:unfreeze
143
+ freeze_token: "dotenv-merge",
144
+
145
+ # Custom signature generator (optional)
146
+ # Receives an EnvLine, returns a signature array or nil
147
+ signature_generator: ->(line) { [:env, line.key] if line.assignment? },
148
+ )
149
+ ```
150
+
151
+ ### Basic Usage
152
+
153
+ #### Simple Merge
154
+
155
+ ```ruby
156
+ require "dotenv/merge"
157
+
158
+ # Template defines the structure
159
+ template = <<~ENV
160
+ # Database configuration
161
+ DATABASE_URL=postgres://localhost/myapp_dev
162
+ DATABASE_POOL=5
163
+
164
+ # API keys
165
+ API_KEY=your_api_key_here
166
+ API_SECRET=your_secret_here
167
+ ENV
168
+
169
+ # Destination has customizations
170
+ destination = <<~ENV
171
+ # Database configuration
172
+ DATABASE_URL=postgres://production.example.com/myapp
173
+ DATABASE_POOL=25
174
+
175
+ # Custom setting not in template
176
+ CUSTOM_SETTING=my_value
177
+ ENV
178
+
179
+ merger = Dotenv::Merge::SmartMerger.new(template, destination)
180
+ result = merger.merge
181
+ puts result
182
+ ```
183
+
184
+ #### Using Freeze Blocks
185
+
186
+ Freeze blocks protect sections from being overwritten during merge:
187
+
188
+ ```env
189
+ # Database configuration
190
+ DATABASE_URL=postgres://localhost/myapp_dev
191
+
192
+ # dotenv-merge:freeze Custom API credentials
193
+ API_KEY=my_secret_production_key
194
+ API_SECRET=super_secret_value
195
+ # dotenv-merge:unfreeze
196
+
197
+ # Other settings
198
+ DEBUG=false
199
+ ```
200
+
201
+ Content between `# dotenv-merge:freeze` and `# dotenv-merge:unfreeze` markers is preserved from the destination file, regardless of what the template contains.
202
+
203
+ #### Adding Template-Only Variables
204
+
205
+ ```ruby
206
+ merger = Dotenv::Merge::SmartMerger.new(
207
+ template,
208
+ destination,
209
+ add_template_only_nodes: true,
210
+ )
211
+ result = merger.merge
212
+ # Result includes variables from template that don't exist in destination
213
+ ```
214
+
215
+ ### The `*-merge` Gem Family
216
+
217
+ This gem is part of a family of gems that provide intelligent merging for various file formats:
218
+
219
+ | Gem | Format | Parser | Description |
220
+ |-----|--------|--------|-------------|
221
+ | [ast-merge][ast-merge] | Text | internal | Shared infrastructure for all `*-merge` gems |
222
+ | [prism-merge][prism-merge] | Ruby | [Prism][prism] | Smart merge for Ruby source files |
223
+ | [psych-merge][psych-merge] | YAML | [Psych][psych] | Smart merge for YAML files |
224
+ | [json-merge][json-merge] | JSON | [tree-sitter-json][ts-json] | Smart merge for JSON files |
225
+ | [jsonc-merge][jsonc-merge] | JSONC | [tree-sitter-jsonc][ts-jsonc] | ⚠️ Proof of concept; Smart merge for JSON with Comments |
226
+ | [bash-merge][bash-merge] | Bash | [tree-sitter-bash][ts-bash] | Smart merge for Bash scripts |
227
+ | [rbs-merge][rbs-merge] | RBS | [RBS][rbs] | Smart merge for Ruby type signatures |
228
+ | [dotenv-merge][dotenv-merge] | Dotenv | internal ([dotenv][dotenv]) | Smart merge for `.env` files |
229
+ | [toml-merge][toml-merge] | TOML | [tree-sitter-toml][ts-toml] | Smart merge for TOML files |
230
+ | [markly-merge][markly-merge] | Markdown | [Markly][markly] | Smart merge for Markdown (CommonMark via libcmark-gfm) |
231
+ | [commonmarker-merge][commonmarker-merge] | Markdown | [Commonmarker][commonmarker] | Smart merge for Markdown (CommonMark via comrak) |
232
+
233
+ [ast-merge]: https://github.com/kettle-rb/ast-merge
234
+ [prism-merge]: https://github.com/kettle-rb/prism-merge
235
+ [psych-merge]: https://github.com/kettle-rb/psych-merge
236
+ [json-merge]: https://github.com/kettle-rb/json-merge
237
+ [jsonc-merge]: https://github.com/kettle-rb/jsonc-merge
238
+ [bash-merge]: https://github.com/kettle-rb/bash-merge
239
+ [rbs-merge]: https://github.com/kettle-rb/rbs-merge
240
+ [dotenv-merge]: https://github.com/kettle-rb/dotenv-merge
241
+ [toml-merge]: https://github.com/kettle-rb/toml-merge
242
+ [markly-merge]: https://github.com/kettle-rb/markly-merge
243
+ [commonmarker-merge]: https://github.com/kettle-rb/commonmarker-merge
244
+ [prism]: https://github.com/ruby/prism
245
+ [psych]: https://github.com/ruby/psych
246
+ [ts-json]: https://github.com/tree-sitter/tree-sitter-json
247
+ [ts-jsonc]: https://gitlab.com/WhyNotHugo/tree-sitter-jsonc
248
+ [ts-bash]: https://github.com/tree-sitter/tree-sitter-bash
249
+ [ts-toml]: https://github.com/tree-sitter-grammars/tree-sitter-toml
250
+ [rbs]: https://github.com/ruby/rbs
251
+ [dotenv]: https://github.com/bkeepers/dotenv
252
+ [markly]: https://github.com/kivikakk/markly
253
+ [commonmarker]: https://github.com/gjtorikian/commonmarker
254
+
255
+ ## 💡 Info you can shake a stick at
256
+
257
+ | Tokens to Remember | [![Gem name][⛳️name-img]][⛳️gem-name] [![Gem namespace][⛳️namespace-img]][⛳️gem-namespace] |
258
+ |-------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
259
+ | Works with JRuby | [![JRuby 10.0 Compat][💎jruby-c-i]][🚎11-c-wf] [![JRuby HEAD Compat][💎jruby-headi]][🚎3-hd-wf] |
260
+ | Works with Truffle Ruby | [![Truffle Ruby 23.1 Compat][💎truby-23.1i]][🚎9-t-wf] [![Truffle Ruby 24.1 Compat][💎truby-c-i]][🚎11-c-wf] |
261
+ | Works with MRI Ruby 3 | [![Ruby 3.2 Compat][💎ruby-3.2i]][🚎6-s-wf] [![Ruby 3.3 Compat][💎ruby-3.3i]][🚎6-s-wf] [![Ruby 3.4 Compat][💎ruby-c-i]][🚎11-c-wf] [![Ruby HEAD Compat][💎ruby-headi]][🚎3-hd-wf] |
262
+ | Support & Community | [![Join Me on Daily.dev's RubyFriends][✉️ruby-friends-img]][✉️ruby-friends] [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork] [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor] |
263
+ | Source | [![Source on GitLab.com][📜src-gl-img]][📜src-gl] [![Source on CodeBerg.org][📜src-cb-img]][📜src-cb] [![Source on Github.com][📜src-gh-img]][📜src-gh] [![The best SHA: dQw4w9WgXcQ!][🧮kloc-img]][🧮kloc] |
264
+ | Documentation | [![Current release on RubyDoc.info][📜docs-cr-rd-img]][🚎yard-current] [![YARD on Galtzo.com][📜docs-head-rd-img]][🚎yard-head] [![Maintainer Blog][🚂maint-blog-img]][🚂maint-blog] [![GitLab Wiki][📜gl-wiki-img]][📜gl-wiki] [![GitHub Wiki][📜gh-wiki-img]][📜gh-wiki] |
265
+ | Compliance | [![License: MIT][📄license-img]][📄license-ref] [![Compatible with Apache Software Projects: Verified by SkyWalking Eyes][📄license-compat-img]][📄license-compat] [![📄ilo-declaration-img]][📄ilo-declaration] [![Security Policy][🔐security-img]][🔐security] [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct] [![SemVer 2.0.0][📌semver-img]][📌semver] |
266
+ | Style | [![Enforced Code Style Linter][💎rlts-img]][💎rlts] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] [![Gitmoji Commits][📌gitmoji-img]][📌gitmoji] [![Compatibility appraised by: appraisal2][💎appraisal2-img]][💎appraisal2] |
267
+ | Maintainer 🎖️ | [![Follow Me on LinkedIn][💖🖇linkedin-img]][💖🖇linkedin] [![Follow Me on Ruby.Social][💖🐘ruby-mast-img]][💖🐘ruby-mast] [![Follow Me on Bluesky][💖🦋bluesky-img]][💖🦋bluesky] [![Contact Maintainer][🚂maint-contact-img]][🚂maint-contact] [![My technical writing][💖💁🏼‍♂️devto-img]][💖💁🏼‍♂️devto] |
268
+ | `...` 💖 | [![Find Me on WellFound:][💖✌️wellfound-img]][💖✌️wellfound] [![Find Me on CrunchBase][💖💲crunchbase-img]][💖💲crunchbase] [![My LinkTree][💖🌳linktree-img]][💖🌳linktree] [![More About Me][💖💁🏼‍♂️aboutme-img]][💖💁🏼‍♂️aboutme] [🧊][💖🧊berg] [🐙][💖🐙hub] [🛖][💖🛖hut] [🧪][💖🧪lab] |
269
+
270
+ ### Compatibility
271
+
272
+ Compatible with MRI Ruby 3.2.0+, and concordant releases of JRuby, and TruffleRuby.
273
+
274
+ | 🚚 _Amazing_ test matrix was brought to you by | 🔎 appraisal2 🔎 and the color 💚 green 💚 |
275
+ |------------------------------------------------|--------------------------------------------------------|
276
+ | 👟 Check it out! | ✨ [github.com/appraisal-rb/appraisal2][💎appraisal2] ✨ |
277
+
278
+ ### Federated DVCS
279
+
280
+ <details markdown="1">
281
+ <summary>Find this repo on federated forges (Coming soon!)</summary>
282
+
283
+ | Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
284
+ |-------------------------------------------------|-----------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
285
+ | 🧪 [kettle-rb/dotenv-merge on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜gl-wiki] | 🐭 Tiny Matrix | ➖ |
286
+ | 🧊 [kettle-rb/dotenv-merge on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ |
287
+ | 🐙 [kettle-rb/dotenv-merge on GitHub][📜src-gh] | Another Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | [💚][📜gh-wiki] | 💯 Full Matrix | [💚][gh-discussions] |
288
+ | 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
289
+
290
+ </details>
291
+
292
+ [gh-discussions]: https://github.com/kettle-rb/dotenv-merge/discussions
293
+
294
+ ### Enterprise Support [![Tidelift](https://tidelift.com/badges/package/rubygems/dotenv-merge)](https://tidelift.com/subscription/pkg/rubygems-dotenv-merge?utm_source=rubygems-dotenv-merge&utm_medium=referral&utm_campaign=readme)
295
+
296
+ Available as part of the Tidelift Subscription.
297
+
298
+ <details markdown="1">
299
+ <summary>Need enterprise-level guarantees?</summary>
300
+
301
+ The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
302
+
303
+ [![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
304
+
305
+ - 💡Subscribe for support guarantees covering _all_ your FLOSS dependencies
306
+ - 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]
307
+ - 💡Tidelift pays maintainers to maintain the software you depend on!<br/>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers
308
+
309
+ Alternatively:
310
+
311
+ - [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
312
+ - [![Get help from me on Upwork][👨🏼‍🏫expsup-upwork-img]][👨🏼‍🏫expsup-upwork]
313
+ - [![Get help from me on Codementor][👨🏼‍🏫expsup-codementor-img]][👨🏼‍🏫expsup-codementor]
314
+
315
+ </details>
316
+
317
+ ## ✨ Installation
318
+
319
+ Install the gem and add to the application's Gemfile by executing:
320
+
321
+ ```console
322
+ bundle add dotenv-merge
323
+ ```
324
+
325
+ If bundler is not being used to manage dependencies, install the gem by executing:
326
+
327
+ ```console
328
+ gem install dotenv-merge
329
+ ```
330
+
331
+ ### 🔒 Secure Installation
332
+
333
+ <details markdown="1">
334
+ <summary>For Medium or High Security Installations</summary>
335
+
336
+ This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
337
+ [stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
338
+ by following the instructions below.
339
+
340
+ Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
341
+
342
+ ```console
343
+ gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
344
+ ```
345
+
346
+ You only need to do that once. Then proceed to install with:
347
+
348
+ ```console
349
+ gem install dotenv-merge -P HighSecurity
350
+ ```
351
+
352
+ The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies.
353
+
354
+ If you want to up your security game full-time:
355
+
356
+ ```console
357
+ bundle config set --global trust-policy MediumSecurity
358
+ ```
359
+
360
+ `MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed.
361
+
362
+ NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
363
+
364
+ </details>
365
+
366
+ ## ⚙️ Configuration
367
+
368
+ ```ruby
369
+ merger = Dotenv::Merge::SmartMerger.new(
370
+ template,
371
+ destination,
372
+ # When conflicts occur, prefer template or destination values
373
+ preference: :template, # or :destination (default)
374
+ # Add entries that only exist in template
375
+ add_template_only_nodes: true, # default: false
376
+ )
377
+ ```
378
+
379
+ ### Signature Match Preference
380
+
381
+ Control which source wins when both files have the same key:
382
+
383
+ - **`:template`** - Template values replace destination values
384
+ - Version files (`VERSION=2.0.0` should replace `VERSION=1.0.0`)
385
+ - API endpoint updates (`API_URL=https://new-api.example.com`)
386
+
387
+ - **`:destination`** (default) - Destination values are preserved
388
+ - Local development settings
389
+ - Project-specific customizations
390
+
391
+ ### Template-Only Nodes
392
+
393
+ Control whether to add entries that only exist in the template:
394
+
395
+ - **`true`** - Add new entries from template
396
+ - New required environment variables
397
+ - New configuration options
398
+
399
+ - **`false`** (default) - Skip template-only entries
400
+ - Template has placeholder values
401
+ - Destination is authoritative
402
+
403
+ ## 🔧 Basic Usage
404
+
405
+ ### Simple Merge
406
+
407
+ ```ruby
408
+ require "dotenv/merge"
409
+
410
+ template = File.read("template.env")
411
+ destination = File.read("destination.env")
412
+
413
+ merger = Dotenv::Merge::SmartMerger.new(template, destination)
414
+ result = merger.merge
415
+
416
+ File.write("merged.env", result)
417
+ ```
418
+
419
+ ### Working with Freeze Blocks
420
+
421
+ Freeze blocks protect sections of your `.env` file from being modified during merges:
422
+
423
+ ```
424
+ # << FREEZE: project_secrets
425
+ DATABASE_URL=postgresql://localhost/myapp_dev
426
+ SECRET_KEY_BASE=my_local_secret_key_value
427
+ # >> FREEZE: project_secrets
428
+
429
+ # These entries can be updated by template
430
+ API_VERSION=v2
431
+ ```
432
+
433
+ ### Adding Template-Only Entries
434
+
435
+ ```ruby
436
+ # Template introduces a new required variable
437
+ template = <<~ENV
438
+ DATABASE_URL=postgresql://localhost/template_db
439
+ NEW_FEATURE_FLAG=enabled
440
+ ENV
441
+
442
+ destination = <<~ENV
443
+ DATABASE_URL=postgresql://localhost/myapp_dev
444
+ ENV
445
+
446
+ merger = Dotenv::Merge::SmartMerger.new(
447
+ template,
448
+ destination,
449
+ add_template_only_nodes: true,
450
+ )
451
+ result = merger.merge
452
+ # Result includes DATABASE_URL from destination + NEW_FEATURE_FLAG from template
453
+ ```
454
+
455
+ ## 🦷 FLOSS Funding
456
+
457
+ While kettle-rb tools are free software and will always be, the project would benefit immensely from some funding.
458
+ Raising a monthly budget of... "dollars" would make the project more sustainable.
459
+
460
+ We welcome both individual and corporate sponsors! We also offer a
461
+ wide array of funding channels to account for your preferences
462
+ (although currently [Open Collective][🖇osc] is our preferred funding platform).
463
+
464
+ **If you're working in a company that's making significant use of kettle-rb tools we'd
465
+ appreciate it if you suggest to your company to become a kettle-rb sponsor.**
466
+
467
+ You can support the development of kettle-rb tools via
468
+ [GitHub Sponsors][🖇sponsor],
469
+ [Liberapay][⛳liberapay],
470
+ [PayPal][🖇paypal],
471
+ [Open Collective][🖇osc]
472
+ and [Tidelift][🏙️entsup-tidelift].
473
+
474
+ | 📍 NOTE |
475
+ |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
476
+ | If doing a sponsorship in the form of donation is problematic for your company <br/> from an accounting standpoint, we'd recommend the use of Tidelift, <br/> where you can get a support-like subscription instead. |
477
+
478
+ ### Open Collective for Individuals
479
+
480
+ Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/kettle-rb#backer)]
481
+
482
+ NOTE: [kettle-readme-backers][kettle-readme-backers] updates this list every day, automatically.
483
+
484
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:START -->
485
+ No backers yet. Be the first!
486
+ <!-- OPENCOLLECTIVE-INDIVIDUALS:END -->
487
+
488
+ ### Open Collective for Organizations
489
+
490
+ Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/kettle-rb#sponsor)]
491
+
492
+ NOTE: [kettle-readme-backers][kettle-readme-backers] updates this list every day, automatically.
493
+
494
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:START -->
495
+ No sponsors yet. Be the first!
496
+ <!-- OPENCOLLECTIVE-ORGANIZATIONS:END -->
497
+
498
+ [kettle-readme-backers]: https://github.com/kettle-rb/dotenv-merge/blob/main/exe/kettle-readme-backers
499
+
500
+ ### Another way to support open-source
501
+
502
+ I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).
503
+
504
+ If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.
505
+
506
+ I’m developing a new library, [floss_funding][🖇floss-funding-gem], designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.
507
+
508
+ **[Floss-Funding.dev][🖇floss-funding.dev]: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags**
509
+
510
+ [![OpenCollective Backers][🖇osc-backers-i]][🖇osc-backers] [![OpenCollective Sponsors][🖇osc-sponsors-i]][🖇osc-sponsors] [![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor] [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay] [![Donate on PayPal][🖇paypal-img]][🖇paypal] [![Buy me a coffee][🖇buyme-small-img]][🖇buyme] [![Donate on Polar][🖇polar-img]][🖇polar] [![Donate to my FLOSS efforts at ko-fi.com][🖇kofi-img]][🖇kofi] [![Donate to my FLOSS efforts using Patreon][🖇patreon-img]][🖇patreon]
511
+
512
+ ## 🔐 Security
513
+
514
+ See [SECURITY.md][🔐security].
515
+
516
+ ## 🤝 Contributing
517
+
518
+ If you need some ideas of where to help, you could work on adding more code coverage,
519
+ or if it is already 💯 (see [below](#code-coverage)) check [reek](REEK), [issues][🤝gh-issues], or [PRs][🤝gh-pulls],
520
+ or use the gem and think about how it could be better.
521
+
522
+ We [![Keep A Changelog][📗keep-changelog-img]][📗keep-changelog] so if you make changes, remember to update it.
523
+
524
+ See [CONTRIBUTING.md][🤝contributing] for more detailed instructions.
525
+
526
+ ### 🚀 Release Instructions
527
+
528
+ See [CONTRIBUTING.md][🤝contributing].
529
+
530
+ ### Code Coverage
531
+
532
+ [![Coverage Graph][🏀codecov-g]][🏀codecov]
533
+
534
+ [![Coveralls Test Coverage][🏀coveralls-img]][🏀coveralls]
535
+
536
+ [![QLTY Test Coverage][🏀qlty-covi]][🏀qlty-cov]
537
+
538
+ ### 🪇 Code of Conduct
539
+
540
+ Everyone interacting with this project's codebases, issue trackers,
541
+ chat rooms and mailing lists agrees to follow the [![Contributor Covenant 2.1][🪇conduct-img]][🪇conduct].
542
+
543
+ ## 🌈 Contributors
544
+
545
+ [![Contributors][🖐contributors-img]][🖐contributors]
546
+
547
+ Made with [contributors-img][🖐contrib-rocks].
548
+
549
+ Also see GitLab Contributors: [https://gitlab.com/kettle-rb/dotenv-merge/-/graphs/main][🚎contributors-gl]
550
+
551
+ <details>
552
+ <summary>⭐️ Star History</summary>
553
+
554
+ <a href="https://star-history.com/#kettle-rb/dotenv-merge&Date">
555
+ <picture>
556
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=kettle-rb/dotenv-merge&type=Date&theme=dark" />
557
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=kettle-rb/dotenv-merge&type=Date" />
558
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=kettle-rb/dotenv-merge&type=Date" />
559
+ </picture>
560
+ </a>
561
+
562
+ </details>
563
+
564
+ ## 📌 Versioning
565
+
566
+ This Library adheres to [![Semantic Versioning 2.0.0][📌semver-img]][📌semver].
567
+ Violations of this scheme should be reported as bugs.
568
+ Specifically, if a minor or patch version is released that breaks backward compatibility,
569
+ a new version should be immediately released that restores compatibility.
570
+ Breaking changes to the public API will only be introduced with new major versions.
571
+
572
+ > dropping support for a platform is both obviously and objectively a breaking change <br/>
573
+ >—Jordan Harband ([@ljharb](https://github.com/ljharb), maintainer of SemVer) [in SemVer issue 716][📌semver-breaking]
574
+
575
+ I understand that policy doesn't work universally ("exceptions to every rule!"),
576
+ but it is the policy here.
577
+ As such, in many cases it is good to specify a dependency on this library using
578
+ the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
579
+
580
+ For example:
581
+
582
+ ```ruby
583
+ spec.add_dependency("dotenv-merge", "~> 1.0")
584
+ ```
585
+
586
+ <details markdown="1">
587
+ <summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
588
+
589
+ SemVer should, IMO, but doesn't explicitly, say that dropping support for specific Platforms
590
+ is a *breaking change* to an API, and for that reason the bike shedding is endless.
591
+
592
+ To get a better understanding of how SemVer is intended to work over a project's lifetime,
593
+ read this article from the creator of SemVer:
594
+
595
+ - ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
596
+
597
+ </details>
598
+
599
+ See [CHANGELOG.md][📌changelog] for a list of releases.
600
+
601
+ ## 📄 License
602
+
603
+ The gem is available as open source under the terms of
604
+ the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
605
+ See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
606
+
607
+ ### © Copyright
608
+
609
+ <ul>
610
+ <li>
611
+ Copyright (c) 2025 Peter H. Boling, of
612
+ <a href="https://discord.gg/3qme4XHNKN">
613
+ Galtzo.com
614
+ <picture>
615
+ <img src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px-blank.svg" alt="Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0" width="24">
616
+ </picture>
617
+ </a>, and dotenv-merge contributors.
618
+ </li>
619
+ </ul>
620
+
621
+ ## 🤑 A request for help
622
+
623
+ Maintainers have teeth and need to pay their dentists.
624
+ After getting laid off in an RIF in March, and encountering difficulty finding a new one,
625
+ I began spending most of my time building open source tools.
626
+ I'm hoping to be able to pay for my kids' health insurance this month,
627
+ so if you value the work I am doing, I need your support.
628
+ Please consider sponsoring me or the project.
629
+
630
+ To join the community or get help 👇️ Join the Discord.
631
+
632
+ [![Live Chat on Discord][✉️discord-invite-img-ftb]][✉️discord-invite]
633
+
634
+ To say "thanks!" ☝️ Join the Discord or 👇️ send money.
635
+
636
+ [![Sponsor kettle-rb/dotenv-merge on Open Source Collective][🖇osc-all-bottom-img]][🖇osc] 💌 [![Sponsor me on GitHub Sponsors][🖇sponsor-bottom-img]][🖇sponsor] 💌 [![Sponsor me on Liberapay][⛳liberapay-bottom-img]][⛳liberapay] 💌 [![Donate on PayPal][🖇paypal-bottom-img]][🖇paypal]
637
+
638
+ ### Please give the project a star ⭐ ♥.
639
+
640
+ Thanks for RTFM. ☺️
641
+
642
+ [⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611&style=flat
643
+ [⛳liberapay-bottom-img]: https://img.shields.io/liberapay/goal/pboling.svg?style=for-the-badge&logo=liberapay&color=a51611
644
+ [⛳liberapay]: https://liberapay.com/pboling/donate
645
+ [🖇osc-all-img]: https://img.shields.io/opencollective/all/kettle-rb
646
+ [🖇osc-sponsors-img]: https://img.shields.io/opencollective/sponsors/kettle-rb
647
+ [🖇osc-backers-img]: https://img.shields.io/opencollective/backers/kettle-rb
648
+ [🖇osc-backers]: https://opencollective.com/kettle-rb#backer
649
+ [🖇osc-backers-i]: https://opencollective.com/kettle-rb/backers/badge.svg?style=flat
650
+ [🖇osc-sponsors]: https://opencollective.com/kettle-rb#sponsor
651
+ [🖇osc-sponsors-i]: https://opencollective.com/kettle-rb/sponsors/badge.svg?style=flat
652
+ [🖇osc-all-bottom-img]: https://img.shields.io/opencollective/all/kettle-rb?style=for-the-badge
653
+ [🖇osc-sponsors-bottom-img]: https://img.shields.io/opencollective/sponsors/kettle-rb?style=for-the-badge
654
+ [🖇osc-backers-bottom-img]: https://img.shields.io/opencollective/backers/kettle-rb?style=for-the-badge
655
+ [🖇osc]: https://opencollective.com/kettle-rb
656
+ [🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
657
+ [🖇sponsor-bottom-img]: https://img.shields.io/badge/Sponsor_Me!-pboling-blue?style=for-the-badge&logo=github
658
+ [🖇sponsor]: https://github.com/sponsors/pboling
659
+ [🖇polar-img]: https://img.shields.io/badge/polar-donate-a51611.svg?style=flat
660
+ [🖇polar]: https://polar.sh/pboling
661
+ [🖇kofi-img]: https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg?style=flat
662
+ [🖇kofi]: https://ko-fi.com/O5O86SNP4
663
+ [🖇patreon-img]: https://img.shields.io/badge/patreon-donate-a51611.svg?style=flat
664
+ [🖇patreon]: https://patreon.com/galtzo
665
+ [🖇buyme-small-img]: https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat
666
+ [🖇buyme-img]: https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff
667
+ [🖇buyme]: https://www.buymeacoffee.com/pboling
668
+ [🖇paypal-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal
669
+ [🖇paypal-bottom-img]: https://img.shields.io/badge/donate-paypal-a51611.svg?style=for-the-badge&logo=paypal&color=0A0A0A
670
+ [🖇paypal]: https://www.paypal.com/paypalme/peterboling
671
+ [🖇floss-funding.dev]: https://floss-funding.dev
672
+ [🖇floss-funding-gem]: https://github.com/galtzo-floss/floss_funding
673
+ [✉️discord-invite]: https://discord.gg/3qme4XHNKN
674
+ [✉️discord-invite-img-ftb]: https://img.shields.io/discord/1373797679469170758?style=for-the-badge&logo=discord
675
+ [✉️ruby-friends-img]: https://img.shields.io/badge/daily.dev-%F0%9F%92%8E_Ruby_Friends-0A0A0A?style=for-the-badge&logo=dailydotdev&logoColor=white
676
+ [✉️ruby-friends]: https://app.daily.dev/squads/rubyfriends
677
+
678
+ [✇bundle-group-pattern]: https://gist.github.com/pboling/4564780
679
+ [⛳️gem-namespace]: https://github.com/kettle-rb/dotenv-merge
680
+ [⛳️namespace-img]: https://img.shields.io/badge/namespace-Dotenv::Merge-3C2D2D.svg?style=square&logo=ruby&logoColor=white
681
+ [⛳️gem-name]: https://bestgems.org/gems/dotenv-merge
682
+ [⛳️name-img]: https://img.shields.io/badge/name-dotenv--merge-3C2D2D.svg?style=square&logo=rubygems&logoColor=red
683
+ [⛳️tag-img]: https://img.shields.io/github/tag/kettle-rb/dotenv-merge.svg
684
+ [⛳️tag]: http://github.com/kettle-rb/dotenv-merge/releases
685
+ [🚂maint-blog]: http://www.railsbling.com/tags/dotenv-merge
686
+ [🚂maint-blog-img]: https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange
687
+ [🚂maint-contact]: http://www.railsbling.com/contact
688
+ [🚂maint-contact-img]: https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red
689
+ [💖🖇linkedin]: http://www.linkedin.com/in/peterboling
690
+ [💖🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling
691
+ [💖✌️wellfound]: https://wellfound.com/u/peter-boling
692
+ [💖✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound
693
+ [💖💲crunchbase]: https://www.crunchbase.com/person/peter-boling
694
+ [💖💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase
695
+ [💖🐘ruby-mast]: https://ruby.social/@galtzo
696
+ [💖🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https://ruby.social&style=flat&logo=mastodon&label=Ruby%20@galtzo
697
+ [💖🦋bluesky]: https://bsky.app/profile/galtzo.com
698
+ [💖🦋bluesky-img]: https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white
699
+ [💖🌳linktree]: https://linktr.ee/galtzo
700
+ [💖🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree
701
+ [💖💁🏼‍♂️devto]: https://dev.to/galtzo
702
+ [💖💁🏼‍♂️devto-img]: https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white
703
+ [💖💁🏼‍♂️aboutme]: https://about.me/peter.boling
704
+ [💖💁🏼‍♂️aboutme-img]: https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white
705
+ [💖🧊berg]: https://codeberg.org/pboling
706
+ [💖🐙hub]: https://github.org/pboling
707
+ [💖🛖hut]: https://sr.ht/~galtzo/
708
+ [💖🧪lab]: https://gitlab.com/pboling
709
+ [👨🏼‍🏫expsup-upwork]: https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share
710
+ [👨🏼‍🏫expsup-upwork-img]: https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white
711
+ [👨🏼‍🏫expsup-codementor]: https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github
712
+ [👨🏼‍🏫expsup-codementor-img]: https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white
713
+ [🏙️entsup-tidelift]: https://tidelift.com/subscription/pkg/rubygems-dotenv-merge?utm_source=rubygems-dotenv-merge&utm_medium=referral&utm_campaign=readme
714
+ [🏙️entsup-tidelift-img]: https://img.shields.io/badge/Tidelift_and_Sonar-Enterprise_Support-FD3456?style=for-the-badge&logo=sonar&logoColor=white
715
+ [🏙️entsup-tidelift-sonar]: https://blog.tidelift.com/tidelift-joins-sonar
716
+ [💁🏼‍♂️peterboling]: http://www.peterboling.com
717
+ [🚂railsbling]: http://www.railsbling.com
718
+ [📜src-gl-img]: https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange
719
+ [📜src-gl]: https://gitlab.com/kettle-rb/dotenv-merge/
720
+ [📜src-cb-img]: https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue
721
+ [📜src-cb]: https://codeberg.org/kettle-rb/dotenv-merge
722
+ [📜src-gh-img]: https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green
723
+ [📜src-gh]: https://github.com/kettle-rb/dotenv-merge
724
+ [📜docs-cr-rd-img]: https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
725
+ [📜docs-head-rd-img]: https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white
726
+ [📜gl-wiki]: https://gitlab.com/kettle-rb/dotenv-merge/-/wikis/home
727
+ [📜gh-wiki]: https://github.com/kettle-rb/dotenv-merge/wiki
728
+ [📜gl-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=gitlab&logoColor=white
729
+ [📜gh-wiki-img]: https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=github&logoColor=white
730
+ [👽dl-rank]: https://bestgems.org/gems/dotenv-merge
731
+ [👽dl-ranki]: https://img.shields.io/gem/rd/dotenv-merge.svg
732
+ [👽oss-help]: https://www.codetriage.com/kettle-rb/dotenv-merge
733
+ [👽oss-helpi]: https://www.codetriage.com/kettle-rb/dotenv-merge/badges/users.svg
734
+ [👽version]: https://bestgems.org/gems/dotenv-merge
735
+ [👽versioni]: https://img.shields.io/gem/v/dotenv-merge.svg
736
+ [🏀qlty-mnt]: https://qlty.sh/gh/kettle-rb/projects/dotenv-merge
737
+ [🏀qlty-mnti]: https://qlty.sh/gh/kettle-rb/projects/dotenv-merge/maintainability.svg
738
+ [🏀qlty-cov]: https://qlty.sh/gh/kettle-rb/projects/dotenv-merge/metrics/code?sort=coverageRating
739
+ [🏀qlty-covi]: https://qlty.sh/gh/kettle-rb/projects/dotenv-merge/coverage.svg
740
+ [🏀codecov]: https://codecov.io/gh/kettle-rb/dotenv-merge
741
+ [🏀codecovi]: https://codecov.io/gh/kettle-rb/dotenv-merge/graph/badge.svg
742
+ [🏀coveralls]: https://coveralls.io/github/kettle-rb/dotenv-merge?branch=main
743
+ [🏀coveralls-img]: https://coveralls.io/repos/github/kettle-rb/dotenv-merge/badge.svg?branch=main
744
+ [🖐codeQL]: https://github.com/kettle-rb/dotenv-merge/security/code-scanning
745
+ [🖐codeQL-img]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/codeql-analysis.yml/badge.svg
746
+ [🚎2-cov-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/coverage.yml
747
+ [🚎2-cov-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/coverage.yml/badge.svg
748
+ [🚎3-hd-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/heads.yml
749
+ [🚎3-hd-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/heads.yml/badge.svg
750
+ [🚎5-st-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/style.yml
751
+ [🚎5-st-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/style.yml/badge.svg
752
+ [🚎6-s-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/supported.yml
753
+ [🚎6-s-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/supported.yml/badge.svg
754
+ [🚎9-t-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/truffle.yml
755
+ [🚎9-t-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/truffle.yml/badge.svg
756
+ [🚎11-c-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/current.yml
757
+ [🚎11-c-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/current.yml/badge.svg
758
+ [🚎12-crh-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/dep-heads.yml
759
+ [🚎12-crh-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/dep-heads.yml/badge.svg
760
+ [🚎13-🔒️-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/locked_deps.yml
761
+ [🚎13-🔒️-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/locked_deps.yml/badge.svg
762
+ [🚎14-🔓️-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/unlocked_deps.yml
763
+ [🚎14-🔓️-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/unlocked_deps.yml/badge.svg
764
+ [🚎15-🪪-wf]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/license-eye.yml
765
+ [🚎15-🪪-wfi]: https://github.com/kettle-rb/dotenv-merge/actions/workflows/license-eye.yml/badge.svg
766
+ [💎ruby-3.2i]: https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white
767
+ [💎ruby-3.3i]: https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white
768
+ [💎ruby-c-i]: https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green
769
+ [💎ruby-headi]: https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue
770
+ [💎truby-23.1i]: https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink
771
+ [💎truby-c-i]: https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green
772
+ [💎truby-headi]: https://img.shields.io/badge/Truffle_Ruby-HEAD-34BCB1?style=for-the-badge&logo=ruby&logoColor=blue
773
+ [💎jruby-c-i]: https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green
774
+ [💎jruby-headi]: https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue
775
+ [🤝gh-issues]: https://github.com/kettle-rb/dotenv-merge/issues
776
+ [🤝gh-pulls]: https://github.com/kettle-rb/dotenv-merge/pulls
777
+ [🤝gl-issues]: https://gitlab.com/kettle-rb/dotenv-merge/-/issues
778
+ [🤝gl-pulls]: https://gitlab.com/kettle-rb/dotenv-merge/-/merge_requests
779
+ [🤝cb-issues]: https://codeberg.org/kettle-rb/dotenv-merge/issues
780
+ [🤝cb-pulls]: https://codeberg.org/kettle-rb/dotenv-merge/pulls
781
+ [🤝cb-donate]: https://donate.codeberg.org/
782
+ [🤝contributing]: CONTRIBUTING.md
783
+ [🏀codecov-g]: https://codecov.io/gh/kettle-rb/dotenv-merge/graphs/tree.svg
784
+ [🖐contrib-rocks]: https://contrib.rocks
785
+ [🖐contributors]: https://github.com/kettle-rb/dotenv-merge/graphs/contributors
786
+ [🖐contributors-img]: https://contrib.rocks/image?repo=kettle-rb/dotenv-merge
787
+ [🚎contributors-gl]: https://gitlab.com/kettle-rb/dotenv-merge/-/graphs/main
788
+ [🪇conduct]: CODE_OF_CONDUCT.md
789
+ [🪇conduct-img]: https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg
790
+ [📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
791
+ [📌semver]: https://semver.org/spec/v2.0.0.html
792
+ [📌semver-img]: https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat
793
+ [📌semver-breaking]: https://github.com/semver/semver/issues/716#issuecomment-869336139
794
+ [📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
795
+ [📌changelog]: CHANGELOG.md
796
+ [📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
797
+ [📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat
798
+ [📌gitmoji]: https://gitmoji.dev
799
+ [📌gitmoji-img]: https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square
800
+ [🧮kloc]: https://www.youtube.com/watch?v=dQw4w9WgXcQ
801
+ [🧮kloc-img]: https://img.shields.io/badge/KLOC-0.326-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue
802
+ [🔐security]: SECURITY.md
803
+ [🔐security-img]: https://img.shields.io/badge/security-policy-259D6C.svg?style=flat
804
+ [📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
805
+ [📄license]: LICENSE.txt
806
+ [📄license-ref]: https://opensource.org/licenses/MIT
807
+ [📄license-img]: https://img.shields.io/badge/License-MIT-259D6C.svg
808
+ [📄license-compat]: https://dev.to/galtzo/how-to-check-license-compatibility-41h0
809
+ [📄license-compat-img]: https://img.shields.io/badge/Apache_Compatible:_Category_A-%E2%9C%93-259D6C.svg?style=flat&logo=Apache
810
+ [📄ilo-declaration]: https://www.ilo.org/declaration/lang--en/index.htm
811
+ [📄ilo-declaration-img]: https://img.shields.io/badge/ILO_Fundamental_Principles-✓-259D6C.svg?style=flat
812
+ [🚎yard-current]: http://rubydoc.info/gems/dotenv-merge
813
+ [🚎yard-head]: https://dotenv-merge.galtzo.com
814
+ [💎stone_checksums]: https://github.com/galtzo-floss/stone_checksums
815
+ [💎SHA_checksums]: https://gitlab.com/kettle-rb/dotenv-merge/-/tree/main/checksums
816
+ [💎rlts]: https://github.com/rubocop-lts/rubocop-lts
817
+ [💎rlts-img]: https://img.shields.io/badge/code_style_&_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white
818
+ [💎appraisal2]: https://github.com/appraisal-rb/appraisal2
819
+ [💎appraisal2-img]: https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white
820
+ [💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/