-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add ability to customize AppVersionCheck #168
Conversation
@rmm5t This is an awesome idea! Thanks for contributing it. I have a few inline concerns that I'll add in review. But the idea is solid and we've been talking about something like this for awhile and never got around to implementing it. |
# file - The path of the version file to check | ||
# env - The key in ENV to check for a revision SHA | ||
# transform - The block to optionally transform the version string | ||
def initialize(file = "REVISION", env = "SHA", &transform) |
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.
I think I'd rather use keyword arguments for this. That way the position of the argument or their existence doesn't matter. Like this:
def initialize(file = "REVISION", env = "SHA", &transform) | |
def initialize(file: "REVISION", env: "SHA", &transform) |
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.
@andrewschaar Agreed on the keyword args. I would have actually done that from the get-go, but it didn't look like any existing checks used them. I'll switch.
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.
Switched to keyword args. Let me know if you'd like any other modifications. Thanks.
41c0bff
to
034cfa1
Compare
Thanks! |
1.18.4 is out with this improvement! |
What does it do?
file
,env
, andtransform
arguments.Related Issues