Permalink
Browse files

Added app bundled dep

  • Loading branch information...
1 parent 695b108 commit ac3181d428a89be86b582bd977579766591d1995 @ivanvanderbyl committed Apr 16, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0 bundler.rb
View
@@ -0,0 +1,19 @@
+dep 'app bundled', :root, :env do
+ requires_when_unmet Dep('current dir:packages')
+ met? {
+ if !(root / 'Gemfile').exists?
+ log "No Gemfile - skipping bundling."
+ true
+ else
+ shell? 'bundle check', :cd => root, :log => true
+ end
+ }
+ meet {
+ install_args = %w[development test].include?(env) ? '' : "--deployment --without 'development test'"
+ unless shell("bundle install #{install_args}", :cd => root, :log => true)
+ confirm("Try a `bundle update`", :default => 'n') {
+ shell 'bundle update', :cd => root, :log => true
+ }
+ end
+ }
+end

0 comments on commit ac3181d

Please sign in to comment.