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

RSS

chruby_install (1) Versions 0.1.1

Install chruby

Policyfile
Berkshelf
Knife
cookbook 'chruby_install', '~> 0.1.1', :supermarket
cookbook 'chruby_install', '~> 0.1.1'
knife supermarket install chruby_install
knife supermarket download chruby_install
README
Dependencies
Quality 33%

chruby_install cookbook

A cookbook to install chruby (https://github.com/postmodern/chruby) - a simple script to change the current Ruby.

This cookbook is an alternative to the chruby cookbook produced by my friend Stephen Nelson-Smith (@LordCope) of Atalanta Systems, which is available here: https://github.com/Atalanta/chef-chruby

I did take inspiration from the above cookbook, but this cookbook takes a slightly different approach, in that:

  • it installs from git and can be kept up-to-date

  • Although you can include it in a run list to simply install chruby, it's really intended to be used from a wrapper cookbook (such as: https://github.com/ichilton/chef_rubies) so doesn't do anything with regards to installing rubies - I prefer to use the LWRP's provided by the ruby-build or ruby_install cookbooks for this, like my wrapper cookbook (https://github.com/ichilton/chef_rubies) does:

  • it doesn't use the ark cookbook so doesn't result in /usr/local/chruby-1 and a /usr/local/chruby symlink.

  • default to no default ruby

  • allows adding the chef embedded ruby to be optional

  • ensures the auto selection script (auto.sh) is loaded after selecting a default ruby, so the default ruby does not override the version in .ruby-install

Thanks to Fletcher Nicol (@fnicol) for inspiration on using the git repo as per the ruby-build cookbook.

TODO: Add tests

Requirements

There is a single dependency - the build_essential cookbook (https://github.com/opscode-cookbooks/build-essential).

It also ensures git is installed from the distribution packages.

Note that as mentioned above, this cookbook doesn't handle installing rubies so you need to use ruby_install (https://github.com/postmodern/ruby-install), ruby-build (https://github.com/sstephenson/ruby-build), the cookbooks for them as mentioned above or another method to get your required rubies into /opt/rubies or ~/.rubies.

Only currently tested on Ubuntu 12.04!

Usage

Override any attributes required (see: attributes/default.rb) and either include chruby_install in your run list or include_recipe 'chruby_install' in your recipe.

Attributes

node[:chruby_install][:git_url] - The url of the git repository for chruby (defaults to: https://github.com/postmodern/chruby.git)

node[:chruby_install][:git_ref] - The git ref (branch, tag or commit) to use (defaults to: master)

node[:chruby_install][:auto_upgrade] - A boolean specifying whether chruby should just be installed (false) or kept up-to-date (true). The default is: false.

node[:chruby_install][:git_packages] - A list of packages to install for git. This defaults to 'git' or 'git-core', depending on the OS.

node[:chruby_install][:use_embedded] - Add the ruby that is installed by the chef omnibus installer to the list of available rubies (defaults to: false)

node[:chruby_install][:use_rvm] - Add any rubies installed by rvm to the list of available rubies (defaults to: false)

node[:chruby_install][:use_rbenv] - Add any rubies installed by rbenv to the list of available rubies (defaults to: false)

node[:chruby_install][:use_rbfu] - Add any rubies installed by rbfu to the list of available rubies (defaults to: false)

node[:chruby_install][:default_ruby] - Automatically switch to a specified ruby when logging in. The default is: false.

node[:chruby_install][:auto] - Automatically switch to the ruby specified in a .ruby-version file. The default is: true.

Recipes

default - installs chruby

Author

Author:: Ian Chilton (ian@ichilton.co.uk)

Dependent cookbooks

build-essential >= 0.0.0

Contingent cookbooks

rubies Applicable Versions

Collaborator Number Metric
            

0.1.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.1 failed this metric

FC043: Prefer new notification syntax: chruby_install/recipes/default.rb:27
FC064: Ensure issues_url is set in metadata: chruby_install/metadata.rb:1
FC065: Ensure source_url is set in metadata: chruby_install/metadata.rb:1
FC066: Ensure chef_version is set in metadata: chruby_install/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: chruby_install/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: chruby_install/recipes/default.rb:6
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.1 passed this metric

Testing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.1 passed this metric