Skip to content

Commit

Permalink
Add missing require statements (#22)
Browse files Browse the repository at this point in the history
After merging [#20](#20) we
need to do explicit with extensions.
  • Loading branch information
waiting-for-dev authored Sep 13, 2024
1 parent 06fa189 commit 92cdde9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/dry/operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
require "zeitwerk"
require "dry/monads"
require "dry/operation/errors"
require "dry/operation/extensions/active_record"
require "dry/operation/extensions/rom"

module Dry
# DSL for chaining operations that can fail
Expand Down
2 changes: 0 additions & 2 deletions lib/dry/operation/extensions/rom.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require "dry/operation/errors"

begin
require "rom-sql"
rescue LoadError
Expand Down

2 comments on commit 92cdde9

@wuarmin
Copy link

@wuarmin wuarmin commented on 92cdde9 Sep 17, 2024

Choose a reason for hiding this comment

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

Hello @waiting-for-dev ,
this change result in a failure, when activerecord-gem is not installed. So it no longer works for Hanami 2 apps.

Dry::Operation::MissingDependencyError:
  To use the ActiveRecord extension, you first need to install the activerecord gem. Please, add it to your Gemfile and run bundle install

@waiting-for-dev
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, @wuarmin! Fixing it in #24

Please sign in to comment.