forked from avit/chef-brightbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 34f1d63
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Description | ||
=========== | ||
Install latest ruby 1.9.3 from brightbox PPA | ||
|
||
Requirements | ||
============ | ||
Ubuntu | ||
|
||
Attributes | ||
========== | ||
|
||
Usage | ||
===== | ||
`recipe[brightbox::ruby]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
:backtrace: false | ||
:benchmark: false | ||
:update_sources: true | ||
:bulk_threshold: 1000 | ||
:verbose: true | ||
install: --no-ri --no-rdoc | ||
update: --no-ri --no-rdoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
maintainer "Andrew Vit" | ||
maintainer_email "andrew@avit.ca" | ||
license "Apache 2.0" | ||
description "Installs latest ruby patch version" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | ||
version "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# | ||
# Cookbook Name:: brightbox | ||
# Recipe:: default | ||
# | ||
# Copyright 2012, Andrew Vit | ||
# | ||
# 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. | ||
# | ||
|
||
include_recipe "brightbox::ruby" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# Cookbook Name:: brightbox | ||
# Recipe:: ruby | ||
# | ||
# Copyright 2012, Andrew Vit | ||
# | ||
# 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. | ||
# | ||
|
||
apt_repository "brightbox-ruby-ng" do | ||
action :add | ||
uri "http://ppa.launchpad.net/brightbox/ruby-ng-experimental/ubuntu" | ||
distribution node['lsb']['codename'] | ||
components ["main"] | ||
keyserver "keyserver.ubuntu.com" | ||
key "C3173AA6" | ||
end | ||
|
||
apt_package "build-essential" | ||
apt_package "libreadline-dev" | ||
apt_package "libsqlite3-dev" | ||
apt_package "libmysqlclient-dev" | ||
apt_package "libssl-dev" | ||
apt_package "libxml2-dev" | ||
apt_package "libxslt-dev" | ||
apt_package "libyaml-dev" | ||
apt_package "openssl" | ||
apt_package "sqlite3" | ||
apt_package "zlib1g" | ||
|
||
apt_package "ruby" | ||
apt_package "ruby1.9.3" | ||
|
||
execute "update-alternatives ruby" do | ||
command "update-alternatives --set ruby /usr/bin/ruby1.9.1" | ||
end | ||
|
||
cookbook_file "/etc/gemrc" do | ||
action :create_if_missing | ||
source "gemrc" | ||
mode "0644" | ||
end | ||
|
||
["bundler", "rake", "rubygems-bundler"].each do |gem| | ||
gem_package gem do | ||
action :install | ||
end | ||
end |