Permalink
Browse files

Added script/console command.

  • Loading branch information...
1 parent 278da8c commit bee74de8aacb044b6e5c12d04b50240e5524bbbf @nelstrom nelstrom committed with Jul 25, 2009
Showing with 16 additions and 0 deletions.
  1. +16 −0 script/console
View
@@ -0,0 +1,16 @@
+#! /usr/bin/env ruby
+# This console script adapted from:rake
+# http://barkingiguana.com/blog/2009/01/25/scriptconsole-for-your-application/
+
+libs = []
+libs << "irb/completion"
+libs << File.dirname(__FILE__) + '/../environment.rb'
+
+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 retweet console interface."
+exec command

0 comments on commit bee74de

Please sign in to comment.