optionally load a custom configuration script.
This commit is contained in:
parent
6c44db6e65
commit
39d2b456a7
|
@ -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
|
Loading…
Reference in New Issue