Class: Bundler::Fetcher::Base
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/bundler/fetcher/base.rb |
Class Method Summary
Instance Attribute Summary
- #api_fetcher? ⇒ Boolean readonly
- #available? ⇒ Boolean readonly
- #display_uri readonly
- #downloader readonly
- #gem_remote_fetcher readonly
- #remote readonly
Instance Method Summary
- #fetch_uri
- #remote_uri
- #log_specs(&block) private
Constructor Details
.new(downloader, remote, display_uri, gem_remote_fetcher) ⇒ Base
# File 'lib/bundler/fetcher/base.rb', line 11
def initialize(downloader, remote, display_uri, gem_remote_fetcher) raise "Abstract class" if self.class == Base @downloader = downloader @remote = remote @display_uri = display_uri @gem_remote_fetcher = gem_remote_fetcher end
Instance Attribute Details
#api_fetcher? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/fetcher/base.rb', line 37
def api_fetcher? false end
#available? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/fetcher/base.rb', line 33
def available? true end
#display_uri (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 7
attr_reader :display_uri
#downloader (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 6
attr_reader :downloader
#gem_remote_fetcher (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 9
attr_reader :gem_remote_fetcher
#remote (readonly)
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 8
attr_reader :remote
Instance Method Details
#fetch_uri
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 23
def fetch_uri @fetch_uri ||= if remote_uri.host == "rubygems.org" uri = remote_uri.dup uri.host = "index.rubygems.org" uri else remote_uri end end
#log_specs(&block) (private)
[ GitHub ]#remote_uri
[ GitHub ]# File 'lib/bundler/fetcher/base.rb', line 19
def remote_uri @remote.uri end