Skip to content

Commit

Permalink
Draft of changelog for 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 25, 2024
1 parent c499196 commit 493681e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

[Unreleased changes](https://github.com/bkeepers/dotenv/compare/v2.8.1...main)

## 3.0.0

**Breaking Changes**

* Ruby >= 3.0 and Rails >= 6.1 are now required. Lock dotenv to `~> 2.0` if you are using an outdated Ruby or Rails version. https://github.com/bkeepers/dotenv/pull/466, https://github.com/bkeepers/dotenv/pull/471
* `\n` is no longer expanded into a newline in quoted strings. Use multi-line strings with real line breaks, or set `DOTENV_LINEBREAK_MODE=legacy` to preserve the old behavior. @nitsujri https://github.com/bkeepers/dotenv/pull/423
* `ENV` will be [automatically restored between tests](https://github.com/bkeepers/dotenv#autorestore-in-tests) (`ActiveSupport::TestCase` and `Rspec`). https://github.com/bkeepers/dotenv/pull/472, https://github.com/bkeepers/dotenv/pull/475
* Fixed precedence when using `Dotenv::Rails.overload`. So now `.env.development.local` will overwrite `.env.local`, which will overwrite `.env.development`, which will overwrite `.env`. @eriklovmo - https://github.com/bkeepers/dotenv/pull/460
* The instrumentation event `dotenv.load` has been renamed to `load.dotenv` to properly make use of namespaces in [ActiveSupport::Notifications](https://guides.rubyonrails.org/active_support_instrumentation.html) https://github.com/bkeepers/dotenv/pull/472

This comment has been minimized.

Copy link
@runephilosof-abtion

runephilosof-abtion Jun 6, 2024

This pull request is where dotenv.load was introduced, not the one where it was renamed. It should be #473

The guide link could be https://guides.rubyonrails.org/v7.0/active_support_instrumentation.html#creating-custom-events instead

This comment has been minimized.

Copy link
@bkeepers

bkeepers Jun 6, 2024

Author Owner

Thanks, fixed in 0bdca7b


**Other improvements**

* All changes to ENV will be logged in Rails apps. https://github.com/bkeepers/dotenv/pull/473
* Fixed an issue where `rake` loaded development files (`.env*development`) for test-related tasks. https://github.com/bkeepers/dotenv/pull/470
* Add `-i`/`--ignore` option to `dotenv` CLI to optionally ignore missing files. @stevenharman https://github.com/bkeepers/dotenv/pull/463
* You can [customize which files get loaded](https://github.com/bkeepers/dotenv#customizing-rails) by setting `Dotenv::Rails.files`. https://github.com/bkeepers/dotenv/pull/468

**Deprecations**
* The `dotenv-rails` gem is now superfluous. It's not technically deprecated yet and will continue to work, but the `dotenv` gem does the same thing. https://github.com/bkeepers/dotenv/pull/468
* `Dotenv::Railtie` has been deprecated. Use `Dotenv::Rails`. https://github.com/bkeepers/dotenv/pull/468
* `Dotenv.overload` has been replaced with `overwrite`. `overload` will still work and is not technically deprecated, but documentation refers to `Dotenv.overwrite` now. https://github.com/bkeepers/dotenv/pull/469

**New Contributors**
* @stevenharman made their first contribution in https://github.com/bkeepers/dotenv/pull/463
* @eriklovmo made their first contribution in https://github.com/bkeepers/dotenv/pull/460
* @nitsujri made their first contribution in https://github.com/bkeepers/dotenv/pull/423

**Full Changelog**: https://github.com/bkeepers/dotenv/compare/v2.8.1...v3.0.0

## 2.8.1 - July 27, 2022

* Restore support for EOL'd Ruby versions (2.5, 2.6) (#458)[https://github.com/bkeepers/dotenv/pull/458]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ To disable this behavior, set `config.dotenv.autorestore = false` in `config/app

To use this behavior outside of a Rails app, just `require "dotenv/autorestore"` in your test suite.

See [`Dotenv.save`](https://rubydoc.info/github/bkeepers/dotenv/main/Dotenv:save), [Dotenv.restore](https://rubydoc.info/github/bkeepers/dotenv/main/Dotenv:restore), and [`Dotenv.modify(hash) { ... }`](https://rubydoc.info/github/bkeepers/dotenv/main/Dotenv:modify) for manual usage.

### Rake

To ensure `.env` is loaded in rake, load the tasks:
Expand Down

0 comments on commit 493681e

Please sign in to comment.