From d7c91354736d97e50618021cbb725ca2dd645976 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 27 Jul 2022 10:02:02 -0400 Subject: [PATCH 1/5] Continue to support EOL'd Ruby versions (sigh) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 840c5166..3d661b6d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - ruby: ['2.7', '3.0', '3.1', '3.2'] + ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2'] steps: - name: Check out repository code uses: actions/checkout@v3 From 0974810e909076cc34d5579ac119c9422e5f64b1 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 27 Jul 2022 10:04:13 -0400 Subject: [PATCH 2/5] Avoid newer ruby range syntax --- lib/dotenv/parser.rb | 2 +- lib/dotenv/substitutions/command.rb | 2 +- lib/dotenv/substitutions/variable.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dotenv/parser.rb b/lib/dotenv/parser.rb index b4bfa320..d2c8028f 100644 --- a/lib/dotenv/parser.rb +++ b/lib/dotenv/parser.rb @@ -84,7 +84,7 @@ def expand_newlines(value) end def variable_not_set?(line) - !line.split[1..].all? { |var| @hash.member?(var) } + !line.split[1..-1].all? { |var| @hash.member?(var) } end def unescape_value(value, maybe_quote) diff --git a/lib/dotenv/substitutions/command.rb b/lib/dotenv/substitutions/command.rb index 8b70692e..724f87d2 100644 --- a/lib/dotenv/substitutions/command.rb +++ b/lib/dotenv/substitutions/command.rb @@ -28,7 +28,7 @@ def call(value, _env, _is_load) if $LAST_MATCH_INFO[:backslash] # Command is escaped, don't replace it. - $LAST_MATCH_INFO[0][1..] + $LAST_MATCH_INFO[0][1..-1] else # Execute the command and return the value `#{command}`.chomp diff --git a/lib/dotenv/substitutions/variable.rb b/lib/dotenv/substitutions/variable.rb index 988c045f..4dba441e 100644 --- a/lib/dotenv/substitutions/variable.rb +++ b/lib/dotenv/substitutions/variable.rb @@ -30,7 +30,7 @@ def call(value, env, is_load) def substitute(match, variable, env) if match[1] == "\\" - variable[1..] + variable[1..-1] elsif match[3] env.fetch(match[3], "") else From 4c3e28c0c6238cb2ba980c1ec9a5676be468740b Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 27 Jul 2022 10:06:16 -0400 Subject: [PATCH 3/5] Specify ruby_version in .standard.yml --- .standard.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .standard.yml diff --git a/.standard.yml b/.standard.yml new file mode 100644 index 00000000..33ea7aef --- /dev/null +++ b/.standard.yml @@ -0,0 +1 @@ +ruby_version: 2.5 From 7712533f23527edd8d64ab5b25d063caee12a304 Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 27 Jul 2022 10:26:53 -0400 Subject: [PATCH 4/5] Disable rule that fails on Ruby 2.5 --- .standard.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.standard.yml b/.standard.yml index 33ea7aef..7a9789d0 100644 --- a/.standard.yml +++ b/.standard.yml @@ -1 +1,5 @@ ruby_version: 2.5 + +ignore: + - lib/dotenv/parser.rb: + - Lint/InheritException From 93a3b0fdfd265ed9255d3df3109c9afdf0bfbaba Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Wed, 27 Jul 2022 10:35:23 -0400 Subject: [PATCH 5/5] Prepare for 2.8.1 release --- Changelog.md | 6 +++++- lib/dotenv/version.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 772d8f9e..d9e371b0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ # Changelog -[Unreleased changes](https://github.com/bkeepers/dotenv/compare/v2.8.0...master) +[Unreleased changes](https://github.com/bkeepers/dotenv/compare/v2.8.1...master) + +## 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] ## 2.8.0 - July 26, 2022 diff --git a/lib/dotenv/version.rb b/lib/dotenv/version.rb index e9d63061..dbb95d01 100644 --- a/lib/dotenv/version.rb +++ b/lib/dotenv/version.rb @@ -1,3 +1,3 @@ module Dotenv - VERSION = "2.8.0".freeze + VERSION = "2.8.1".freeze end