Permalink
Browse files

added script/console

  • Loading branch information...
1 parent fb12b97 commit 3a4574b60550d60c85b24b045db2a3e15d3bd95c bry4n committed Nov 14, 2009
Showing with 14 additions and 0 deletions.
  1. +14 −0 script/console
View
@@ -0,0 +1,14 @@
+#! /usr/bin/env ruby
+# This console script adapted from:rake
+# http://barkingiguana.com/blog/2009/01/25/scriptconsole-for-your-application/
+
+libs = %w{irb/completion app}
+
+command_line = []
+command_line << "irb"
+command_line << libs.inject("") { |acc, lib| acc + %( -r "#{lib}") }
+command_line << "--simple-prompt"
+command = command_line.join(" ")
+
+puts "Welcome to the sinatra-mvc console interface."
+exec command

0 comments on commit 3a4574b

Please sign in to comment.