Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dotenv #70

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.9.0] - 2024-03-12

- Eliminate the dependency on `dotenv`. However, the application will still load `dotenv` if it is available.

## [1.4.0] - 2020-04-18

- Introduce server middlewares (#31)
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
PATH
remote: .
specs:
eventboss (1.8.1)
eventboss (1.9.0)
aws-sdk-sns (>= 1.1.0)
aws-sdk-sqs (>= 1.3.0)
dotenv (~> 2.1, >= 2.1.1)
rexml (~> 3.0)

GEM
remote: https://rubygems.org/
specs:
aws-eventstream (1.3.0)
aws-partitions (1.894.0)
aws-partitions (1.896.0)
aws-sdk-core (3.191.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
Expand All @@ -26,7 +25,7 @@ GEM
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
diff-lcs (1.5.0)
dotenv (2.8.1)
dotenv (3.1.0)
jmespath (1.6.2)
rake (13.0.6)
rexml (3.2.6)
Expand All @@ -49,6 +48,7 @@ PLATFORMS

DEPENDENCIES
bundler (>= 1)
dotenv (~> 3.1)
eventboss!
rake (>= 10.0)
rspec (~> 3.0)
Expand Down
2 changes: 1 addition & 1 deletion eventboss.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Gem::Specification.new do |spec|

spec.add_dependency "aws-sdk-sqs", ">= 1.3.0"
spec.add_dependency "aws-sdk-sns", ">= 1.1.0"
spec.add_dependency "dotenv", "~> 2.1", ">= 2.1.1"
spec.add_dependency "rexml", "~> 3.0"

spec.add_development_dependency "dotenv", "~> 3.1"
spec.add_development_dependency "bundler", ">= 1"
spec.add_development_dependency 'rake', '>= 10.0'
spec.add_development_dependency "rspec", "~> 3.0"
Expand Down
2 changes: 1 addition & 1 deletion lib/eventboss/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def run
private

def boot_system
Dotenv.load
Dotenv.load if defined?(Dotenv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I see in dotenv change log 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. is the most breaking change. There might be a lot of apps with older Rails. I think that other than that it will be safe to keep the dotenv dependency, but without specifying the version. Thanks to that we can avoid using if defined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the most breaking change is if an app do not had dotenv as direct dependency, then dotenv will be removed durning upgrade of eventboss.

lock dotenv to ~> 2.0 if you are using an outdated Ruby or Rails version.

If an app uses Rails 6.1 then it won't be using the newest version of dotenv anyway, and official support for Rails 6.0 ended 9 months ago.

it will be safe to keep the dotenv dependency

Sure. I think it can be easier to push


require 'rails'
if ::Rails::VERSION::MAJOR < 4
Expand Down
2 changes: 1 addition & 1 deletion lib/eventboss/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Eventboss
VERSION = "1.8.1"
VERSION = "1.9.0"
end
Loading