2010-08-05 14:41:35 +00:00
|
|
|
@repositories = Hash.new{|h,k| h[k] = []}
|
|
|
|
|
|
|
|
def which(bin)
|
|
|
|
`which #{bin}`.chomp
|
|
|
|
end
|
|
|
|
|
2010-08-06 16:48:52 +00:00
|
|
|
def add(label, path, repository_type=Qwandry::FlatRepository)
|
2010-08-09 04:15:20 +00:00
|
|
|
label = label.to_s
|
|
|
|
@repositories[label] << repository_type.new(label, path)
|
2010-08-05 14:41:35 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if which('ruby') == '/Users/adam/.rvm/rubies/ruby-1.9.1-p378/bin/ruby'
|
2010-08-05 15:09:58 +00:00
|
|
|
add :gem, '/Users/adam/.rvm/gems/ruby-1.9.1-p378/gems/'
|
|
|
|
add :ruby, '/Users/adam/.rvm/rubies/ruby-1.9.1-p378/lib/ruby/1.9.1/'
|
2010-08-05 14:41:35 +00:00
|
|
|
end
|