qwandry/repositories.rb

14 lines
414 B
Ruby
Raw Normal View History

@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)
@repositories[label.to_s] << repository_type.new(path)
end
if which('ruby') == '/Users/adam/.rvm/rubies/ruby-1.9.1-p378/bin/ruby'
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/'
end