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

Update for latest dry-configurable setting API #44

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ source "https://rubygems.org"

gemspec

gem "dry-configurable", github: "dry-rb/dry-configurable"
gem "dry-system", github: "dry-rb/dry-system"

eval_gemfile "Gemfile.devtools"

RAILS_VERSION = (ENV["RAILS_VERSION"] || "6.0").sub("x", "0")
Expand Down
8 changes: 4 additions & 4 deletions lib/dry/rails/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Container < System::Container
#
# @api public
# @!scope class
setting :features, %i[application_contract safe_params controller_helpers], reader: true
setting :features, default: %i[application_contract safe_params controller_helpers], reader: true

# @overload config.auto_register_paths=(paths)
# Set an array of path/block pairs for auto-registration
Expand All @@ -39,7 +39,7 @@ class Container < System::Container
#
# @api public
# @!scope class
setting :auto_register_paths, [].freeze, reader: true
setting :auto_register_paths, default: [].freeze, reader: true

# @overload config.auto_inject_constant=(auto_inject_constant)
# Set a custom import constant name
Expand All @@ -48,7 +48,7 @@ class Container < System::Container
#
# @api public
# @!scope class
setting :auto_inject_constant, "Deps", reader: true
setting :auto_inject_constant, default: "Deps", reader: true

# @overload config.container_constant=(container_constant)
# Set a custom container constant
Expand All @@ -57,7 +57,7 @@ class Container < System::Container
#
# @api public
# @!scope class
setting :container_constant, "Container", reader: true
setting :container_constant, default: "Container", reader: true

# @!endgroup

Expand Down