Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bkeepers/dotenv
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.8.1
Choose a base ref
...
head repository: bkeepers/dotenv
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.0
Choose a head ref

Commits on Jan 28, 2021

  1. Copy the full SHA
    da92d8b View commit details

Commits on Apr 1, 2022

  1. Copy the full SHA
    7d79f66 View commit details

Commits on Aug 11, 2022

  1. Copy the full SHA
    fef9939 View commit details

Commits on May 26, 2023

  1. Copy the full SHA
    9bb5db9 View commit details
  2. Optionally ignore missing files from CLI

    This is particularly useful for wrapper scripts (like a `bin/dev`
    https://stevenharman.net/bin-dev-for-heroku-local) trying to mimic
    `dotenv-rails`'s ordered loading of multiple files.
    stevenharman committed May 26, 2023
    Copy the full SHA
    075e043 View commit details

Commits on Jun 15, 2023

  1. Appease Standard.rb

    Use parentheses for ternary expressions with complex conditions.
    
    NOTE: I didn't change these lines, but I think an update to Standard is
    catching these lingering lint violations?
    stevenharman committed Jun 15, 2023
    Copy the full SHA
    1a880cd View commit details

Commits on Jan 20, 2024

  1. Copy the full SHA
    4b6e522 View commit details
  2. Fix lint errors

    bkeepers committed Jan 20, 2024
    Copy the full SHA
    10081be View commit details
  3. Copy the full SHA
    e0463a2 View commit details
  4. Merge pull request #466 from bkeepers/ruby-3.3

    Add Ruby 3.3 to build matrix
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    0444545 View commit details
  5. Bump actions/checkout from 3 to 4

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 20, 2024
    Copy the full SHA
    7230c4f View commit details
  6. Merge remote-tracking branch 'origin/master' into optionally_ignore_m…

    …issing_files_from_cli
    
    * origin/master:
      Remove EOL Ruby versions from build matrix (2.5, 2.6, 2.7)
      Fix lint errors
      Add Ruby 3.3 to the build matrix
    bkeepers committed Jan 20, 2024
    Copy the full SHA
    5075257 View commit details
  7. Merge pull request #464 from bkeepers/dependabot/github_actions/actio…

    …ns/checkout-4
    
    Bump actions/checkout from 3 to 4
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    aa4d5d7 View commit details
  8. Copy the full SHA
    fd0f664 View commit details
  9. Merge pull request #463 from stevenharman/optionally_ignore_missing_f…

    …iles_from_cli
    
    Optionally ignore missing files from cli
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    e455753 View commit details
  10. Merge remote-tracking branch 'origin/master' into respect-file-priori…

    …ty-policy-when-overloading
    
    * origin/master:
      Tweak logic for deciding which method to load
      Bump actions/checkout from 3 to 4
      Remove EOL Ruby versions from build matrix (2.5, 2.6, 2.7)
      Fix lint errors
      Add Ruby 3.3 to the build matrix
      Appease Standard.rb
      Optionally ignore missing files from CLI
      Use console syntax highlights for console commands
    bkeepers committed Jan 20, 2024
    Copy the full SHA
    29c9232 View commit details
  11. Merge pull request #460 from eriklovmo/respect-file-priority-policy-w…

    …hen-overloading
    
    fix: always respect file importance order
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    32c521b View commit details
  12. Merge remote-tracking branch 'origin/master' into jenfi-eng/master

    * origin/master: (29 commits)
      Tweak logic for deciding which method to load
      Bump actions/checkout from 3 to 4
      Remove EOL Ruby versions from build matrix (2.5, 2.6, 2.7)
      Fix lint errors
      Add Ruby 3.3 to the build matrix
      Appease Standard.rb
      Optionally ignore missing files from CLI
      Use console syntax highlights for console commands
      fix: always respect file importance order
      Prepare for 2.8.1 release
      Disable rule that fails on Ruby 2.5
      Specify ruby_version in .standard.yml
      Avoid newer ruby range syntax
      Continue to support EOL'd Ruby versions (sigh)
      Prepare for 2.8.0 release
      Remove unnecessary method
      CL < OptionParser to simplify setup more
      Simplify CLI setup
      Update ruby action
      Update Ruby version matrix
      ...
    bkeepers committed Jan 20, 2024
    Copy the full SHA
    c95f516 View commit details
  13. Copy the full SHA
    e68028c View commit details
  14. Copy the full SHA
    0009fe1 View commit details
  15. Copy the full SHA
    136696f View commit details
  16. Copy the full SHA
    43ff6ee View commit details
  17. Copy the full SHA
    8fcb8a6 View commit details
  18. Avoid modifying Rails.env

    bkeepers committed Jan 20, 2024
    Copy the full SHA
    ce2018f View commit details
  19. Copy the full SHA
    f052339 View commit details
  20. Refactor Rails integration

    bkeepers committed Jan 20, 2024
    Copy the full SHA
    6ed39f3 View commit details
  21. Copy the full SHA
    ee55464 View commit details
  22. Copy the full SHA
    706b32a View commit details
  23. Update and reorganize README

    bkeepers committed Jan 20, 2024
    Copy the full SHA
    1350739 View commit details
  24. Remove instance after test

    bkeepers committed Jan 20, 2024
    Copy the full SHA
    870b883 View commit details
  25. Copy the full SHA
    b8275a0 View commit details
  26. Merge pull request #467 from bkeepers/refactor

    Refactor `Dotenv.load` and friends
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    503bc66 View commit details
  27. Merge pull request #468 from bkeepers/refactor-rails

    Include Rails integration in `dotenv` gem and refactor
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    d159398 View commit details
  28. Merge pull request #469 from bkeepers/overwrite

    Consistently use "overwrite" in place of "overload" and "override"
    bkeepers authored Jan 20, 2024
    Copy the full SHA
    2202e3e View commit details

Commits on Jan 21, 2024

  1. Copy the full SHA
    a9a9335 View commit details
  2. Copy the full SHA
    832ebbc View commit details
  3. Merge pull request #470 from bkeepers/rake-test-rails-env

    Rake test rails env
    bkeepers authored Jan 21, 2024
    Copy the full SHA
    9107dc2 View commit details
  4. Copy the full SHA
    927e865 View commit details
  5. Copy the full SHA
    cfc706f View commit details
  6. Copy the full SHA
    2956a2d View commit details
  7. Copy the full SHA
    12a4b50 View commit details
  8. Call super() in subclasses

    bkeepers committed Jan 21, 2024
    Copy the full SHA
    f47d226 View commit details
  9. Merge pull request #471 from bkeepers/rails-improvements

    Require Ruby 3.0 and Rails 7.1
    bkeepers authored Jan 21, 2024
    Copy the full SHA
    cb172bf View commit details
  10. Copy the full SHA
    6416aa5 View commit details

Commits on Jan 22, 2024

  1. Fix lint error

    bkeepers committed Jan 22, 2024
    Copy the full SHA
    73d0512 View commit details

Commits on Jan 23, 2024

  1. Copy the full SHA
    e480e21 View commit details
  2. Fix specs for Rails 7.0

    bkeepers committed Jan 23, 2024
    Copy the full SHA
    7f3640c View commit details
  3. Fix tests for Rails 6.1

    bkeepers committed Jan 23, 2024
    Copy the full SHA
    561c94e View commit details
  4. Log all changes to ENV

    bkeepers committed Jan 23, 2024
    Copy the full SHA
    2d080db View commit details

Commits on Jan 24, 2024

  1. Copy the full SHA
    dff63ef View commit details
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
name: CI
on:
push:
branches: [master]
branches: [main]
pull_request:
jobs:
build:
test:
name: Test on Ruby ${{ matrix.ruby }} and Rails ${{ matrix.rails }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
ruby: ['3.0', '3.1', '3.2', '3.3']
rails: ['6.1.0', '7.0.0', '7.1.0']
env:
RAILS_VERSION: ${{ matrix.rails }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Publish Gem
on: release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write # mandatory for trusted publishing
contents: write # required for `rake release` to push the release tag
steps:
- uses: actions/checkout@v3
- name: Release dotenv
uses: cadwallion/publish-rubygems-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
RELEASE_COMMAND: rake dotenv:release
- name: Release dotenv-rails
uses: cadwallion/publish-rubygems-action@master
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
RELEASE_COMMAND: rake dotenv-rails:release
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- uses: rubygems/release-gem@v1
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruby_version: 2.5
ruby_version: 3.0

ignore:
- lib/dotenv/parser.rb:
31 changes: 30 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
# Changelog

[Unreleased changes](https://github.com/bkeepers/dotenv/compare/v2.8.1...master)
[Unreleased changes](https://github.com/bkeepers/dotenv/compare/v3.0.0...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

**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

2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@ source "https://rubygems.org"
gemspec name: "dotenv"
gemspec name: "dotenv-rails"

gem "railties", "~> #{ENV["RAILS_VERSION"] || "7.1"}"

group :guard do
gem "guard-rspec"
gem "guard-bundler"
Loading