Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
avit committed Oct 14, 2012
0 parents commit 34f1d63
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
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]`
8 changes: 8 additions & 0 deletions files/default/gemrc
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
6 changes: 6 additions & 0 deletions metadata.rb
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"
20 changes: 20 additions & 0 deletions recipes/default.rb
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"
58 changes: 58 additions & 0 deletions recipes/ruby.rb
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

0 comments on commit 34f1d63

Please sign in to comment.