Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

supermarketapi Chef Tool

A ruby gem for interacting with the chef supermarket api

Install & Usage Instructions

Supermarket API

This gem is a simple and easy-to-use wrapper for Chef's Supermarket API.

Installation

Add this line to your application's Gemfile:

gem 'supermarketapi'

And then execute:

bundle install

Or install it yourself as:

gem install supermarketapi

Usage

To use the API methods, you'll need to instantiate a new client and use the API methods.

# Create a new client
client = SupermarketApi.client()

Cookbooks

cookbook

This method will return all metadata about the given cookbook in an hashie.mash

client.cookbook('apache2')

cookbook_version

This method retrieves information about the cookbook version and can be used to find the latest version of a cookbook

client.cookbook_version('apache2', 'latest')
client.cookbook_version('apache2', '7.0.0')

cookbooks

This method searches for cookbooks. It takes the following parameters:

name required type default description
:user Optional String nil this is the name of the user to search
:start Optional Integer 0 Pagination page to start on
:items Optional Integer 50 Number of items to return
:order Optional Symbol :most_followed Search method, available options are: :recently_updated, :recently_added, :most_downloaded, or :most_followed
client.cookbooks(
  :user  => 'sous-chefs',
  :start => 1,
  :items => 50,
  :order => :recently_updated,
)

Tools

tool

This method will return all metadata about the given tool in an hashie.mash

client.tool('berkshelf')

tools

This method will allow you to search for tools

client.tools(
  :query => 'berks',
  :start => 1,
  :items => 50,
)

Users

user

This method will return all metadata about the given user in an hashie.mash

client.user('sous-chefs')