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

Strange snaked versions of pluralized acronyms #1

Open
rowanseymour opened this issue Nov 20, 2020 · 8 comments
Open

Strange snaked versions of pluralized acronyms #1

rowanseymour opened this issue Nov 20, 2020 · 8 comments

Comments

@rowanseymour
Copy link
Member

I don't know how safe it would be to tinker with CamelToSnake now but DisallowedIPs snakes to disallowed_i_ps so the Mailroom env variable is MAILROOM_DISALLOWED_I_PS

@rowanseymour
Copy link
Member Author

Guess it's fine if we make a v2 🤷

@nicpottier
Copy link
Contributor

Heh, ya, that's a funny one. I'm not sure any strategy is always going to be right. Shouldn't that variable be DisallowedSubnets anyways? :)

@nicpottier
Copy link
Contributor

All that said, I can't really think of any other cases of plural acronyms but I suppose special casing that wouldn't be the worst thing in the world. Alternatively we could add a tag to let the user explicitly pick their snake case.

@rowanseymour
Copy link
Member Author

I think I'd lean toward a tag rather than try to be too clever... the algorithm is correct for other (contrived) examples that happen to not be acronyms.. e.g. ThingsThatIBe

DisallowedSubnets doesn't feel ideal for a list of IP addresses and IP ranges... but I'm convincing myself to rename that variable anyway because DisallowedIPs isn't very self-explanatory.

@nicpottier
Copy link
Contributor

DisallowedNetworks is maybe most correct? (with us being smart and working it you leave off the netmask?)

@rowanseymour
Copy link
Member Author

Not sure I follow what you mean by leaving off the netmask.. it's a list of IP addresses and IP blocks defined by address+mask

@nicpottier
Copy link
Contributor

I'm saying a "network" usually is IP + netmask, so while using the term network wouldn't be technically correct for IPs we could ask for forgiveness.

@rowanseymour
Copy link
Member Author

Ah ok - am gonna rename to DisallowedNetworks so we can get on with life, and if anyone is bored one day they can add support for a conf tag to specify snakification 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants