Sha256: 349e790beace4e1273a399140fdace6f66991d5a42416e4f62a712f9da849c52
Contents?: true
Size: 488 Bytes
Versions: 11
Compression:
Stored size: 488 Bytes
Contents
module Bundler class RubygemsMirror private def self.mirrors @mirrors ||= Bundler.settings.all.inject({}) do |h, k| if k =~ /^mirror./ uri = add_slash(k.sub(/^mirror./, '')) h[uri] = URI.parse(Bundler.settings[k]) end h end end def self.add_slash(uri) uri = uri.to_s uri =~ /\/$/ ? uri : uri + '/' end public def self.to_uri(uri) mirrors[add_slash(uri)] || uri end end end
Version data entries
11 entries across 11 versions & 1 rubygems