Method: Bundler::Fetcher::Dependency#available?

Defined in:
lib/bundler/fetcher/dependency.rb

#available?Boolean

Returns:

  • (Boolean)
[View source]

9
10
11
12
13
14
15
16
17
18
# File 'lib/bundler/fetcher/dependency.rb', line 9

def available?
  @available ||= fetch_uri.scheme != "file" && downloader.fetch(dependency_api_uri)
rescue NetworkDownError => e
  raise HTTPError, e.message
rescue AuthenticationRequiredError
  # Fail since we got a 401 from the server.
  raise
rescue HTTPError
  false
end