You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brief Description of Feature:
We should add a Readyset.configure method that allows users to configure our gem similar to what is done here.
Background:
The typical way to configure a gem in the context of a Rails application seems to be to add a file for the gem in the config/initializers directory and then invoke GemName.configure. Readyset.configure should take a block and yield a Readyset::Configuration object to that block like so:
Readyset.configuredo |config|
config.option1= ...
config.option2= ...
end
Optional information to add
Proposed Solution:
Internally, we should define Readyset.configuration and Readyset.configure methods like so:
Readyset::Configuration should specify attr_accessors for any of the configuration options we'd like to support. We could also consider making Readyset::Configuration a module since it will only ever have one instance. I don't think we should mixin that module because I don't want Readyset to be overloaded with too much state, but we could do something like this:
ethan-readyset
changed the title
Standardize our gem's configuration interface
Add a Readyset.configure method that allows users to configure our gem
Dec 8, 2023
Brief Description of Feature:
We should add a
Readyset.configure
method that allows users to configure our gem similar to what is done here.Background:
The typical way to configure a gem in the context of a Rails application seems to be to add a file for the gem in the
config/initializers
directory and then invokeGemName.configure
.Readyset.configure
should take a block and yield aReadyset::Configuration
object to that block like so:Optional information to add
Proposed Solution:
Internally, we should define
Readyset.configuration
andReadyset.configure
methods like so:Readyset::Configuration
should specifyattr_accessors
for any of the configuration options we'd like to support. We could also consider makingReadyset::Configuration
a module since it will only ever have one instance. I don't think we should mixin that module because I don't wantReadyset
to be overloaded with too much state, but we could do something like this:The text was updated successfully, but these errors were encountered: