Permalink
Browse files

Merge pull request #5 from gchef/rvmless

Rvmless
  • Loading branch information...
2 parents 1c8a433 + f8d919d commit 6106402d25178ec71383ee21a726327a43e82d73 @gerhard gerhard committed Sep 7, 2012
Showing with 5 additions and 14 deletions.
  1. +1 −2 metadata.rb
  2. +2 −12 providers/system_user.rb
  3. +2 −0 recipes/apps.rb
View
@@ -2,8 +2,7 @@
maintainer_email "gerhard@lazu.co.uk"
license "Apache 2.0"
description "Default bootstrap tasks"
-version "1.5.0"
+version "1.6.0"
depends "apt" # https://github.com/gchef/apt-cookbook
depends "ssh" # https://github.com/gchef/ssh-cookbook
-depends "rvm" # https://github.com/gchef/rvm-cookbook
View
@@ -91,27 +91,17 @@
end
end
- if new_resource.groups.include?("rvm")
+ if ((%w[ruby rvm rbenv] & new_resource.groups).length > 0)
file "#{@@user.home}/.gemrc" do
owner @@user.name
group @@user.name
content "gem: --no-user-install --no-ri --no-rdoc"
mode "0644"
end
- template "#{@@user.home}/.rvmrc" do
- cookbook "rvm"
- source "rvmrc.erb"
- owner @@user.name
- group @@user.name
- mode "0644"
- backup false
- end
-
- bootstrap_profile "rvm" do
+ bootstrap_profile "ruby" do
user @@user
params([
- "if [ -e #{node[:rvm_script]} ]; then . #{node[:rvm_script]}; fi",
"export RAILS_ENV=production",
"export RACK_ENV=production",
"export APP_ENV=production"
View
@@ -18,6 +18,8 @@
action app[:status]
end
+ rbenv_user(app[:name]) if node.include?(:rbenv) and app.fetch(:groups) { [] }.include?("rbenv")
+
unless app[:status] == :delete
directory "/var/log/#{app[:name]}" do
owner app[:name]

0 comments on commit 6106402

Please sign in to comment.