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.2.0

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

Policyfile
Berkshelf
Knife
cookbook 'ruby-install', '~> 0.2.0', :supermarket
cookbook 'ruby-install', '~> 0.2.0'
knife supermarket install ruby-install
knife supermarket download ruby-install
README
Dependencies
Quality 17%

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.4.3
  • 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.
    • md5 - String - Optional
      MD5 checksum of the Ruby archive.
    • sha1 - String - Optional
      SHA1 checksum of the Ruby archive.
    • sha256 - String - Optional
      SHA256 checksum of the Ruby archive.
    • sha512 - String - Optional
      SHA512 checksum of the Ruby archive.
    • 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.4.3",
    install_path: "/home/vagrant/ruby-install",
    rubies: [
      {
        ruby: "ruby 2.0.0-p451",
        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.
  • sha1 - String - Optional
    SHA1 checksum of the Ruby archive.
  • sha256 - String - Optional
    SHA256 checksum of the Ruby archive.
  • sha512 - String - Optional
    SHA512 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 -.

Development

Issue reports and pull requests are appreciated on
GitHub.

Releases

New releases are released with the emeril
gem on the Opscode
Community site.

License

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

Collaborator Number Metric
            

0.2.0 failed this metric

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

Contributing File Metric
            

0.2.0 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.2.0 failed this metric

FC043: Prefer new notification syntax: ruby-install/recipes/default.rb:25
FC064: Ensure issues_url is set in metadata: ruby-install/metadata.rb:1
FC065: Ensure source_url is set in metadata: ruby-install/metadata.rb:1
FC066: Ensure chef_version is set in metadata: ruby-install/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.0 passed this metric

Testing File Metric
            

0.2.0 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.2.0 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 include a tag that matches this cookbook version number