Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arkency/ruby-build-cookbook

Cookbook providing definition to install Ruby for user using ruby-build.
https://github.com/arkency/ruby-build-cookbook

Last synced: 5 days ago
JSON representation

Cookbook providing definition to install Ruby for user using ruby-build.

Awesome Lists containing this project

README

        

Description
===========

Provides a definition to install Ruby for user using [ruby-build](https://github.com/sstephenson/ruby-build).

Usage
=====

The `ruby` definition manages the installation and configuration of
ruby for user.

### Parameters:

* `version` - Ruby version to install. You can check the list of possible options [`ruby-build` github repository](https://github.com/sstephenson/ruby-build/tree/master/share/ruby-build).
* `owner` - Owner of installed files.
* `home` - Home directory of an user.
* `rubygems` - Rubygems version. Optional.
* `export_path` - Append ruby to `PATH`.
* `exports` - Databag path to store computed ruby properties. Optional.

### Examples:

```ruby
app = node['app']
username = app['name']
ruby_version = app['ruby']
home_dir = "#{node.home_root}/#{username}"

user username do
shell "/bin/bash"
supports :manage_home => true
action :create
home home_dir
end

ruby "#{ruby_version}-#{username}" do
version ruby_version
home home_dir
owner username
export_path true
exports %W(app)
end
```

License and Author
==================

Author:: Arkency

Copyright 2012, Arkency

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.