-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 a badge for Chef cookbooks #157
Conversation
Thanks a lot for this contribution! Version information badges have traditionally been given information about the name of the corresponding package repository it is indexed in. Should I use Please tell me whether you agree with that change. Otherwise, I'll do the change, and subsequently push to production on Tuesday. I will attempt to make the use of |
Hey @espadrine! Thank you for the quick turnaround! Cookbooks are very similar to Ruby gems. "RubyGems" is the organization that hosts them, but they are called "gems". "Chef" is the organization that hosts them, but they are called "cookbooks". Since RubyGems went with "gem", I matched that and went with "cookbook". Since Chef is already it's own project, I think it would be confusing if the badge were |
@espadrine I think this is what it should be: diff --git a/server.js b/server.js
index 9e28ff7..9e1b503 100644
--- a/server.js
+++ b/server.js
@@ -824,7 +824,7 @@ cache(function(data, match, sendBadge) {
var cookbook = match[1]; // eg, chef-sugar
var format = match[2];
var apiUrl = 'https://cookbooks.opscode.com/api/v1/cookbooks/' + cookbook + '/versions/latest';
- var badgeData = getBadgeData('version', data);
+ var badgeData = getBadgeData('cookbook', data); |
I think you're the expert on this! ☺ |
@espadrine I blogged about this: https://sethvargo.com/chef-cookbook-badges/ 😄 |
Cool! I retweeted it from the Shields_io account! |
This PR adds support for Chef cookbook version badges.
@badges/owners I wasn't sure what the difference between
try.html
andindex.html
were, so I updated both. Please let me know what you need from me.