Permalink
Browse files

Move some hardcoded angelbox app setup into railsframe

  • Loading branch information...
noahgibbs committed Jan 16, 2011
1 parent 5f02b54 commit 22969783368047c097267c78db9d86de112e009d
Showing with 19 additions and 5 deletions.
  1. +1 −3 cookbooks/angelbox/recipes/default.rb
  2. +18 −2 cookbooks/railsframe/recipes/default.rb
@@ -25,7 +25,7 @@
group "www"
end
-# Outdated information sometimes means package won't install
+# Outdated information sometimes means packages won't install - update
require_recipe "apt"
# includes build-essential, for gems with native extensions
@@ -49,8 +49,6 @@
package "libsqlite3-dev"
###########
-
-
directory "/home/www/checkouts" do
owner "www"
group "www"
@@ -18,9 +18,10 @@
app[:name] ||= app[:github]
end
+ project = app[:dir] || app[:name]
+ dir = "#{node[:railsframe][:dir]}/#{project}"
if app[:git]
- project = app[:dir] || app[:name]
- git "#{node[:railsframe][:dir]}/#{project}" do
+ git dir do
action :sync
repository app[:git]
user node[:railsframe][:user]
@@ -30,4 +31,19 @@
raise "Couldn't find a git repository!"
end
+ directory "#{dir}/tmp" do
+ owner node[:railsframe][:user]
+ group node[:railsframe][:group]
+ end
+
+ bash "bundler installation" do
+ code "bundle install"
+ cwd dir
+ only_if { File.exist? "#{dir}/Gemfile" }
+ end
+
+ bash "passenger restart" do
+ code "touch tmp/restart.txt"
+ cwd dir
+ end
end

0 comments on commit 2296978

Please sign in to comment.