-
Notifications
You must be signed in to change notification settings - Fork 5
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
Method naming conventions #61
Conversation
Typo here |
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.
This is a really, really big breaking change. I see a very high risk for users not updating the gem because of this.
What about keeping the old methods (using alias) and deprecating them at first?
On one hand, it's not more breaking than the changes already in master, and on the other hand there is about 3k downloads for the gem for 2023, which is pretty low. With a high adoption rate, your suggestion would make a lot of sense, but in the current context, I'd be surprised if besides us, there were more than 10 persones/teams actively relying on the gem |
Introduce helper scripts, then rename methods to use consistent names:
list
for fetching a collection of resources. Example:keys.list
find
for fetching a singular resource. Example:keys.find(id: 'key')
create
for creating a resource. Example:keys.create(name: 'key')
update
for updating a resource. Example:keys.update(id: 'key', name: 'new-key')
delete
for deleting a resource. Example:keys.delete(id: 'key')
(this will end up in the readme, yep)
Related resources (eg:
containers.sizes
,addons.categories
,repo_link.branches
) stay the same for now, but they might be renamed/moved around too later.Specs are adapted. Some aliases are removed, and there's a specific case for events for which URI templates are not well adapted: if there's an app_id supplied, we need to prefix it with
/apps
, but adding a static part if a variable is expanded doesn't seem to be possible.