Sha256: ea60c36e0f9ccdbbccc46111720006b6aaaf4733b245de275b70d2b7259b69ad

Contents?: true

Size: 754 Bytes

Versions: 2

Compression:

Stored size: 754 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift File.dirname(__FILE__) + "/../lib"
require 'acts_as_icontact'
require 'rubygems'
require 'readline'
require 'bond'
require 'bond/completion'

module ActsAsIcontact
  # Lifted from: http://tagaholic.me/2009/07/23/mini-irb-and-mini-script-console.html
  history_file = File.join(ENV["HOME"], '.icontact_history')
  IO.readlines(history_file).each {|e| Readline::HISTORY << e.chomp } if File.exists?(history_file)
  print "# ActsAsIcontact command line (type 'exit' to quit)\n"
  while (input = Readline.readline("\n>> ", true)) != 'exit'
    begin puts "=> #{eval(input).inspect}"; rescue Exception; puts "Error: #{$!}" end
  end
  File.open(history_file, 'w') {|f| f.write Readline::HISTORY.to_a.join("\n") }
  
end

exit!

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
SFEley-acts_as_icontact-0.3.2 bin/icontact
acts_as_icontact-0.3.2 bin/icontact