.irbrc
author Mahlon E. Smith <mahlon@laika.com>
Tue, 16 May 2017 13:58:52 -0700
changeset 18 9aaac749fd9f
parent 6 66beb495a861
permissions -rw-r--r--
Bump version.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     1
#!/usr/bin/ruby -*- ruby -*-
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     2
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     3
BEGIN {
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     4
	require 'pathname'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     5
	basedir = Pathname.new( __FILE__ ).dirname.expand_path
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     6
	libdir = basedir + "lib"
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     7
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     8
	puts ">>> Adding #{libdir} to load path..."
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     9
	$LOAD_PATH.unshift( libdir.to_s )
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    10
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    11
	require basedir + 'utils'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    12
	include UtilityFunctions
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    13
}
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    14
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    15
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    16
# Try to require the 'thingfish' library
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    17
begin
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    18
	require 'ezmlm'
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    19
rescue => e
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    20
	$stderr.puts "Ack! Ezmlm library failed to load: #{e.message}\n\t" +
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    21
		e.backtrace.join( "\n\t" )
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    22
end
66beb495a861 Checkpoint commit.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    23