Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added script/console

  • Loading branch information...
commit 3a4574b60550d60c85b24b045db2a3e15d3bd95c 1 parent fb12b97
bry4n authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 script/console
View
14 script/console
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.