Method: Bundler::Source::Rubygems#cached_built_in_gem

Defined in:
lib/bundler/source/rubygems.rb

#cached_built_in_gem(spec, local: false) ⇒ Object

[View source]

240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'lib/bundler/source/rubygems.rb', line 240

def cached_built_in_gem(spec, local: false)
  cached_path = cached_gem(spec)
  if cached_path.nil? && !local
    remote_spec = remote_specs.search(spec).first
    if remote_spec
      cached_path = fetch_gem(remote_spec)
      spec.remote = remote_spec.remote
    else
      Bundler.ui.warn "#{spec.full_name} is built in to Ruby, and can't be cached because your Gemfile doesn't have any sources that contain it."
    end
  end
  cached_path
end