optionally load a custom configuration script.

This commit is contained in:
Adam Sanderson 2010-11-10 13:24:36 -08:00
parent 6c44db6e65
commit 39d2b456a7
1 changed files with 9 additions and 1 deletions

View File

@ -11,6 +11,7 @@ module Qwandry
def initialize def initialize
@repositories = Hash.new{|h,k| h[k] = []} @repositories = Hash.new{|h,k| h[k] = []}
configure_repositories! configure_repositories!
custom_configuration!
end end
# Adds a repository path to Qwandry's Launcher. # Adds a repository path to Qwandry's Launcher.
@ -61,6 +62,13 @@ module Qwandry
add :gem, path add :gem, path
end end
end end
def custom_configuration!
custom_path = ENV['HOME'] && ENV['HOME'] + '/.qwandry/init.rb'
if File.exist? custom_path
eval IO.read(custom_path)
end
end
end end
end end