whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [2/2] Commit 38ab5d0: check if bundle is up to date
Date Sun, 14 Feb 2016 11:43:53 GMT
Commit 38ab5d0f018016ca1ebd8d47fbdc76fe8389ad16:
    check if bundle is up to date


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/roster/Rakefile                                          | ++++++++ ---
------------------------------------------------------------
20 changes: 15 additions, 5 deletions.
------------------------------------------------------------


diff --git a/www/roster/Rakefile b/www/roster/Rakefile
index 23ac90f..f77b646 100644
--- a/www/roster/Rakefile
+++ b/www/roster/Rakefile
@@ -1,13 +1,23 @@
-require 'bundler'
-Bundler.require(:default, :development)
-
-task :server => :listen do
+# standalone roster server
+task :server => [:bundle, :listen] do
   ENV['RACK_ENV']='development'
   at_exit {sleep 0.5}
   sh 'bundle exec passenger start'
 end
 
-task :listen do
+file 'Gemfile.lock' => 'Gemfile' do
+  sh 'bundle update'
+  touch 'Gemfile.lock'
+end
+
+desc 'install dependencies'
+task :bundle => 'Gemfile.lock' do
+  require 'bundler'
+  Bundler.require(:default, :development)
+end
+
+# restart server when files update
+task :listen => :bundle do
   dirs = [
     File.expand_path('..', File.realpath(__FILE__)),
     File.expand_path('../../../lib', File.realpath(__FILE__))

Mime
View raw message