Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move some hardcoded angelbox app setup into railsframe

  • Loading branch information...
commit 22969783368047c097267c78db9d86de112e009d 1 parent 5f02b54
Noah Gibbs authored January 16, 2011
4  cookbooks/angelbox/recipes/default.rb
@@ -25,7 +25,7 @@
25 25
   group "www"
26 26
 end
27 27
 
28  
-# Outdated information sometimes means package won't install
  28
+# Outdated information sometimes means packages won't install - update
29 29
 require_recipe "apt"
30 30
 
31 31
 # includes build-essential, for gems with native extensions
@@ -49,8 +49,6 @@
49 49
 package "libsqlite3-dev"
50 50
 ###########
51 51
 
52  
-
53  
-
54 52
 directory "/home/www/checkouts" do
55 53
   owner "www"
56 54
   group "www"
20  cookbooks/railsframe/recipes/default.rb
@@ -18,9 +18,10 @@
18 18
     app[:name] ||= app[:github]
19 19
   end
20 20
 
  21
+  project = app[:dir] || app[:name]
  22
+  dir = "#{node[:railsframe][:dir]}/#{project}"
21 23
   if app[:git]
22  
-    project = app[:dir] || app[:name]
23  
-    git "#{node[:railsframe][:dir]}/#{project}" do
  24
+    git dir do
24 25
       action :sync
25 26
       repository app[:git]
26 27
       user node[:railsframe][:user]
@@ -30,4 +31,19 @@
30 31
     raise "Couldn't find a git repository!"
31 32
   end
32 33
 
  34
+  directory "#{dir}/tmp" do
  35
+    owner node[:railsframe][:user]
  36
+    group node[:railsframe][:group]
  37
+  end
  38
+
  39
+  bash "bundler installation" do
  40
+    code "bundle install"
  41
+    cwd dir
  42
+    only_if { File.exist? "#{dir}/Gemfile" }
  43
+  end
  44
+
  45
+  bash "passenger restart" do
  46
+    code "touch tmp/restart.txt"
  47
+    cwd dir
  48
+  end
33 49
 end

0 notes on commit 2296978

Please sign in to comment.
Something went wrong with that request. Please try again.