Skip to content

Commit

Permalink
Added script/console command.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelstrom committed Jul 25, 2009
1 parent e1a25bf commit a5abed7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions script/console
@@ -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 a5abed7

Please sign in to comment.