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

ruby-install (4) Versions 0.1.0

Installs postmodern's ruby-install and optionally Ruby versions.

Policyfile
Berkshelf
Knife
cookbook 'ruby-install', '= 0.1.0', :supermarket
cookbook 'ruby-install', '= 0.1.0'
knife supermarket install ruby-install
knife supermarket download ruby-install
README
Dependencies
Quality -%

ruby-install Chef cookbook

Installs postmodern's ruby-install
and optionally Ruby versions.

Dependencies

  • git

Recipes

ruby-install::default

This default recipe will install ruby-install.
Using the git_url attribute it will download a Git repository.
The git_ref will allow you to select a version.
Please select one of the tags from the
original repository.

ruby-install::install

This recipe will also use ruby-install to install rubies.
One or more can be specified using the attributes.

The same can be accomplished by using the ruby_install_ruby provider
(which this recipe uses).

The ruby_install_ruby provider accepts more
configurable options than the recipe does, so if you need any of them;
use the provider. More information in the providers section.

Attributes

All attributes are scoped within the ruby-install node attribute.
See also example below.

  • git_url - String - Optional - Default: https://github.com/postmodern/ruby-install.git
  • git_ref - String - Optional - Default: v0.3.4
  • install_path - String - Optional - Defaults to: /var/chef/cache/ruby-install
    Path to install ruby-install in.
    (Default value uses the file_cache_path attribute from Chef's config.)
  • rubies - Array - Default: []
    Each array element is a Hash with the following attributes:
    • ruby - String - Required - ruby-install specific Ruby version selector.
      Examples: ruby, ruby 2.0.0-p353 or rubinius stable.
      Keywords such as stable are supported but not recommended. See ruby_install_ruby provider for more information.
    • user - String - Optional - User for which to install the Ruby version.
      If used, make sure that the user is allowed to write in the default directories, if you use them, and if the user is allowed to allow ruby-install to install packages.
    • group - String - Optional - Group for which to install the Ruby version.
    • reinstall - Boolean - Optional - Default: false
      Set to true to reinstall the ruby.
    • gems - Array - Optional - Default: []
      Each array element is a Hash with the following attributes:
    • name - Required - Name of the gem to install.
    • version - Optional - Version of the gem to install.
    • Other gem install options are not supported by chef's gem_package.

Example:

{
  "ruby-install" => {
    git_url: "https://github.com/postmodern/ruby-install.git",
    git_ref: "v0.3.4",
    install_path: "/home/vagrant/ruby-install",
    rubies: [
      {
        ruby: "ruby 2.0.0-353",
        user: "vagrant",
        group: "vagrant",
        reinstall: true,
        gems: [
          { name: "bundler", version: "1.5.1" }
        ]
      }
    ]
  }
}

Resources and Providers

ruby_install_ruby

This provider installs rubies using ruby-install.

Actions

Install

Installs the Ruby specified using ruby-install.

Reinstall

Tells ruby-install to reinstall the ruby.

Attributes

  • ruby - String - ruby-install specific Ruby version selector.
    Examples: ruby, ruby 2.0.0-p353 or rubinius 2.1.1.
    Keywords such as stable are not recommended as their actual version change with each release.
  • gems - Array - List of gems to install.
    Each array element is a hash that specify which gems to install. See the ruby-install::install recipe for the format of each hash.
  • user - String - User for which to install the Ruby version.
  • group - String - Group for which to install the Ruby version.
  • environment - Hash - environment variables to be set.

The following are ruby-install specific options. If no value is specified
it will use the ruby-install default.

However, src_dir and install_dir are the only two exceptions to this.
See the exceptions heading under the list.

  • src_dir - String - Optional
    Directory to download source-code into.
  • install_dir - String - Optional
    Directory to install Ruby into.
  • patch - String - Optional
    Patch to apply to the Ruby source-code.
  • mirror - String - Optional
    Alternate mirror to download the Ruby archive from.
  • url - String - Optional
    Alternate URL to download the Ruby archive from.
  • md5 - String - Optional
    MD5 checksum of the Ruby archive.
  • no-download - Boolean - Optional - Default false
    Use the previously downloaded Ruby archive
  • no-verify - Boolean - Optional - Default false
    Do not verify the downloaded Ruby archive
  • no-install-deps - Boolean - Optional - Default false
    Do not install build dependencies before installing Ruby
  • no-reinstall - Boolean - Optional - Default false
    Skip installation if another Ruby is detected in same location.

Exceptions:

  • src-dir is set the the users home dir $HOME/rubies-src if user is specified.
  • install_dir is always set so that the provider can call it to install gems and update the path if specified. It will default to $HOME/.rubies/$RUBY for a user install and /opt/rubies/$RUBY for a system install. $RUBY is the ruby string you specified with the spaces replaced with dashes -.

License

This cookbook is released under the MIT License.
See the bundled LICENSE file for details.

No quality metric results found