-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Naming convention for supermarket #3
Comments
👍 |
honestly, I'd rather our mongodb replaced the existing mongodb cookbook. I'll bug @jamesonjlee to see if he can get us added to the existing one. For situations where we can't get the un-namespaced spot, 👍 to brigade-foo |
Ok @josephholsten let's give it some time to see if we can get the original name 👍 |
@josephholsten Do we have any news ? |
@luishdez sorry, I heard back from @jamesonjlee and he doesn't have access. I'll bug @thekorn and @edelight. Until then, let's proceed with |
I think it would be better to use an underscore in the prefix: I propose this because using dashes gives problems when making ChefSpec tests: https://github.com/sethvargo/chefspec#testing-lwrps
|
@zuazo and that's why I'm glad to have a community of smart folks about. |
Indeed. @zuazo great catch. I prefer to have hyphens instead of underscores in repository names, but for consistency's sake underscores are perfectly fine IMO. I also like the |
Could someone start a recommendations doc? I've started a template in https://github.com/chef-brigade/cookbook-skeleton, but that's not really where we want guidance for this sort of thing. |
Mmmm… I do prefer dashes as well, actually I kinda hate underscores 😄 I haven't use chefSpec that much so I can't tell, but are we using chef spec in all the repos? If this causes a problem that can not be avoided with good coding style practices I'm fine then. It's not the most important thing but I think that naming is not trivial For example with underscores the name is treated as a one word for SEO purposes. In the title h1 and URLs that gives good hints for SEO… If someone searches for Though there is no much competition so it's not a big problem… but I think the "{resource}-cookbook" pattern is the best approach for this. |
ChefSpec is an essential tool IMO. Can you name the cookbook with an underscore and still name the repo with a dash, use alternative characters in the README, etc. to get around SEO issues? |
Dashes are a bad option for any ruby code: % pry
[1] pry(main)> def foo-bar(thing)
SyntaxError: unexpected '-', expecting ';' or '\n'
def foo-bar(thing)
^
[1] pry(main)> def foo_bar(thing)
[1] pry(main)* end
=> :foo_bar
We've generally stamped out all those bugs that we know of, but its still considered best practice to use underscores instead of dashes in cookbooks to avoid any future issues. The issue is not confined to chefspec. Its just a best practice recommended by nearly everyone who has touched chef-client core. |
also if you're really adopting the mongodb cookbook it should still be named mongodb so users can still find it and upgrade and don't have to update all their dependencies. you only need to do this when you're forking an existing cookbook, and can't adopt the cookbook from the original author. |
@lamont-granquist AFAIK we have no permissions over the original |
Do we think this is covered by https://github.com/sous-chefs/meta/blob/master/forking.md ? |
Closing as per slack discussion on #sous-chefs |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
We've adopted the mongodb cookbook that uses "mongodb" as namespace in chef supermarket. Our repo name conflicts with the old one. We need to set a new name for the supermarket.
I think we should define a naming convention for this purpose.
I would go with brigade-mongodb and follow the pattern brigade-{name} Using brigade as namespace for other cookbooks
Eg:
Similar as grunt-contrib, This will prevent any conflict with other cookbooks
Any thoughts?
The text was updated successfully, but these errors were encountered: