Results for: "Dir.chdir"

A fake Gem::RemoteFetcher for use in tests or to avoid real live HTTP requests when testing code that uses RubyGems.

Example:

@fetcher = Gem::FakeFetcher.new
@fetcher.data['http://gems.example.com/yaml'] = source_index.to_yaml
Gem::RemoteFetcher.fetcher = @fetcher

use nested array if multiple response is needed

@fetcher.data['http://gems.example.com/sequence'] = [['Success', 200, 'OK'], ['Failed', 401, 'Unauthorized']]

@fetcher.fetch_path('http://gems.example.com/sequence') # => ['Success', 200, 'OK']
@fetcher.fetch_path('http://gems.example.com/sequence') # => ['Failed', 401, 'Unauthorized']

# invoke RubyGems code

paths = @fetcher.paths
assert_equal 'http://gems.example.com/yaml', paths.shift
assert paths.empty?, paths.join(', ')

See RubyGems’ tests for more examples of FakeFetcher.

No documentation available
No documentation available
No documentation available
No documentation available

An error caused by searching for a dependency that is completely unknown, i.e. has no versions available whatsoever.

An error caused by attempting to fulfil a dependency that was circular

@note This exception will be thrown iff a {Vertex} is added to a

{DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an
existing {DependencyGraph::Vertex}

See Net::HTTPGenericRequest for attributes and methods.

See Net::HTTPGenericRequest for attributes and methods.

Net::IMAP::BodyTypeAttachment represents attachment body structures of messages.

Fields:

media_type

Returns the content media type name.

subtype

Returns nil.

param

Returns a hash that represents parameters.

multipart?

Returns false.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

A FetchError exception wraps up the various possible IO and HTTP failures that could happen while downloading from the internet.

The SpecFetcherSetup allows easy setup of a remote source in RubyGems tests:

spec_fetcher do |f|
  f.gem  'a', 1
  f.spec 'a', 2
  f.gem  'b', 1' 'a' => '~> 1.0'
end

The above declaration creates two gems, a-1 and b-1, with a dependency from b to a. The declaration creates an additional spec a-2, but no gem for it (so it cannot be installed).

After the gems are created they are removed from Gem.dir.

No documentation available

Mounts a proc at a path that accepts a request and response.

Instead of mounting this servlet with WEBrick::HTTPServer#mount use WEBrick::HTTPServer#mount_proc:

server.mount_proc '/' do |req, res|
  res.body = 'it worked!'
  res.status = 200
end
No documentation available
No documentation available

@!visibility private (see DependencyGraph#add_edge_no_circular)

Search took: 7ms  ·  Total Results: 1210