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

RSS

ruby_rvm (6) Versions 0.4.3

Installs/Configures rvm

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ruby_rvm', '= 0.4.3'
cookbook 'ruby_rvm', '= 0.4.3', :supermarket
knife cookbook site install ruby_rvm
knife cookbook site download ruby_rvm
README
Dependencies
Quality

Alternative LWRP's based rvm cookbook

Inspired by RVM cookbook by fnichol

Build Status

LWRP's

ruby_rvm 'ubuntu' do
   action :install
end

ruby_rvm_ruby 'ubuntu:ruby:1.9.3' do
  version '1.9.3'
  patch 'falcon'
  default true
  action :install
end

ruby_rvm_gemset 'ubuntu:gemset:1.9.3:test' do
   ruby_string '1.9.3@test'
   user 'ubuntu'
   action :create
end

ruby_rvm_gem 'ubuntu:unicorn' do
   gem 'unicorn'
   user 'ubuntu'
   ruby_string '1.9.3@test'
   action :install
end

Execute

Execute scripts in rvm environment. All resources worked like native resources but guards inherit environment from resource by default.

ruby_rvm_execute 'bundle install' do
  ruby_string '2.0.0'
  user 'ubuntu'
  cwd '/home/ubuntu/test'
  command 'bundle install'
  not_if 'bundle check'
  action :run
end

ruby_rvm_script 'bundle_install_sh' do
  interpreter 'sh'
  ruby_string '2.0.0'
  user 'ubuntu'
  cwd '/home/ubuntu/test'
  code <<CODE
    bundle install
CODE
  not_if 'bundle check'
  action :run
end

ruby_rvm_bash 'bundle_install' do
   ruby_string '2.0.0'
   user 'ubuntu'
   cwd '/home/ubuntu/test'
   code <<CODE
      bundle install
CODE
  action :run
  not_if 'bundle check'
end

Attributes

  # Options for .rvmrc
  node['rvm']['rvmrc'] = {
    'rvm_gem_options' => '--no-rdoc --no-ri',
    'rvm_autoupdate_flag' => 0
  }

  # User installations

  node['rvm'] = {
    users: {
      ubuntu: {
        rubies: {
          '1.9.3' => {action: 'install', patch: 'falcon'},
          '2.0' => 'install',
        },
        gems: {
          '1.9.3@test' => %w(eye unicorn),
          '1.9.3@test2' => [
            {gem: 'eye', version: '0.6', action: 'install'},
            'unicorn'
          ],
          '1.9.3@test3' => 'unicorn',
        },
        wrappers:
          {
            :'1.9.3@test' => {
              bootup: [
                {
                  binary: 'eye',
                  action: 'update'
                }
              ]
            },
            :'1.9.3@test2' => {
              bootup: %w(eye unicorn)
            },
            :'1.9.3@test3' => {
              bootup: 'unicorn'
            }
          }
      }
    }
  }

Recipes

recipe[ruby_rvm::default] # Full installations
recipe[ruby_rvm::packages] # Required packages
recipe[ruby_rvm::rvm]
recipe[ruby_rvm::rubies]
recipe[ruby_rvm::gems]
recipe[ruby_rvm::wrappers]

Author

Nikolay Murga

Foodcritic Metric
            

0.4.3 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/bb25e2648dd2673dd596c8d7/ruby_rvm/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/bb25e2648dd2673dd596c8d7/ruby_rvm/metadata.rb:1