{ "name": "ruby_build", "description": "Manages the ruby-build framework and its installed rubies. A LWRP is also defined.", "long_description": "# chef-ruby_build\n\n[![Build Status](https://secure.travis-ci.org/fnichol/chef-ruby_build.png?branch=master)](http://travis-ci.org/fnichol/chef-ruby_build)\n\n## Description\n\nManages the [ruby-build][rb_site] framework and its installed Rubies.\nA lightweight resources and providers ([LWRP][lwrp]) is also defined.\n\n## Usage\n\nSimply include `recipe[ruby_build]` in your run\\_list to have ruby-build\ninstalled. You will also have access to the `ruby_build_ruby` resource. See\nthe [Resources and Providers](#lwrps) section for more details.\n\n## Requirements\n\n### Chef\n\nTested on 0.10.8 but newer and older version should work just\nfine. File an [issue][issues] if this isn't the case.\n\n### Platform\n\nThe following platforms have been tested with this cookbook, meaning that\nthe recipes and LWRPs run on these platforms without error:\n\n* ubuntu (10.04/10.10/11.04/11.10/12.04)\n* mac\\_os\\_x (10.7/10.8)\n* debian\n* freebsd\n* redhat\n* centos\n* fedora\n* amazon\n* scientific\n* suse\n\nPlease [report][issues] any additional platforms so they can be added.\n\n### Cookbooks\n\nThere are **no** external cookbook dependencies. However, if you are\ninstalling [JRuby][jruby] then a Java runtime will need to be installed.\nThe Opscode [java cookbook][java_cb] can be used on supported platforms.\n\n## Installation\n\nDepending on the situation and use case there are several ways to install\nthis cookbook. All the methods listed below assume a tagged version release\nis the target, but omit the tags to get the head of development. A valid\nChef repository structure like the [Opscode repo][chef_repo] is also assumed.\n\n### From the Opscode Community Platform\n\nTo install this cookbook from the Opscode platform, use the *knife* command:\n\n knife cookbook site install ruby_build\n\n### Using Berkshelf\n\n[Berkshelf][berkshelf] is a cookbook dependency manager and development\nworkflow assistant. To install Berkshelf:\n\n cd chef-repo\n gem install berkshelf\n berks init\n\nTo use the Community Site version:\n\n echo \"cookbook 'ruby_build'\" >> Berksfile\n berks install\n\nOr to reference the Git version:\n\n repo=\"fnichol/chef-ruby_build\"\n latest_release=$(curl -s https://api.github.com/repos/$repo/git/refs/tags \\\n | ruby -rjson -e '\n j = JSON.parse(STDIN.read);\n puts j.map { |t| t[\"ref\"].split(\"/\").last }.sort.last\n ')\n cat >> Berksfile < 'git://github.com/$repo.git', :branch => '$latest_release'\n END_OF_BERKSFILE\n\n### Using Librarian-Chef\n\n[Librarian-Chef][librarian] is a bundler for your Chef cookbooks.\nTo install Librarian-Chef:\n\n cd chef-repo\n gem install librarian\n librarian-chef init\n\nTo use the Opscode platform version:\n\n echo \"cookbook 'ruby_build'\" >> Cheffile\n librarian-chef install\n\nOr to reference the Git version:\n\n repo=\"fnichol/chef-ruby_build\"\n latest_release=$(curl -s https://api.github.com/repos/$repo/git/refs/tags \\\n | ruby -rjson -e '\n j = JSON.parse(STDIN.read);\n puts j.map { |t| t[\"ref\"].split(\"/\").last }.sort.last\n ')\n cat >> Cheffile < 'git://github.com/$repo.git', :ref => '$latest_release'\n END_OF_CHEFFILE\n librarian-chef install\n\n## Recipes\n\n### default\n\nInstalls the ruby-build codebase and initializes Chef to use the Lightweight\nResources and Providers ([LWRPs][lwrp]).\n\n## Attributes\n\n### git_url\n\nThe Git URL which is used to install ruby-build.\n\nThe default is `\"git://github.com/sstephenson/ruby-build.git\"`.\n\n### git_ref\n\nA specific Git branch/tag/reference to use when installing ruby-build. For\nexample, to pin ruby-build to a specific release:\n\n node['ruby_build']['git_ref'] = \"v20111030\"\n\nThe default is `\"master\"`.\n\n### default_ruby_base_path\n\nThe default base path for a system-wide installed Ruby. For example, the\nfollowing resource:\n\n ruby_build_ruby \"1.9.3-p0\"\n\nwill be installed into\n`\"#{node['ruby_build']['default_ruby_base_path']}/1.9.3-p0\"` unless a\n`prefix_path` attribute is explicitly set.\n\nThe default is `\"/usr/local/ruby\"`.\n\n### upgrade\n\nDetermines how to handle installing updates to the ruby-build framework.\nThere are currently 2 valid values:\n\n* `\"none\"`, `false`, or `nil`: will not update ruby-build and leave it in its\n current state.\n* `\"sync\"` or `true`: updates ruby-build to the version specified by the\n `git_ref` attribute or the head of the master branch by default.\n\nThe default is `\"none\"`.\n\n## Resources and Providers\n\n### ruby_build_ruby\n\n#### Actions\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ActionDescriptionDefault
install\n Build and install a Ruby from a definition file. See the ruby-build\n readme(1) for more details.\n Yes
reinstall\n Force a recompiliation of the Ruby from source. The :install action\n will skip a build if the target install directory already exists.\n  
\n\n1. [ruby-build readme][rb_readme]\n\n#### Attributes\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeDescriptionDefault Value
definition\n Name attribute: the name of a built-in definition(1)\n or the path to a ruby-build definition file.\n nil
prefix_pathThe path to which the Ruby will be installed.nil
user\n A user which will own the installed Ruby. The default value of\n nil denotes a system-wide Ruby (root-owned) is being\n targeted. Note: if specified, the user must already exist.\n nil
group\n A group which will own the installed Ruby. The default value of\n nil denotes a system-wide Ruby (root-owned) is being\n targeted. Note: if specified, the group must already exist.\n nil
environment\n A Hash of additional environment variables(2), such as\n CONFIGURE_OPTS or RUBY_BUILD_MIRROR_URL.\n nil
\n\n1. [built-in definition][rb_definitions]\n2. [special environment variables][rb_environment]\n\n#### Examples\n\n##### Install Ruby\n\n # See: https://github.com/sstephenson/ruby-build/issues/186\n ruby_build_ruby \"ree-1.8.7-2012.02\" do\n environment({ 'CONFIGURE_OPTS' => '--no-tcmalloc' })\n end\n\n ruby_build_ruby \"1.9.3-p0\" do\n prefix_path \"/usr/local/ruby/ruby-1.9.3-p0\"\n environment({\n 'RUBY_BUILD_MIRROR_URL' => 'http://local.example.com'\n })\n\n action :install\n end\n\n ruby_build_ruby \"jruby-1.6.5\"\n\n**Note:** the install action is default, so the second example is more common.\n\n##### Install A Ruby For A User\n\n ruby_build_ruby \"maglev-1.0.0\" do\n prefix_path \"/home/deploy/.rubies/maglev-1.0.0\"\n user \"deploy\"\n group \"deploy\"\n end\n\n##### Reinstall Ruby\n\n ruby_build_ruby \"rbx-1.2.4\" do\n prefix_path \"/opt/rbx-1.2.4\"\n\n action :reinstall\n end\n\n**Note:** the Ruby will be built whether or not the Ruby exists in the\n`prefix_path` directory.\n\n## Development\n\n* Source hosted at [GitHub][repo]\n* Report issues/Questions/Feature requests on [GitHub Issues][issues]\n\nPull requests are very welcome! Make sure your patches are well tested.\nIdeally create a topic branch for every separate change you make.\n\n## License and Author\n\nAuthor:: [Fletcher Nichol][fnichol] () [![endorse](http://api.coderwall.com/fnichol/endorsecount.png)](http://coderwall.com/fnichol)\n\nCopyright 2011, Fletcher Nichol\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n[berkshelf]: http://berkshelf.com/\n[chef_repo]: https://github.com/opscode/chef-repo\n[cheffile]: https://github.com/applicationsonline/librarian/blob/master/lib/librarian/chef/templates/Cheffile\n[java_cb]: http://community.opscode.com/cookbooks/java\n[jruby]: http://jruby.org/\n[kgc]: https://github.com/websterclay/knife-github-cookbooks#readme\n[librarian]: https://github.com/applicationsonline/librarian#readme\n[lwrp]: http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+%28LWRP%29\n[rb_readme]: https://github.com/sstephenson/ruby-build#readme\n[rb_site]: https://github.com/sstephenson/ruby-build\n[rb_environment]: https://github.com/sstephenson/ruby-build#special-environment-variables\n[rb_definitions]: https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build\n\n[fnichol]: https://github.com/fnichol\n[repo]: https://github.com/fnichol/chef-ruby_build\n[issues]: https://github.com/fnichol/chef-ruby_build/issues\n", "maintainer": "Fletcher Nichol", "maintainer_email": "fnichol@nichol.ca", "license": "Apache 2.0", "platforms": { "ubuntu": ">= 0.0.0", "debian": ">= 0.0.0", "freebsd": ">= 0.0.0", "redhat": ">= 0.0.0", "centos": ">= 0.0.0", "fedora": ">= 0.0.0", "amazon": ">= 0.0.0", "scientific": ">= 0.0.0", "suse": ">= 0.0.0", "mac_os_x": ">= 0.0.0" }, "dependencies": { }, "recommendations": { }, "suggestions": { }, "conflicting": { }, "providing": { }, "replacing": { }, "attributes": { }, "groupings": { }, "recipes": { }, "version": "0.8.0" }