-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Take default value from a keyword argument #112
Take default value from a keyword argument #112
Conversation
9bace47
to
94029e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, @waiting-for-dev!
If you wanted to put co-author information on the commit message, that might be fun, but I'm good either way really, just happy to see the work moving forward :)
I also think the duplication of test setup for the logger is fine, this is just for deprecation messages after all, and these tests should go away in the release where we remove the deprecations.
Happy for you to merge when you're ready. Looking forward to figuring out a release plan from here!
73945a7
to
b118da0
Compare
94029e1
to
c1893ee
Compare
Thanks @timriley. I added you as a co-author 🙂 However, it seems that the tests are failing for ruby 3.0, I'll try to fix it tomorrow. |
36b90c5
to
9333ef9
Compare
From now on, the default value for a setting must be provided through the `default:` keyword argument. I.e.: ```ruby setting :db, default: 'mysql://localhost/dev' ``` Providing it as a positional argument is still supported but deprecated. Co-authored-by: Tim Riley <tim@riley.id.au>
9333ef9
to
06ab2f0
Compare
Fixed for 3.0 and merged 🚀 |
From now on, the default value for a setting must be provided through
the
default:
keyword argument. I.e.:Providing it as a positional argument is still supported but deprecated.
@timriley this is basically your code on #86 (so feel free to add you as commit author 😅 )
@solnic , continuing from #110 (comment), extracting the deprecation expectations is a bit tricky because of global state + the need to rewind IO before asserting. So I just repeated the code for now. We could just remove the expectation altogether, as it's not that important and it'll be removed when version 1.0 is released.