Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Ensure you set an explicit dependency on the `chruby` cookbook if you are using
# Attributes

- `node['chruby']['version']` - the version of Chruby to install. Default is 0.3.4.
- `node['chruby']['checksum']` - the SHA256 checksum of the archive downloaded from github; allows to avoid downloading from Github at every Chef run. Default is `nil` (mainly for backward compatibility with existing wrapper cookbooks)
- TODO: `node['chruby']['gpg_check']` - run the GPG check to verify the release was not tampered with.
- `node['chruby']['use_rvm_rubies']` - make Rubies installed using RVM available to chruby.
- `node['chruby']['use_rbenv_rubies']` - make Rubies installed using Rbenv available to chruby.
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
default['chruby']['version'] = '0.3.4'
default['chruby']['checksum'] = nil
default['chruby']['gpg_check'] = false
default['chruby']['use_rvm_rubies'] = false
default['chruby']['use_rbenv_rubies'] = false
Expand Down
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@

ark "chruby" do
url "https://github.com/postmodern/chruby/archive/v#{node['chruby']['version']}.tar.gz"
version node['chruby']['version']
checksum node['chruby']['checksum']
action :install_with_make
end

# Workaround for Github issue 5 https://github.com/Atalanta/chef-chruby/issues/5

link "/usr/local/chruby" do
to "/usr/local/chruby-1"
to "/usr/local/chruby-#{node['chruby']['version']}"
end

sh_owner = node['chruby']['sh_owner']
Expand Down